Skip to content
Snippets Groups Projects
Commit f0788e9b authored by Tomasz Bold's avatar Tomasz Bold Committed by Adam Edward Barton
Browse files

Add auxilary functionality to Run2 -> Run3 tigger nav converter to print all chain features

parent 94e1a0ea
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!41964Add auxilary functionality to Run2 -> Run3 tigger nav converter to print all chain features
......@@ -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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment