diff --git a/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.cxx b/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.cxx index 5580ca5ab928f8720cde3780b5d17202933b53ea..c6590b1c0aa816a109f16718603dee09769b632a 100644 --- a/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.cxx +++ b/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.cxx @@ -57,6 +57,11 @@ StatusCode Run2ToRun3TrigNavConverter::execute(const EventContext& context) cons navDecoder.deserialize( navReadHandle->serialized() ); + if ( m_onlyFeaturePriting ) + return printFeatures(navDecoder); + + + SG::WriteHandle< TrigCompositeUtils::DecisionContainer > outputNavigation = TrigCompositeUtils::createAndStore( m_trigNavWriteKey, context ); auto decisionOutput = outputNavigation.ptr(); SG::WriteHandle< TrigCompositeUtils::DecisionContainer > outputSummary = TrigCompositeUtils::createAndStore( m_trigSummaryWriteKey, context ); @@ -211,3 +216,33 @@ const std::vector<HLT::TriggerElement::FeatureAccessHelper> Run2ToRun3TrigNavCon } +StatusCode Run2ToRun3TrigNavConverter::printFeatures(const HLT::StandaloneNavigation& nav) const { + std::set<std::string> totset; + + for (const auto chain: m_configSvc->chains()) { + std::set<std::string> fset; + for (auto signature: chain->signatures()) { + for (auto configTE: signature->outputTEs()) { + std::vector<HLT::TriggerElement*> tes; + nav.getAllOfType(configTE->id(), tes, false); + for (auto te: tes) { + for (auto featureAccessHelper: te->getFeatureAccessHelpers()) { + std::string type; + if(m_clidSvc->getTypeNameOfID(featureAccessHelper.getCLID(), type).isFailure()) { + ATH_MSG_WARNING("CLID " << featureAccessHelper.getCLID() << " is not known"); + } + const std::string info = type+"#"+nav.label(featureAccessHelper.getCLID(), featureAccessHelper.getIndex().subTypeIndex()); + fset.insert(info); + totset.insert(info); + } + } + } + } + const std::vector<std::string> fvec(fset.begin(), fset.end()); + ATH_MSG_INFO("chain " << chain->name() << " features " << fvec.size() << " " << fvec); + } + const std::vector totvec(totset.begin(), totset.end() ); + ATH_MSG_INFO("all event features " << totvec.size() << " " << totvec); + + return StatusCode::SUCCESS; +} \ No newline at end of file diff --git a/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.h b/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.h index c027358b614e85ad53c5d965cc70e0ceaf13cb72..e46a91820f04f43869c44c46d4dd8329e089985d 100644 --- a/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.h +++ b/Trigger/TrigEvent/TrigNavTools/src/Run2ToRun3TrigNavConverter.h @@ -47,6 +47,9 @@ private: SG::WriteHandleKey<xAOD::TrigCompositeContainer> m_trigNavWriteKey { this, "TrigNavWriteKey", "HLTNav_all" }; SG::WriteHandleKey<xAOD::TrigCompositeContainer> m_trigSummaryWriteKey { this, "TrigSummaryWriteKey", "HLTNav_Summary" }; + Gaudi::Property<bool> m_onlyFeaturePriting { this, "onlyFeaturePrinting", false, "When enabled do not do conversion but scan all chains in all events for features attached to related TEs"}; + + std::set<CLID> m_setCLID; StatusCode addTEfeatures(const HLT::StandaloneNavigation &navigationDecoder, HLT::TriggerElement::FeatureAccessHelper helper, TrigCompositeUtils::Decision *decisionPtr, bool kRoI=false) const; const std::vector<HLT::TriggerElement::FeatureAccessHelper> vectorTEfeatures(const HLT::TriggerElement *te_ptr) const; @@ -56,6 +59,9 @@ private: const std::vector<HLT::TriggerElement::FeatureAccessHelper> vectorROIfeatures(const HLT::TriggerElement *te_ptr) const; using TE_Decision_map = std::map<HLT::TriggerElement*, std::vector<TrigCompositeUtils::Decision*>>; + //!< iterates over all chains and for each prints features associated to it + StatusCode printFeatures(const HLT::StandaloneNavigation& ) const; + }; #endif // TRIGNAVTOOLS_RUN2TORUN3TRIGNAVCONVERTER_H