ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Run2ToRun3TrigNavConverterV2 Class Reference

#include <Run2ToRun3TrigNavConverterV2.h>

Inheritance diagram for Run2ToRun3TrigNavConverterV2:
Collaboration diagram for Run2ToRun3TrigNavConverterV2:

Public Member Functions

 Run2ToRun3TrigNavConverterV2 (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~Run2ToRun3TrigNavConverterV2 () override
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &context) const override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode extractTECtoChainMapping (TEIdToChainsMap_t &allTES, TEIdToChainsMap_t &finalTEs) const
 
StatusCode mirrorTEsStructure (ConvProxySet_t &, const HLT::TrigNavStructure &run2Nav) const
 
StatusCode associateChainsToProxies (ConvProxySet_t &, const TEIdToChainsMap_t &) const
 
StatusCode cureUnassociatedProxies (ConvProxySet_t &) const
 
StatusCode removeUnassociatedProxies (ConvProxySet_t &) const
 
StatusCode doCompression (ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
 
StatusCode collapseFeaturesProxies (ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
 
StatusCode collapseFeaturelessProxies (ConvProxySet_t &) const
 
StatusCode removeTopologicalProxies (ConvProxySet_t &) const
 
template<typename MAP >
StatusCode collapseProxies (ConvProxySet_t &, MAP &) const
 
StatusCode fillRelevantFeatures (ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
 
StatusCode fillRelevantTracks (ConvProxySet_t &convProxies) const
 
StatusCode fillRelevantRois (ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
 
StatusCode createIMHNodes (ConvProxySet_t &, xAOD::TrigCompositeContainer &, const EventContext &) const
 
StatusCode createL1Nodes (const ConvProxySet_t &convProxies, xAOD::TrigCompositeContainer &decisions, const EventContext &context) const
 
StatusCode createSFNodes (const ConvProxySet_t &, xAOD::TrigCompositeContainer &, const TEIdToChainsMap_t &finalTEs, const EventContext &context) const
 
StatusCode updateTerminusNode (xAOD::TrigCompositeContainer &, const EventContext &context) const
 
StatusCode linkFeaNode (ConvProxySet_t &convProxies, xAOD::TrigCompositeContainer &, const HLT::TrigNavStructure &run2Nav, const EventContext &context) const
 
StatusCode linkRoiNode (ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
 
StatusCode linkTrkNode (ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
 
std::vector< HLT::TriggerElement::FeatureAccessHelperfilterFEAs (const std::vector< HLT::TriggerElement::FeatureAccessHelper > &feaVector, const HLT::TrigNavStructure &navigationDecoder) const
 < both method skip TrigPassBits More...
 
uint64_t feaToHash (const std::vector< HLT::TriggerElement::FeatureAccessHelper > &feaVector, const HLT::TriggerElement *te_ptr, const HLT::TrigNavStructure &navigationDecoder) const
 returns true if this particular feature is to be saved (linked) More...
 
bool feaToSave (const HLT::TriggerElement::FeatureAccessHelper &fea, const std::string &sgName) const
 
bool roiToSave (const HLT::TrigNavStructure &run2Nav, const HLT::TriggerElement::FeatureAccessHelper &fea) const
 
void printProxies (const ConvProxySet_t &proxies, std::function< bool(const ConvProxy *)> selector=[](const ConvProxy *){return true;}, const std::vector< std::function< void(const ConvProxy *)>> &printers={}) const
 
size_t is2LegTopoChain (const TrigConf::HLTChain *ptrChain) const
 
std::size_t getFeaSize (const ConvProxy &) const
 
std::pair< std::size_t, std::size_t > getHighestPtObject (const ConvProxy &, const HLT::TrigNavStructure &) const
 Return pair of indices (feature index in proxy->features vector, object index) identifying the highest pT object attached to the proxy. More...
 
StatusCode allProxiesHaveChain (const ConvProxySet_t &) const
 
StatusCode allProxiesConnected (const ConvProxySet_t &) const
 
StatusCode numberOfHNodesPerProxyNotExcessive (const ConvProxySet_t &) const
 
StatusCode noUnconnectedHNodes (const xAOD::TrigCompositeContainer &) const
 
std::tuple< uint32_t, CLID, std::string > getSgKey (const HLT::TrigNavStructure &navigationDecoder, const HLT::TriggerElement::FeatureAccessHelper &helper) const
 
CLID getExpectedParticleCLID (const std::string &teName) const
 Helper function to determine expected particle CLID based on TE name Returns 0 if no specific type is expected (e.g., for non-physics TEs) More...
 
StatusCode bjetMuChainConfigDecoder (TEIdToChainsMap_t &allTES, TEIdToChainsMap_t &finalTEs, const TrigConf::HLTChain *ptrChain) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< xAOD::TrigNavigationm_trigNavKey {this, "TrigNavReadKey", "TrigNavigation"}
 
PublicToolHandle< Trig::TrigDecisionToolm_tdt {this, "TrigDecisionTool", "", "When enabled read navigation from TDT/off by default"}
 
ServiceHandle< TrigConf::IHLTConfigSvcm_configSvc {this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc", "Trigger configuration service"}
 
ServiceHandle< IClassIDSvc > m_clidSvc {this, "ClassIDSvc", "ClassIDSvc", "Service to translate CLID to class name"}
 
Gaudi::Property< bool > m_doSelfValidation {this, "doSelfValidation", false, "Run consistency checks after stages of conversion (slows down the alg)"}
 
Gaudi::Property< bool > m_doCompression {this, "doCompression", false, "Collapse navigation elements to save ouput space"}
 
Gaudi::Property< bool > m_doLinkFeatures {this, "doLinkFeatures", true, "Add links to objects, setting it false makes sense when running tests"}
 
Gaudi::Property< bool > m_includeTauTrackFeatures {this, "addTauTracks", false, "Add Tau Track collection as feature element"}
 
Gaudi::Property< size_t > m_hNodesPerProxyThreshold {this, "hNodesPerProxyThreshhold", 15, "Limit number of H nodes per TE (if exceeded conversion results in an error)"}
 
Gaudi::Property< std::vector< std::string > > m_chainsToSave {this, "Chains", {}, "If not specified, all chains are handled"}
 
Gaudi::Property< std::vector< std::string > > m_collectionsToSave {this, "Collections", {}}
 
Gaudi::Property< std::vector< std::string > > m_roisToSave {this, "Rois", {}}
 
SG::WriteHandleKey< xAOD::TrigCompositeContainerm_trigOutputNavKey {this, "OutputNavKey", "HLTNav_R2ToR3Summary"}
 
std::mutex m_configUpdateMutex
 
TEIdToChainsMap_t m_allTEIdsToChains
 
TEIdToChainsMap_t m_finalTEIdsToChains
 
std::function< void(const ConvProxy *)> m_chainIdsPrinter = [&](const ConvProxy* p){ for (auto id: p->passChains ) ATH_MSG_DEBUG("chain id " << id); }
 
std::function< void(const ConvProxy *)> m_teIDPrinter = [&](const ConvProxy* p){ ATH_MSG_DEBUG("TE id " << TrigConf::HLTUtils::hash2string(p->te->getId())); }
 
std::map< CLID, std::set< std::string > > m_collectionsToSaveDecoded
 
std::vector< std::string > m_setRoiName
 
CLID m_roIDescriptorCLID {0}
 
CLID m_roIDescriptorCollectionCLID {0}
 
CLID m_TrigRingerRingsCLID {0}
 
CLID m_TrigRingerRingsContainerCLID {0}
 
CLID m_TrigEMClusterCLID {0}
 
CLID m_TrigEMClusterContainerCLID {0}
 
CLID m_CaloClusterCLID {0}
 
CLID m_CaloClusterContainerCLID {0}
 
CLID m_TrackParticleContainerCLID {0}
 
CLID m_TauTrackContainerCLID {0}
 
CLID m_ElectronContainerCLID {0}
 
CLID m_PhotonContainerCLID {0}
 
CLID m_MuonContainerCLID {0}
 
CLID m_TauJetContainerCLID {0}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 68 of file Run2ToRun3TrigNavConverterV2.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ Run2ToRun3TrigNavConverterV2()

Run2ToRun3TrigNavConverterV2::Run2ToRun3TrigNavConverterV2 ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 146 of file Run2ToRun3TrigNavConverterV2.cxx.

146  : AthReentrantAlgorithm(name, pSvcLocator)
147 {
148 }

◆ ~Run2ToRun3TrigNavConverterV2()

Run2ToRun3TrigNavConverterV2::~Run2ToRun3TrigNavConverterV2 ( )
overridevirtual

Definition at line 150 of file Run2ToRun3TrigNavConverterV2.cxx.

151 {
152 }

Member Function Documentation

◆ allProxiesConnected()

StatusCode Run2ToRun3TrigNavConverterV2::allProxiesConnected ( const ConvProxySet_t proxies) const
private

Definition at line 1510 of file Run2ToRun3TrigNavConverterV2.cxx.

1511 {
1512  for (auto p : proxies)
1513  {
1514  if (p->children.empty() and p->parents.empty() and not p->runChains.empty())
1515  {
1516  ATH_MSG_ERROR("Orphanted proxy N chains run:" << p->runChains.size());
1517  return StatusCode::FAILURE;
1518  }
1519  }
1520  ATH_MSG_DEBUG("CHECK OK, no orphanted proxies");
1521  return StatusCode::SUCCESS;
1522 }

◆ allProxiesHaveChain()

StatusCode Run2ToRun3TrigNavConverterV2::allProxiesHaveChain ( const ConvProxySet_t proxies) const
private

Definition at line 1496 of file Run2ToRun3TrigNavConverterV2.cxx.

1497 {
1498  for (auto p : proxies)
1499  {
1500  if (p->runChains.empty())
1501  {
1502  ATH_MSG_ERROR("Proxy with no chains");
1503  return StatusCode::FAILURE;
1504  }
1505  }
1506  ATH_MSG_DEBUG("CHECK OK, no proxies w/o a chain");
1507  return StatusCode::SUCCESS;
1508 }

◆ associateChainsToProxies()

StatusCode Run2ToRun3TrigNavConverterV2::associateChainsToProxies ( ConvProxySet_t convProxies,
const TEIdToChainsMap_t allTEs 
) const
private

Definition at line 669 of file Run2ToRun3TrigNavConverterV2.cxx.

670 {
671 
672  for (auto &ptrConvProxy : convProxies)
673  {
674  auto teId = ptrConvProxy->te->getId();
675  bool teActive = ptrConvProxy->te->getActiveState();
676  auto iter = allTEs.find(teId);
677  if (iter != allTEs.end())
678  {
679  ptrConvProxy->runChains.insert(iter->second.begin(), iter->second.end());
680  if (teActive)
681  {
682  ptrConvProxy->passChains.insert(iter->second.begin(), iter->second.end());
683  }
684  }
685 
686  for (auto &objTeIdToChain : allTEs)
687  {
688  if (teId == objTeIdToChain.first)
689  {
690  for (auto &chainId : objTeIdToChain.second)
691  {
692  (ptrConvProxy->runChains).insert(chainId);
693  }
694  break;
695  }
696  }
697  }
698  return StatusCode::SUCCESS;
699 }

◆ bjetMuChainConfigDecoder()

StatusCode Run2ToRun3TrigNavConverterV2::bjetMuChainConfigDecoder ( TEIdToChainsMap_t allTES,
TEIdToChainsMap_t finalTEs,
const TrigConf::HLTChain ptrChain 
) const
private

Definition at line 548 of file Run2ToRun3TrigNavConverterV2.cxx.

548  {
549  HLT::Identifier chainId = HLT::Identifier(ptrChain->name());
550 
551  std::vector<unsigned int> muons;
552  std::vector<unsigned int> jets;
553  bool switchedTojets =false;
554  for (auto ptrHLTSignature : ptrChain->signatures()) {
555  for (auto ptrHLTTE : ptrHLTSignature->outputTEs()) {
556  if ( ptrHLTTE->name().find("_mu") == std::string::npos ) {
557  switchedTojets = true;
558  }
559 
560  if ( switchedTojets)
561  jets.push_back(ptrHLTTE->id());
562  else
563  muons.push_back(ptrHLTTE->id());
564  }
565  }
566  ATH_CHECK(not muons.empty());
567  ATH_CHECK(not jets.empty());
568  std::reverse(std::begin(muons), std::end(muons));
570  finalTEs[muons[0]].insert(TrigCompositeUtils::createLegName(chainId, 0));
571  finalTEs[muons[0]].insert(chainId);
572  finalTEs[jets[0]].insert(TrigCompositeUtils::createLegName(chainId, 1));
573  finalTEs[jets[0]].insert(chainId);
574 
575  for ( size_t index = 0; index < std::min(muons.size(), jets.size()); ++index)
576  {
577  allTEs[muons[index]].insert(TrigCompositeUtils::createLegName(chainId, 0));
578  allTEs[muons[index]].insert(chainId);
579  allTEs[jets[index]].insert(TrigCompositeUtils::createLegName(chainId, 1));
580  allTEs[jets[index]].insert(chainId);
581  }
582  return StatusCode::SUCCESS;
583 }

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ collapseFeaturelessProxies()

StatusCode Run2ToRun3TrigNavConverterV2::collapseFeaturelessProxies ( ConvProxySet_t convProxies) const
private

Definition at line 856 of file Run2ToRun3TrigNavConverterV2.cxx.

857 {
858  // merge proxies bases on the parent child relation (this has to run after feature based collapsing)
859  struct ParentChildCharacteristics
860  {
861  ConvProxy *parent = nullptr;
862  ConvProxy *child = nullptr;
863  size_t distanceFromParent = 0;
864  bool operator<(const ParentChildCharacteristics &rhs) const
865  {
866  if (parent != rhs.parent)
867  return parent < rhs.parent;
868  if (child != rhs.child)
869  return child < rhs.child;
870  return distanceFromParent < rhs.distanceFromParent;
871  }
872  };
873  const size_t beforeCount = convProxies.size();
874  std::map<ParentChildCharacteristics, ConvProxySet_t> groupedProxies;
875  for (auto proxy : convProxies)
876  {
877  if (proxy->feaHash == ConvProxy::MissingFEA)
878  {
879  ATH_MSG_VERBOSE("Featureless proxy to deal with: " << proxy->description());
880  /* the canonical case
881  merged parent
882  / | | \
883  C1 C2 C3 C4 <-- proxies to merge
884  \ | | /
885  merged child
886  */
887  auto hasSomeFeatures = [](const ConvProxy* p){ return p->feaHash != ConvProxy::MissingFEA; };
888  if (proxy->children.size() == 1 and
889  std::all_of(proxy->children.begin(), proxy->children.end(), hasSomeFeatures ) and
890  proxy->parents.size() == 1 and
891  std::all_of(proxy->parents.begin(), proxy->parents.end(), hasSomeFeatures )
892  )
893  {
894  ATH_MSG_VERBOSE("Proxy to possibly merge: " << proxy->description());
895  groupedProxies[{*(proxy->parents.begin()), *(proxy->children.begin()), 0}].insert(proxy);
896  // TODO expand it to cover longer featureless sequences
897  }
898  else
899  {
900  ATH_MSG_VERBOSE("Featureless proxy in noncanonical situation " << proxy->description());
901  ATH_MSG_VERBOSE("parents ");
902  for (auto pp : proxy->parents)
903  {
904  ATH_MSG_VERBOSE(pp->description());
905  }
906  ATH_MSG_VERBOSE("children ");
907  for (auto cp : proxy->children)
908  {
909  ATH_MSG_VERBOSE(cp->description());
910  }
911  }
912  }
913  }
914 
915  ATH_CHECK(collapseProxies(convProxies, groupedProxies));
916  ATH_MSG_DEBUG("Proxies without features collapsing reduces size from " << beforeCount << " to " << convProxies.size());
917  return StatusCode::SUCCESS;
918 }

◆ collapseFeaturesProxies()

StatusCode Run2ToRun3TrigNavConverterV2::collapseFeaturesProxies ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 808 of file Run2ToRun3TrigNavConverterV2.cxx.

809 {
810 
811  const size_t beforeCount = convProxies.size();
812  std::map<uint64_t, ConvProxySet_t> feaToProxyMap;
813  for (auto proxy : convProxies)
814  {
815  proxy->feaHash = feaToHash(proxy->te->getFeatureAccessHelpers(), proxy->te, run2Nav);
816  if (proxy->feaHash != ConvProxy::MissingFEA)
817  feaToProxyMap[proxy->feaHash].insert(proxy);
818 
819  ATH_MSG_VERBOSE("TE " << TrigConf::HLTUtils::hash2string(proxy->te->getId()) << " FEA hash " << proxy->feaHash);
820  for (const HLT::TriggerElement::FeatureAccessHelper& fea : proxy->te->getFeatureAccessHelpers())
821  {
822  ATH_MSG_VERBOSE("FEA: " << fea);
823  }
824  }
825 
826  for (auto [feaHash, proxies] : feaToProxyMap)
827  {
828  auto first = *proxies.begin();
829  for (auto p : proxies)
830  {
831  if (filterFEAs(first->te->getFeatureAccessHelpers(), run2Nav) !=
832  filterFEAs(p->te->getFeatureAccessHelpers(), run2Nav))
833  {
834  ATH_MSG_ERROR("Proxies grouped by FEA hash have actually distinct features (specific FEAs are different)");
835  for (auto id: p->passChains ) ATH_MSG_ERROR("... chain id for this proxy " << id);
836  ATH_MSG_ERROR(".... TE id of this proxy: " << TrigConf::HLTUtils::hash2string(p->te->getId()));
837  for ( auto fea: first->te->getFeatureAccessHelpers() ) {
838  ATH_MSG_ERROR("FEA1 " << fea);
839  }
840  for ( auto fea: p->te->getFeatureAccessHelpers() ) {
841  ATH_MSG_ERROR("FEA2 " << fea);
842  }
843 
844  return StatusCode::FAILURE;
845  }
846  }
847  }
848 
849 
850  ATH_CHECK(collapseProxies(convProxies, feaToProxyMap));
851  ATH_MSG_DEBUG("Proxies with features collapsing reduces size from " << beforeCount << " to " << convProxies.size());
852 
853  return StatusCode::SUCCESS;
854 }

◆ collapseProxies()

template<typename MAP >
StatusCode Run2ToRun3TrigNavConverterV2::collapseProxies ( ConvProxySet_t convProxies,
MAP &  keyToProxyMap 
) const
private

Definition at line 779 of file Run2ToRun3TrigNavConverterV2.cxx.

780 {
781  // collapse proxies based on the mapping in the map argument(generic) and clean proxiesSet
782  std::vector<ConvProxy *> todelete;
783  for (auto &[key, proxies] : keyToProxyMap)
784  {
785  if (proxies.size() > 1)
786  {
787  ATH_MSG_DEBUG("Merging " << proxies.size() << " similar proxies");
788  for (auto p : proxies)
789  {
790  if (p->mergeAllowed(*proxies.begin()))
791  {
792  (*proxies.begin())->merge(p);
793  todelete.push_back(p);
794  }
795  // TODO consider scanning proxies another time if merge is not allowed, it may be allowed with other proxies here
796  }
797  }
798  }
799  for (auto proxy : todelete)
800  {
801  convProxies.erase(proxy);
802  delete proxy;
803  }
804  // remove from proxies set all elements that are now unassociated (remember to delete after)
805  return StatusCode::SUCCESS;
806 }

◆ createIMHNodes()

StatusCode Run2ToRun3TrigNavConverterV2::createIMHNodes ( ConvProxySet_t convProxies,
xAOD::TrigCompositeContainer decisions,
const EventContext &  context 
) const
private

Definition at line 1067 of file Run2ToRun3TrigNavConverterV2.cxx.

1068 {
1069  for (auto &proxy : convProxies)
1070  {
1072  for (auto chainId : proxy->runChains)
1073  {
1074  TrigCompositeUtils::addDecisionID(chainId, proxy->imNode);
1075  }
1077  for (auto chainId : proxy->passChains)
1078  {
1079  TrigCompositeUtils::addDecisionID(chainId, proxy->hNode.back());
1080  }
1081 
1082  TrigCompositeUtils::linkToPrevious(proxy->hNode.front(), proxy->imNode, context); // H low IM up
1083  }
1084  // connecting current IM to all Hs in parent proxies
1085  for (auto &proxy : convProxies)
1086  {
1087  for (auto &parentProxy : proxy->parents)
1088  {
1089  TrigCompositeUtils::linkToPrevious(proxy->imNode, parentProxy->hNode.front(), context); // IM low H up (in parent)
1090  }
1091  }
1092  ATH_MSG_DEBUG("IM & H nodes made, output nav elements " << decisions.size());
1093  return StatusCode::SUCCESS;
1094 }

◆ createL1Nodes()

StatusCode Run2ToRun3TrigNavConverterV2::createL1Nodes ( const ConvProxySet_t convProxies,
xAOD::TrigCompositeContainer decisions,
const EventContext &  context 
) const
private

Definition at line 1212 of file Run2ToRun3TrigNavConverterV2.cxx.

1214 {
1215 
1216  auto makeL1Node = [&decisions, &context](auto firstDecisionNode, auto chainIds)
1217  {
1219  L1Node->setName(TrigCompositeUtils::hltSeedingNodeName()); // L1
1220  for (auto chainId : chainIds)
1221  {
1222  TrigCompositeUtils::addDecisionID(chainId, L1Node);
1223  }
1224  TrigCompositeUtils::linkToPrevious(firstDecisionNode, L1Node, context); // IM -> L1
1225 
1226  return L1Node;
1227  };
1228 
1229  for (auto &proxy : convProxies)
1230  {
1231  // associate initial node to filter nodes,
1232  if (proxy->parents.empty())
1233  { // the IM node is initial
1234  proxy->l1Node = makeL1Node(proxy->imNode, TCU::decisionIDs(proxy->imNode)); // not using passChains as there may be additional filtering
1235  }
1236  }
1237 
1238  ATH_MSG_DEBUG("L1 nodes made, output nav elements ");
1239  return StatusCode::SUCCESS;
1240 }

◆ createSFNodes()

StatusCode Run2ToRun3TrigNavConverterV2::createSFNodes ( const ConvProxySet_t convProxies,
xAOD::TrigCompositeContainer decisions,
const TEIdToChainsMap_t finalTEs,
const EventContext &  context 
) const
private

Definition at line 1096 of file Run2ToRun3TrigNavConverterV2.cxx.

1098 {
1099  // make node & link it properly
1100  auto makeSingleSFNode = [&decisions, &context](auto lastDecisionNode, auto chainIds, TrigCompositeUtils::DecisionID idStore = 0)
1101  {
1103  sfNode->setName("SF");
1104  TrigCompositeUtils::linkToPrevious(decisions.at(0), sfNode, context);
1105  TrigCompositeUtils::linkToPrevious(sfNode, lastDecisionNode, context);
1106  for (auto chainId : chainIds)
1107  {
1108  if (idStore == 0)
1109  {
1110  TrigCompositeUtils::addDecisionID(chainId, sfNode);
1112  }
1113  else if (chainId.numeric() == idStore)
1114  {
1115  TrigCompositeUtils::addDecisionID(chainId, sfNode);
1117  }
1118  }
1119  return sfNode;
1120  };
1121  auto makeSFNodes = [makeSingleSFNode](auto proxy, TrigCompositeUtils::DecisionID idToStore = 0)
1122  {
1123  if (proxy->hNode.empty())
1124  { // nothing has passed, so link to the IM node
1125  // TODO make sure it needs to be done like that
1126  makeSingleSFNode(proxy->imNode, proxy->runChains, idToStore);
1127  }
1128  else
1129  {
1130  // makeSFNode(proxy->hNode[0], TCU::decisionIDs(proxy->hNode[0])); // not using passChains as there may be additional filtering
1131  for (auto &hNode : proxy->hNode)
1132  {
1133  makeSingleSFNode(hNode, proxy->passChains, idToStore); // using passChains
1134  }
1135  }
1136  };
1137 
1138  for (auto proxy : convProxies)
1139  {
1140  // associate terminal nodes to filter nodes,
1141  if (proxy->children.empty())
1142  { // the H modes are terminal
1143  makeSFNodes(proxy);
1144  }
1145  else
1146  {
1147  // likely need more iterations
1148  // nonterminal nodes that are nevertheless terminal for a given chain
1149  std::vector<TCU::DecisionID> toRetain;
1150  for (auto teId : proxy->teIDs)
1151  {
1152  auto whereInMap = terminalIds.find(teId);
1153  if (whereInMap != terminalIds.end())
1154  {
1155  toRetain.insert(toRetain.end(), whereInMap->second.begin(), whereInMap->second.end());
1156  }
1157  }
1158  for (auto chainIdstore : toRetain)
1159  {
1160  makeSFNodes(proxy, chainIdstore);
1161  }
1162  }
1163  }
1164  // associate all nodes designated as final one with the filter nodes
1165 
1166  ATH_MSG_DEBUG("SF nodes made, output nav elements " << decisions.size());
1167  return StatusCode::SUCCESS;
1168 }

◆ cureUnassociatedProxies()

StatusCode Run2ToRun3TrigNavConverterV2::cureUnassociatedProxies ( ConvProxySet_t convProxies) const
private

Definition at line 701 of file Run2ToRun3TrigNavConverterV2.cxx.

702 {
703  // propagate up (towards L1) chain IDs if they are not in proxies
704  // technically each proxy looks at the children proxies and inserts from it all unseen chains
705  // procedure is repeated until, no single proxy needs an update (tedious - we may be smarter in future)
706 
707  while (true)
708  {
709  size_t numberOfUpdates = 0;
710  for (auto p : convProxies)
711  {
712  for (auto child : p->children)
713  {
714  size_t startSize = p->runChains.size();
715  p->runChains.insert(std::begin(child->runChains), std::end(child->runChains));
716 
717  if (startSize != p->runChains.size())
718  { // some chain needed to be inserted
719  numberOfUpdates++;
720  // if update was need, it means set of chains that passed need update as well
721  p->passChains.insert(std::begin(child->runChains), std::end(child->runChains));
722  }
723  }
724  }
725  ATH_MSG_DEBUG("Needed to propagate chains from " << numberOfUpdates << " child(ren)");
726  if (numberOfUpdates == 0)
727  {
728  break;
729  }
730  }
731  return StatusCode::SUCCESS;
732 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ doCompression()

StatusCode Run2ToRun3TrigNavConverterV2::doCompression ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 763 of file Run2ToRun3TrigNavConverterV2.cxx.

764 {
765 
766  ATH_CHECK(collapseFeaturesProxies(convProxies, run2Nav));
768  if (m_doSelfValidation)
769  {
770  ATH_CHECK(allProxiesHaveChain(convProxies));
771  ATH_CHECK(allProxiesConnected(convProxies));
772  }
773  ATH_MSG_DEBUG("Compression done");
774 
775  return StatusCode::SUCCESS;
776 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode Run2ToRun3TrigNavConverterV2::execute ( const EventContext &  context) const
overridevirtual

Definition at line 253 of file Run2ToRun3TrigNavConverterV2.cxx.

254 {
255  {
256  // configuration reading could not be done before the event loop
257  // it needs to be done only once though
258  std::scoped_lock lock(m_configUpdateMutex);
259  if (m_allTEIdsToChains.empty())
261  }
262 
263  ConvProxySet_t convProxies;
264  HLT::StandaloneNavigation standaloneNav; // needed to keep TEs around, so it is out of the scope where it is filled and referenced
265  const HLT::TrigNavStructure *run2NavigationPtr = nullptr;
266  if (!m_trigNavKey.key().empty())
267  {
268  SG::ReadHandle navReadHandle(m_trigNavKey, context);
269  ATH_CHECK(navReadHandle.isValid());
270  standaloneNav.deserialize(navReadHandle->serialized());
271  run2NavigationPtr = &standaloneNav;
272  }
273  else
274  {
275  run2NavigationPtr = m_tdt->ExperimentalAndExpertMethods().getNavigation();
276  }
277 
278  ATH_CHECK(mirrorTEsStructure(convProxies, *run2NavigationPtr));
279  // printProxies(convProxies, [](auto ){ return true;},
280  // {m_chainIdsPrinter});
281 
282  if (m_doSelfValidation)
283  ATH_CHECK(allProxiesConnected(convProxies));
284 
286  // printProxies(convProxies, [](auto ){ return true;},
287  // {m_chainIdsPrinter});
288 
289  ATH_CHECK(cureUnassociatedProxies(convProxies));
290  ATH_MSG_DEBUG("Proxies to chains mapping done");
291 
292  ATH_CHECK(removeTopologicalProxies(convProxies));
293 
294  if (not m_chainsToSave.empty())
295  {
296  ATH_CHECK(removeUnassociatedProxies(convProxies));
297  printProxies(convProxies, [](auto ){ return true;},
299  ATH_MSG_DEBUG("Removed proxies to chains that are not converted, remaining number of elements " << convProxies.size());
300  }
301  if (m_doSelfValidation)
302  {
303  ATH_CHECK(allProxiesHaveChain(convProxies));
304  }
305  if (m_doCompression)
306  {
307  ATH_CHECK(doCompression(convProxies, *run2NavigationPtr));
308  // printProxies(convProxies, [](auto ){ return true;},
309  // {m_chainIdsPrinter});
310 
311  }
312 
314  auto decisionOutput = outputNavigation.ptr();
315  TrigCompositeUtils::newDecisionIn(decisionOutput, TCU::summaryPassNodeName()); // we rely on the fact that the 1st element is the top
316 
317  if (m_doLinkFeatures)
318  {
319  ATH_CHECK(fillRelevantFeatures(convProxies, *run2NavigationPtr));
320  ATH_CHECK(fillRelevantRois(convProxies, *run2NavigationPtr));
321  ATH_CHECK(fillRelevantTracks(convProxies));
322  ATH_MSG_DEBUG("Features to link found");
323  }
324 
325  ATH_CHECK(createIMHNodes(convProxies, *decisionOutput, context));
326  if (m_doSelfValidation)
327  {
329  }
330 
331  ATH_CHECK(createL1Nodes(convProxies, *decisionOutput, context));
332  ATH_CHECK(linkFeaNode(convProxies, *decisionOutput, *run2NavigationPtr, context));
333  ATH_CHECK(linkRoiNode(convProxies, *run2NavigationPtr));
334  ATH_CHECK(linkTrkNode(convProxies, *run2NavigationPtr));
335  ATH_CHECK(createSFNodes(convProxies, *decisionOutput, m_finalTEIdsToChains, context));
336  ATH_CHECK(updateTerminusNode(*decisionOutput, context));
337  ATH_MSG_DEBUG("Conversion done, from " << convProxies.size() << " elements to " << decisionOutput->size() << " elements");
338 
339  printProxies(convProxies, [](auto ){ return true;},
341  ATH_MSG_DEBUG("Resulting nodes");
342  size_t index = 0;
343  for ( auto o: *decisionOutput) {
344  ATH_MSG_DEBUG("Index: " << index << " " << *o);
345  index++;
346  }
347 
348  // dispose temporaries
349  for (auto proxy : convProxies)
350  {
351  delete proxy;
352  }
353 
354  return StatusCode::SUCCESS;
355 }

◆ extractTECtoChainMapping()

StatusCode Run2ToRun3TrigNavConverterV2::extractTECtoChainMapping ( TEIdToChainsMap_t allTES,
TEIdToChainsMap_t finalTEs 
) const
private

Definition at line 401 of file Run2ToRun3TrigNavConverterV2.cxx.

402 {
403 
404  ATH_CHECK(not m_configSvc->chains().empty());
405 
406  // obtain map output TE -> input TE via sequences
407  for (auto ptrChain : m_configSvc->chains())
408  {
409  std::string chainName = ptrChain->name();
410 
411 
412  if (not m_chainsToSave.empty())
413  {
414  auto found = std::find(m_chainsToSave.begin(), m_chainsToSave.end(), chainName);
415  if (found == m_chainsToSave.end())
416  {
417  continue;
418  }
419  }
420 
421  if (std::regex_match(chainName, SpecialCases::bjetMuChain )) {
422  ATH_CHECK(bjetMuChainConfigDecoder(allTEs, finalTEs, ptrChain));
423  continue;
424  }
425 
426  // hack for etcut chains
427  // if we ever need to generalise that it should be moved to separate function
428  std::map<HLT::te_id_type, HLT::te_id_type> etcutReplacementTEs;
429  auto etcutReplacement = [&etcutReplacementTEs](HLT::te_id_type in) { auto out = etcutReplacementTEs.find(in); return (out == etcutReplacementTEs.end() ? in : out->second ); };
430  if ( chainName.find("etcut") != std::string::npos ) {
431  std::set<size_t> positionsOfEtCutLegs;
432  // use heuristics to mention
433  if( std::regex_match(chainName, SpecialCases::egammaDiEtcut) ) {
434  ATH_MSG_DEBUG("EtCut chains hack, chain with two etcut legs ");
435  positionsOfEtCutLegs.insert({0, 1});
436  } else if ( std::regex_match(chainName, SpecialCases::egammaCombinedWithEtcut) ) {
437  ATH_MSG_DEBUG("EtCut chains hack, egamma chain with second etcut leg ");
438  positionsOfEtCutLegs.insert({1});
439  } else if ( std::regex_match(chainName, SpecialCases::egammaEtcut) ) {
440  ATH_MSG_DEBUG("EtCut chains hack, single leg egamma chain");
441  positionsOfEtCutLegs.insert({0});
442  }
443 
444  // pilot pass to fill the replacement map
445  std::map<size_t, HLT::te_id_type> positionToDesiredIDmap;
446  for (auto ptrHLTSignature : ptrChain->signatures()) {
447  size_t position = 0;
448  for (auto ptrHLTTE : ptrHLTSignature->outputTEs()) {
449  if (positionsOfEtCutLegs.count(position) and positionToDesiredIDmap.find(position) != positionToDesiredIDmap.end() ) {
450  etcutReplacementTEs[ptrHLTTE->id()] = positionToDesiredIDmap[position];
451  ATH_MSG_DEBUG("EtCut chains hack, TE " << ptrHLTTE->name() << " will be replaced by: " << TrigConf::HLTUtils::hash2string(positionToDesiredIDmap[position]));
452  } else {
453  if ( ptrHLTTE->name().find("calocalib") != std::string::npos and positionsOfEtCutLegs.count(position) ) { // we have final TE for this leg
454  positionToDesiredIDmap[position] = ptrHLTTE->id();
455  }
456  }
457  position++;
458  }
459  }
460  }
461 
462  // chains with a single leg
464  ATH_MSG_DEBUG(" CHAIN name " << chainName << " CHAIN Id " << chainId);
465  for (auto ptrHLTSignature : ptrChain->signatures()) {
466  for (auto ptrHLTTE : ptrHLTSignature->outputTEs()) {
467  unsigned int teId = etcutReplacement(ptrHLTTE->id());
468  allTEs[teId].insert(chainId);
469  if (ptrHLTSignature == ptrChain->signatures().back()) {
470  finalTEs[teId].insert(chainId);
471  ATH_MSG_DEBUG("TE will be used to mark final chain decision " << ptrHLTTE->name() << " chain " << chainName );
472  }
473  }
474  }
475  // chains with a multiple legs
477 
478  // dirty hacks for failing chains parsing
479  if(std::regex_match(chainName, SpecialCases::gammaXeChain))
480  multiplicities={1,1};
481 
482  if ( multiplicities.size() > 1 ) {
483  ATH_MSG_DEBUG(" this " << (is2LegTopoChain(ptrChain) ? "is": "is not") << " topological chain");
484  // the chain structure (in terms of multiplicities) may change along the way
485  // we'll assign legs only to these TEs of the steps that have identical multiplicity pattern
486  // e.g. for the chain: HLT_2g25_loose_g20 the multiplicities are: [2, 1]
487 
488  // hack for HLT.*tau.*xe.* case
489  if (std::regex_match(chainName, SpecialCases::tauXeChain)) {
490  std::vector<size_t> mult_hack; // type mismatch with ChainNameParser::multiplicities
491  if (multiplicities.size()==3) mult_hack={1,1};
492  else if (multiplicities.size()==2) mult_hack={1};
493  ptrChain->set_leg_multiplicities(mult_hack); // HLTChain needs vector<size_t>
494  }
495 
496  // hack for mu2MunoL1Special
497  if (std::regex_match(chainName, SpecialCases::mu2MunoL1Special)) {
498  std::vector<size_t> mult_hack;
499  if (multiplicities.size()==3) mult_hack={1,1};
500  else if (multiplicities.size()==2) mult_hack={2}; // HLT_mu11_nomucomb_2mu4noL1_nscan03_L1MU11_2MU6
501  ptrChain->set_leg_multiplicities(mult_hack);
502  }
503 
504  ATH_MSG_DEBUG("CHAIN " << chainName << " needs legs: " << multiplicities );
505  std::vector<unsigned int> teIdsLastHealthyStepIds;
506 
507  for (auto ptrHLTSignature : ptrChain->signatures())
508  {
509  std::vector<int> teCounts;
510  std::vector<unsigned int> teIds;
511  unsigned int lastSeenId = 0;
512  for (auto ptrHLTTE : ptrHLTSignature->outputTEs())
513  {
514  if ( lastSeenId != ptrHLTTE->id()) {
515  teCounts.push_back(1);
516  teIds.push_back(ptrHLTTE->id());
517  } else {
518  teCounts.back()++;
519  }
520  lastSeenId = ptrHLTTE->id();
521  }
522 
523  ATH_MSG_DEBUG("TE multiplicities seen in this step " << teCounts);
524  bool multiplicityCounts = multiplicities == teCounts;
525  // hack for HLT.*tau.*xe.* case
526  if(std::regex_match(chainName, SpecialCases::tauXeChain)) multiplicityCounts = true;
527  if ( multiplicityCounts ) {
528  teIdsLastHealthyStepIds = teIds;
529  ATH_MSG_DEBUG("There is a match, will assign chain leg IDs to TEs " << teCounts << " " << teIds);
530  for ( size_t legNumber = 0; legNumber < teIds.size(); ++ legNumber){
531  HLT::Identifier chainLegId = TrigCompositeUtils::createLegName(chainId, legNumber);
532  allTEs[etcutReplacement(teIds[legNumber])].insert(chainLegId);
533  }
534  }
535  }
536  for ( size_t legNumber = 0; legNumber < teIdsLastHealthyStepIds.size(); ++ legNumber ) {
537  HLT::Identifier chainLegId = TrigCompositeUtils::createLegName(chainId, legNumber);
538 
539  ATH_MSG_DEBUG("created leg id " << chainLegId << " that will replace TE ID " << etcutReplacement(teIdsLastHealthyStepIds[legNumber]));
540  finalTEs[etcutReplacement(teIdsLastHealthyStepIds[legNumber])].insert(chainLegId);
541  }
542  }
543  }
544  ATH_MSG_DEBUG("Recognised " << allTEs.size() << " kinds of TEs and among them " << finalTEs.size() << " final types");
545  return StatusCode::SUCCESS;
546 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ feaToHash()

uint64_t Run2ToRun3TrigNavConverterV2::feaToHash ( const std::vector< HLT::TriggerElement::FeatureAccessHelper > &  feaVector,
const HLT::TriggerElement te_ptr,
const HLT::TrigNavStructure navigationDecoder 
) const
private

returns true if this particular feature is to be saved (linked)

Definition at line 1431 of file Run2ToRun3TrigNavConverterV2.cxx.

1432 {
1433  // FEA vectors hashing
1434  // Filter by expected particle type based on TE name to ensure correct feature type
1435  std::string teName = TrigConf::HLTUtils::hash2string(te_ptr->getId());
1436  CLID expectedCLID = getExpectedParticleCLID(teName);
1437 
1438  ATH_MSG_VERBOSE("Calculating FEA hash for TE " << teName << " expecting CLID " << expectedCLID);
1439  uint64_t hash = 0;
1440  for (auto fea : filterFEAs(feaVector, navigationDecoder))
1441  {
1442  const auto & [sgKey, sgCLID, sgName] = getSgKey(navigationDecoder, fea);
1443 
1444  // Apply TE-based filtering during hash calculation to prevent wrong merges
1445  if (expectedCLID != 0 && sgCLID != expectedCLID)
1446  {
1447  ATH_MSG_VERBOSE("Skipping FEA with CLID " << sgCLID << " for TE " << teName
1448  << " (expected " << expectedCLID << ")");
1449  continue;
1450  }
1451 
1452  ATH_MSG_VERBOSE("Including FEA in hash CLID: " << fea.getCLID() << " te Id: " << te_ptr->getId());
1453  boost::hash_combine(hash, fea.getCLID());
1454  boost::hash_combine(hash, fea.getIndex().subTypeIndex());
1455  boost::hash_combine(hash, fea.getIndex().objectsBegin());
1456  boost::hash_combine(hash, fea.getIndex().objectsEnd());
1457  }
1458  // Include the originating TE identifier and pointer to ensure that
1459  // navigation elements stemming from different Trigger Elements do not
1460  // collapse into a single proxy even if their features are otherwise
1461  // identical. The TE ID alone is not sufficient, as multiple clones of the
1462  // same TE share the ID, so we also add the pointer value to the hash.
1463  boost::hash_combine(hash, te_ptr->getId());
1464  boost::hash_combine(hash, reinterpret_cast<std::uintptr_t>(te_ptr));
1465  ATH_MSG_VERBOSE("Obtained FEA hash " << hash);
1466  return hash;
1467 }

◆ feaToSave()

bool Run2ToRun3TrigNavConverterV2::feaToSave ( const HLT::TriggerElement::FeatureAccessHelper fea,
const std::string &  sgName 
) const
private

Definition at line 1469 of file Run2ToRun3TrigNavConverterV2.cxx.

1470 {
1471  auto iter = m_collectionsToSaveDecoded.find(fea.getCLID());
1472  if (iter != m_collectionsToSaveDecoded.end())
1473  {
1474  if ( iter->second.empty() )
1475  return true; // feature accepted for saving
1476  ATH_MSG_DEBUG("fea to save CLID: " << fea.getCLID() << ", sgName: " << sgName << " " <<iter->second.size() << " " << iter->second.empty() );
1477  return iter->second.contains(sgName);
1478  }
1479 
1480  return false;
1481 }

◆ fillRelevantFeatures()

StatusCode Run2ToRun3TrigNavConverterV2::fillRelevantFeatures ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 947 of file Run2ToRun3TrigNavConverterV2.cxx.

948 {
949  // from all FEAs of the associated TE pick those objects that are to be linked
950  for (auto &proxy : convProxies)
951  {
952  if (proxy->te != nullptr)
953  {
954  // Determine which particle type is expected based on TE name
955  // This ensures Run3 retrieves the same object types as Run2
956  std::string teName = TrigConf::HLTUtils::hash2string(proxy->te->getId());
957  CLID expectedCLID = getExpectedParticleCLID(teName);
958 
959  ATH_MSG_VERBOSE("TE " << teName << " expects CLID " << expectedCLID);
960 
961  for (const HLT::TriggerElement::FeatureAccessHelper& helper : proxy->te->getFeatureAccessHelpers())
962  {
963  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, helper);
964  if (sgKey != 0)
965  {
966  if (feaToSave(helper, sgName))
967  {
968  // If we have a specific expected CLID, only save features matching that type
969  if (expectedCLID != 0 && sgCLID != expectedCLID)
970  {
971  ATH_MSG_VERBOSE("Skipping feature with CLID " << sgCLID << " (name: " << sgName
972  << ") for TE " << teName << " because expected CLID is " << expectedCLID);
973  continue;
974  }
975  proxy->features.push_back(helper);
976  ATH_MSG_VERBOSE("Added feature with CLID " << sgCLID << " (name: " << sgName << ") for TE " << teName);
977  }
978  }
979  }
980  }
981  }
982 
983  return StatusCode::SUCCESS;
984 }

◆ fillRelevantRois()

StatusCode Run2ToRun3TrigNavConverterV2::fillRelevantRois ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 986 of file Run2ToRun3TrigNavConverterV2.cxx.

987 {
988 
989  // ordered_sorter
990  auto ordered_sorter = [&setRoiName = std::as_const(m_setRoiName)](const std::string &left, const std::string &right) -> bool
991  {
992  return std::find(cbegin(setRoiName), cend(setRoiName), left) < std::find(cbegin(setRoiName), cend(setRoiName), right);
993  };
994 
995  std::map<std::string, HLT::TriggerElement::FeatureAccessHelper, decltype(ordered_sorter)> mp(ordered_sorter);
996 
997  for (auto &proxy : convProxies)
998  {
999  // TODO need check & handling of case when there is more RoIs, now overwriting
1000  if (HLT::TrigNavStructure::getRoINodes(proxy->te).size() > 1)
1001  ATH_MSG_DEBUG("Several RoIs pointing to a proxy, taking latest one for now");
1002 
1003  mp.clear();
1004 
1005  for (const HLT::TriggerElement::FeatureAccessHelper& helper : proxy->te->getFeatureAccessHelpers())
1006  {
1007  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, helper);
1008  if (std::find(m_setRoiName.begin(), m_setRoiName.end(), sgName) == m_setRoiName.end())
1009  {
1010  // do not filter continue;
1011  continue;
1012  }
1013  mp[sgName] = helper;
1014  }
1015 
1016  std::transform(cbegin(mp), cend(mp), back_inserter(proxy->rois),
1017  [](const std::map<std::string, HLT::TriggerElement::FeatureAccessHelper>::value_type &p)
1018  { return p.second; });
1019  }
1020 
1021  // roiPropagator
1022  std::set<const ConvProxy*> visited;
1023  std::function<void(std::set<ConvProxy *> &, const std::vector<HLT::TriggerElement::FeatureAccessHelper> &)>
1024  roiPropagator = [&](std::set<ConvProxy *> &convProxyChildren, const std::vector<HLT::TriggerElement::FeatureAccessHelper> &roiParent)
1025  {
1026  for (auto &proxyChild : convProxyChildren)
1027  {
1028  if ( visited.count(proxyChild) == 1 ) {
1029  continue;
1030  }
1031  visited.insert(proxyChild);
1032  if (proxyChild->rois.empty())
1033  { // no roi update, copy from parent
1034  proxyChild->rois = roiParent;
1035  if (proxyChild->children.empty() == false)
1036  {
1037  roiPropagator(proxyChild->children, roiParent);
1038  }
1039  }
1040  }
1041  };
1042 
1043  for (auto &proxy : convProxies)
1044  {
1045  roiPropagator(proxy->children, proxy->rois);
1046  }
1047 
1048  return StatusCode::SUCCESS;
1049 }

◆ fillRelevantTracks()

StatusCode Run2ToRun3TrigNavConverterV2::fillRelevantTracks ( ConvProxySet_t convProxies) const
private

Definition at line 1051 of file Run2ToRun3TrigNavConverterV2.cxx.

1052 {
1053  for (auto &proxy : convProxies)
1054  {
1055  for (const HLT::TriggerElement::FeatureAccessHelper& helper : proxy->te->getFeatureAccessHelpers())
1056  {
1057  if (helper.getCLID() == m_TrackParticleContainerCLID || helper.getCLID() == m_TauTrackContainerCLID)
1058  {
1059  proxy->tracks.push_back(helper);
1060  }
1061  }
1062  }
1063 
1064  return StatusCode::SUCCESS;
1065 }

◆ filterFEAs()

std::vector< HLT::TriggerElement::FeatureAccessHelper > Run2ToRun3TrigNavConverterV2::filterFEAs ( const std::vector< HLT::TriggerElement::FeatureAccessHelper > &  feaVector,
const HLT::TrigNavStructure navigationDecoder 
) const
private

< both method skip TrigPassBits

Definition at line 1409 of file Run2ToRun3TrigNavConverterV2.cxx.

1409  {
1410  std::vector<HLT::TriggerElement::FeatureAccessHelper> out;
1411  for (auto fea : feaVector)
1412  {
1413  if (feaToSkip(fea))
1414  {
1415  ATH_MSG_VERBOSE("Skipping in FEA hash calculation");
1416  continue;
1417  }
1418 
1419  auto [sgKey, sgCLID, sgName] = getSgKey(navigationDecoder, fea);
1420 
1421  if (sgKey == 0)
1422  {
1423  ATH_MSG_VERBOSE("Skipping unrecorded (missing in SG) FEA hash calculation - name in SG: " << sgName << " FEA " << fea);
1424  continue;
1425  }
1426  out.push_back(fea);
1427  }
1428  return out;
1429 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ finalize()

StatusCode Run2ToRun3TrigNavConverterV2::finalize ( )
overridevirtual

Definition at line 248 of file Run2ToRun3TrigNavConverterV2.cxx.

249 {
250  return StatusCode::SUCCESS;
251 }

◆ getExpectedParticleCLID()

CLID Run2ToRun3TrigNavConverterV2::getExpectedParticleCLID ( const std::string &  teName) const
private

Helper function to determine expected particle CLID based on TE name Returns 0 if no specific type is expected (e.g., for non-physics TEs)

Definition at line 1633 of file Run2ToRun3TrigNavConverterV2.cxx.

1634 {
1635  // Determine which particle type is expected based on TE name
1636  // This mimics the logic from IParticleRetrievalTool::getEGammaTEType()
1637  // to ensure Run3 retrieves the same object types as Run2
1638 
1639  // For egamma TEs, check for specific patterns
1640  if (teName.find("etcut") != std::string::npos &&
1641  teName.find("trkcut") == std::string::npos) {
1642  // etcut chains (without trkcut) use CaloCluster
1644  }
1645  else if (teName.rfind("EF_e", 0) == 0) {
1646  // TE name starts with "EF_e" -> Electron
1647  return m_ElectronContainerCLID;
1648  }
1649  else if (teName.rfind("EF_g", 0) == 0) {
1650  // TE name starts with "EF_g" -> Photon
1651  return m_PhotonContainerCLID;
1652  }
1653  else if (teName.rfind("EF_mu", 0) == 0 || teName.find("_mu") != std::string::npos) {
1654  // Muon TEs
1655  return m_MuonContainerCLID;
1656  }
1657  else if (teName.rfind("EF_tau", 0) == 0 || teName.find("_tau") != std::string::npos) {
1658  // Tau TEs
1659  return m_TauJetContainerCLID;
1660  }
1661 
1662  // For non-physics TEs or TEs where we don't have a specific expectation,
1663  // return 0 to indicate all features should be saved
1664  return 0;
1665 }

◆ getFeaSize()

std::size_t Run2ToRun3TrigNavConverterV2::getFeaSize ( const ConvProxy proxy) const
private

Definition at line 1242 of file Run2ToRun3TrigNavConverterV2.cxx.

1243 {
1244  size_t feaCount{0};
1245  if (proxy.features.empty())
1246  { // no features
1247  ++feaCount;
1248  }
1249  for (const auto &fea : proxy.features)
1250  {
1251  if (fea.getIndex().objectsBegin() == fea.getIndex().objectsEnd())
1252  {
1253  ++feaCount;
1254  }
1255  for (auto n = fea.getIndex().objectsBegin(); n < fea.getIndex().objectsEnd(); ++n)
1256  {
1257  ++feaCount;
1258  }
1259  }
1260  // 1 means a deafult H node created is enough, no need to expand H nodes
1261  return feaCount;
1262 }

◆ getHighestPtObject()

std::pair< std::size_t, std::size_t > Run2ToRun3TrigNavConverterV2::getHighestPtObject ( const ConvProxy proxy,
const HLT::TrigNavStructure run2Nav 
) const
private

Return pair of indices (feature index in proxy->features vector, object index) identifying the highest pT object attached to the proxy.

If retrieval fails returns {std::numeric_limits<size_t>::max(), 0}.

Definition at line 1592 of file Run2ToRun3TrigNavConverterV2.cxx.

1594 {
1595  std::size_t bestFea = std::numeric_limits<std::size_t>::max();
1596  std::size_t bestObj = 0;
1597  float bestPt = -1.0;
1598 
1599  for (std::size_t i = 0; i < proxy.features.size(); ++i) {
1600  const auto& fea = proxy.features[i];
1601  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, fea);
1602  if (!feaToSave(fea, sgName)) {
1603  continue;
1604  }
1605  if (sgKey == 0) continue;
1606  const std::string* keyStr = evtStore()->keyToString(sgKey, sgCLID);
1607  if (!keyStr) continue;
1608  const xAOD::IParticleContainer* cont = nullptr;
1609  if (evtStore()->retrieve(cont, *keyStr).isFailure()) continue;
1610  for (auto n = fea.getIndex().objectsBegin(); n < fea.getIndex().objectsEnd(); ++n) {
1611  if (n >= cont->size()) continue;
1612  const xAOD::IParticle* p = (*cont)[n];
1613  if (!p) continue;
1614  if (p->pt() > bestPt) {
1615  bestPt = p->pt();
1616  bestFea = i;
1617  bestObj = n;
1618  }
1619  }
1620  }
1621  if (bestFea == std::numeric_limits<std::size_t>::max()) {
1622  for (std::size_t i = 0; i < proxy.features.size(); ++i) {
1623  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, proxy.features[i]);
1624  if (!feaToSave(proxy.features[i], sgName)) continue;
1625  bestFea = i;
1626  bestObj = proxy.features[i].getIndex().objectsBegin();
1627  break;
1628  }
1629  }
1630  return {bestFea, bestObj};
1631 }

◆ getSgKey()

std::tuple< uint32_t, CLID, std::string > Run2ToRun3TrigNavConverterV2::getSgKey ( const HLT::TrigNavStructure navigationDecoder,
const HLT::TriggerElement::FeatureAccessHelper helper 
) const
private

Definition at line 1560 of file Run2ToRun3TrigNavConverterV2.cxx.

1561 {
1562  const std::string hltLabel = navigationDecoder.label(helper.getCLID(), helper.getIndex().subTypeIndex());
1563 
1564  const CLID saveCLID = [&](const CLID &clid)
1565  {
1566  if (clid == m_roIDescriptorCLID)
1568  if (clid == m_TrigEMClusterCLID)
1570  if (clid == m_TrigRingerRingsCLID)
1572  return clid;
1573  }(helper.getCLID());
1574 
1575  std::string type_name;
1576  if (m_clidSvc->getTypeNameOfID(saveCLID, type_name).isFailure())
1577  {
1578  return {0, 0, ""};
1579  }
1580 
1581  const auto sgStringKey = HLTNavDetails::formatSGkey("HLT", type_name, hltLabel);
1582  const bool isAvailable = evtStore()->contains(saveCLID, sgStringKey);
1583  ATH_MSG_DEBUG(" Objects presence " << helper << " " << sgStringKey << (isAvailable ? " present" : " absent"));
1584  if (!isAvailable)
1585  {
1586  return {0, saveCLID, ""};
1587  }
1588 
1589  return {evtStore()->stringToKey(sgStringKey, saveCLID), saveCLID, hltLabel}; // sgKey, sgCLID, sgName
1590 }

◆ initialize()

StatusCode Run2ToRun3TrigNavConverterV2::initialize ( )
overridevirtual

Definition at line 154 of file Run2ToRun3TrigNavConverterV2.cxx.

155 {
156  ATH_CHECK(m_trigOutputNavKey.initialize());
157  ATH_CHECK(m_tdt.empty() != m_trigNavKey.key().empty()); // either of the two has to be enabled but not both
158  if (!m_tdt.empty())
159  {
160  ATH_CHECK(m_tdt.retrieve());
161  ATH_MSG_INFO("Will use Trigger Navigation from TrigDecisionTool");
162  }
163  else
164  {
166  ATH_MSG_INFO("Will use Trigger Navigation decoded from TrigNavigation object");
167  }
168 
169  if (!m_chainsToSave.empty()) {
170  ATH_MSG_DEBUG("Will only save features for these chains " << m_chainsToSave);
171  }
172 
173  ATH_CHECK(m_configSvc.retrieve());
174  ATH_CHECK(m_clidSvc.retrieve());
175 
176  // configured collections can be either just type name, or type#key
177  // decoding takes this into account, if only the type is configured then empty string is places in the decoded lookup map
178  // else CLID + a name is placed
179 
180  for (const auto &name : m_collectionsToSave)
181  {
182  std::string typeName = name;
183  std::string collName;
184  size_t delimeterIndex = name.find('#');
185  if (delimeterIndex != std::string::npos)
186  {
187  typeName = name.substr(0, delimeterIndex);
188  collName = name.substr(delimeterIndex + 1);
189  }
190  CLID id{0};
191  ATH_CHECK(m_clidSvc->getIDOfTypeName(typeName, id));
192  ATH_MSG_DEBUG("Will be linking collection type " << typeName << " name (empty==all) " << collName);
193  if ( collName.empty() )
194  m_collectionsToSaveDecoded[id]; // creates empty set
195  else
196  m_collectionsToSaveDecoded[id].insert(collName);
197  }
198 
199  for (const auto &name : m_roisToSave)
200  {
201  m_setRoiName.push_back(name);
202  }
203 
204  // sanity check, i.e. if there is at least one entry w/o the coll name no other entries are needed for a given clid
205  for (auto [clid, keysSet] : m_collectionsToSaveDecoded)
206  {
207  if (keysSet.size() > 1 and keysSet.count("") != 0)
208  {
209  ATH_MSG_ERROR("Bad configuration for CLID " << clid << " requested saving of all (empty coll name configures) collections, yet there are also specific keys");
210  return StatusCode::FAILURE;
211  }
212 
213  }
214 
215  bool anyChainBad=false;
216  for ( auto chain: m_chainsToSave ) {
217  if ( chain.find('*') != std::string::npos or chain.find('|') != std::string::npos ) {
218  ATH_MSG_ERROR("Supplied chain name: " << chain << " contains wildcard characters, this is not supported by the conversion tool");
219  anyChainBad=true;
220  }
221  }
222  if ( anyChainBad ) {
223  ATH_MSG_ERROR("Supplied chain names contain wildcard characters, this is not supported by the conversion tool");
224  return StatusCode::FAILURE;
225  }
226  if ( m_chainsToSave.empty() ) {
227  ATH_MSG_INFO("No chains list supplied, the conversion will occur for all chains");
228  }
229 
230  ATH_CHECK(m_clidSvc->getIDOfTypeName("TrigRoiDescriptor", m_roIDescriptorCLID));
231  ATH_CHECK(m_clidSvc->getIDOfTypeName("TrigRoiDescriptorCollection", m_roIDescriptorCollectionCLID));
232  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TrigRingerRings", m_TrigRingerRingsCLID));
233  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TrigRingerRingsContainer", m_TrigRingerRingsContainerCLID));
234  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TrigEMCluster", m_TrigEMClusterCLID));
235  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TrigEMClusterContainer", m_TrigEMClusterContainerCLID));
236  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::CaloCluster", m_CaloClusterCLID));
237  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::CaloClusterContainer", m_CaloClusterContainerCLID));
238  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TrackParticleContainer", m_TrackParticleContainerCLID));
239  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TauTrackContainer", m_TauTrackContainerCLID));
240  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::ElectronContainer", m_ElectronContainerCLID));
241  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::PhotonContainer", m_PhotonContainerCLID));
242  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::MuonContainer", m_MuonContainerCLID));
243  ATH_CHECK(m_clidSvc->getIDOfTypeName("xAOD::TauJetContainer", m_TauJetContainerCLID));
244 
245  return StatusCode::SUCCESS;
246 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ is2LegTopoChain()

size_t Run2ToRun3TrigNavConverterV2::is2LegTopoChain ( const TrigConf::HLTChain ptrChain) const
private

Definition at line 357 of file Run2ToRun3TrigNavConverterV2.cxx.

357  {
358  // chains of configs structure
359  // A B
360  // \/
361  // C
362  // where C is the output TE of sequence consuming A & B
363  // sometimes there are an additional leafs
364  // C
365  // |
366  // D
367  if ( not std::regex_match(ptrChain->name(), SpecialCases::isTopo) ) return 0;
368  size_t stepToConsider = 0;
369  const size_t sigsSize = ptrChain->signatures().size();
370  if ( sigsSize < 2 ) return 0;
371  for ( size_t step = sigsSize-1; step > 1; step --) {
372  if ( (ptrChain->signatures()[step-1])->outputTEs().size() == 2 and (ptrChain->signatures()[step])->outputTEs().size() == 1 ) {
373  stepToConsider = step;
374  break;
375  }
376  }
377  if ( stepToConsider == 0 ) return 0; // not a topo
378 
379  //counting is right, need to see now if TEs are connected
380  auto finalTE = (ptrChain->signatures()[stepToConsider])->outputTEs()[0];
381  auto preFinalTEs = (ptrChain->signatures()[stepToConsider-1])->outputTEs();
382 
383  auto finalSeq = m_configSvc->sequences().getSequence(finalTE->id());
384  std::set<HLT::te_id_type> tesInSeq;
385  std::set<HLT::te_id_type> tesInChain;
386 
387  for ( auto te: finalSeq->inputTEs()) {
388  tesInSeq.insert(te->id());
389  }
390 
391  for ( auto te: preFinalTEs) {
392  tesInChain.insert(te->id());
393  }
394 
395  if (tesInSeq == tesInChain) {
396  return stepToConsider;
397  }
398  return 0;
399 }

◆ isClonable()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ linkFeaNode()

StatusCode Run2ToRun3TrigNavConverterV2::linkFeaNode ( ConvProxySet_t convProxies,
xAOD::TrigCompositeContainer decisions,
const HLT::TrigNavStructure run2Nav,
const EventContext &  context 
) const
private

Definition at line 1264 of file Run2ToRun3TrigNavConverterV2.cxx.

1265 {
1266  // from all FEAs of the associated TE pick those objects that are to be linked
1267  for (const auto &proxy : convProxies)
1268  {
1269  auto [bestFeaIdx, bestObjIdx] = getHighestPtObject(*proxy, run2Nav);
1270 
1271  auto feaN = getFeaSize(*proxy);
1272  if (feaN > 1)
1273  { // expand for more H nodes and connect them
1274  while (--feaN)
1275  {
1277  for (auto chainId : proxy->passChains) // adding hash values of active chains to expanded H nodes
1278  {
1279  TrigCompositeUtils::addDecisionID(chainId, proxy->hNode.back());
1280  }
1281  // connecting to upeer IM node
1282  TrigCompositeUtils::linkToPrevious(proxy->hNode.back(), proxy->imNode, context); // H low IM up
1283  // connecting created H to IM in children proxies
1284  for (auto &childProxy : proxy->children)
1285  {
1286  TrigCompositeUtils::linkToPrevious(childProxy->imNode, proxy->hNode.back(), context); // IM child H up (just created))
1287  }
1288  }
1289  }
1290 
1291  if (proxy->features.empty())
1292  { // no features attached, self link
1294  proxy->hNode.front()->setObjectLink<xAOD::TrigCompositeContainer>(TrigCompositeUtils::featureString(), linkToSelf);
1295  }
1296 
1297  auto hNodeIter = proxy->hNode.begin();
1298  for (std::size_t feaIdx = 0; feaIdx < proxy->features.size(); ++feaIdx)
1299  {
1300  auto &fea = proxy->features[feaIdx];
1301  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, fea);
1302  // link to itself when lined collection has size 0
1303  if (fea.getIndex().objectsBegin() == fea.getIndex().objectsEnd())
1304  {
1306  (*hNodeIter)->setObjectLink<xAOD::TrigCompositeContainer>(TrigCompositeUtils::featureString(), linkToSelf);
1307  ++hNodeIter;
1308  }
1309  for (auto n = fea.getIndex().objectsBegin(); n < fea.getIndex().objectsEnd(); ++n)
1310  {
1311  // connecting feature or subfeature
1312  const std::string& linkName = (feaIdx == bestFeaIdx && n == bestObjIdx) ?
1313  TrigCompositeUtils::featureString() : "subfeature";
1314  (*hNodeIter)->typelessSetObjectLink(linkName, sgKey, sgCLID, n, n + 1);
1315  ++hNodeIter;
1316  }
1317  }
1318  }
1319 
1320  return StatusCode::SUCCESS;
1321 }

◆ linkRoiNode()

StatusCode Run2ToRun3TrigNavConverterV2::linkRoiNode ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 1323 of file Run2ToRun3TrigNavConverterV2.cxx.

1324 {
1325  // from all Rois of the associated TE pick those objects that are to be linked
1326  for (auto &proxy : convProxies)
1327  {
1328  for (auto &roi : proxy->rois)
1329  {
1330  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, roi);
1331  if (proxy->l1Node)
1332  {
1333  proxy->l1Node->typelessSetObjectLink(TrigCompositeUtils::initialRoIString(), sgKey, sgCLID, roi.getIndex().objectsBegin());
1334  }
1335  if (proxy->rois.empty() == false)
1336  {
1337  proxy->imNode->typelessSetObjectLink(TrigCompositeUtils::roiString(), sgKey, sgCLID, roi.getIndex().objectsBegin());
1338  }
1339  }
1340  }
1341 
1342  return StatusCode::SUCCESS;
1343 }

◆ linkTrkNode()

StatusCode Run2ToRun3TrigNavConverterV2::linkTrkNode ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 1345 of file Run2ToRun3TrigNavConverterV2.cxx.

1346 {
1347  for (auto &proxy : convProxies)
1348  {
1349  for (auto &trk : proxy->tracks)
1350  {
1351  if (proxy->imNode->hasObjectLink(TrigCompositeUtils::roiString()))
1352  {
1353  try
1354  {
1356  if (ROIElementLink.isValid())
1357  {
1359  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, trk);
1360  if (sgCLID == m_TrackParticleContainerCLID || sgCLID == m_TauTrackContainerCLID)
1361  {
1362  const char *tName = sgCLID == m_TrackParticleContainerCLID ? "TEMP_TRACKS" : "TEMP_TAU_TRACKS";
1363  auto d = std::make_unique<TrigCompositeUtils::Decision>();
1364  d->makePrivateStore();
1365  d->typelessSetObjectLink(tName, sgKey, sgCLID, trk.getIndex().objectsBegin());
1366  if (sgCLID == m_TrackParticleContainerCLID)
1367  {
1368  for (const ElementLink<xAOD::TrackParticleContainer> &track : d->objectCollectionLinks<xAOD::TrackParticleContainer>(tName))
1369  {
1370  if (track.isValid())
1371  {
1372  const xAOD::TrackParticle *t = *track;
1373  viewBookkeeper(*t) = ROIElementLink;
1374  }
1375  }
1376  }
1377  if (m_includeTauTrackFeatures == false && sgCLID == m_TauTrackContainerCLID)
1378  {
1379  for (const ElementLink<xAOD::TauTrackContainer> &track : d->objectCollectionLinks<xAOD::TauTrackContainer>(tName))
1380  {
1381  if (track.isValid())
1382  {
1383  const xAOD::TauTrack_v1 *t = *track;
1384  viewBookkeeper(*t) = ROIElementLink;
1385  }
1386  }
1387  }
1388  }
1389  }
1390  } catch (SG::ExcBadForwardLink&) {
1391  ATH_MSG_WARNING("Unable to create an ElementLink into a container with no entries");
1392  }
1393  }
1394  }
1395  }
1396 
1397  return StatusCode::SUCCESS;
1398 }

◆ mirrorTEsStructure()

StatusCode Run2ToRun3TrigNavConverterV2::mirrorTEsStructure ( ConvProxySet_t convProxies,
const HLT::TrigNavStructure run2Nav 
) const
private

Definition at line 587 of file Run2ToRun3TrigNavConverterV2.cxx.

588 {
589 
590  // iterate over the TEs, for each make the ConvProxy and build connections
591  std::map<const HLT::TriggerElement *, ConvProxy *> teToProxy;
592  ATH_MSG_DEBUG("TrigNavStructure with " << run2Nav.getAllTEs().size() << " TEs acquired");
593  for (auto te : run2Nav.getAllTEs())
594  {
595  // skip event seed node
597  continue;
598  auto proxy = new ConvProxy(te);
599  convProxies.insert(proxy);
600  teToProxy[te] = proxy;
601  // add linking
602  for (auto predecessor : HLT::TrigNavStructure::getDirectPredecessors(te))
603  {
604  ConvProxy *predecessorProxy = teToProxy[predecessor];
605  if (predecessorProxy != nullptr)
606  { // because we skip some
607  proxy->parents.insert(predecessorProxy);
608  predecessorProxy->children.insert(proxy);
609  }
610  }
611  }
612 
613  if (m_doSelfValidation)
614  {
615  int counter = -1;
616  for (auto proxy : convProxies)
617  {
618  counter++;
619  ATH_MSG_DEBUG("Proxy " << counter << " " << proxy->description() << "ptr " << proxy);
620  for (auto p : proxy->children)
621  ATH_MSG_DEBUG("Child ptr " << p);
622  for (auto p : proxy->parents)
623  ATH_MSG_DEBUG("Parent ptr " << p);
624 
625  for (auto p : proxy->parents)
626  {
627  for (auto pp : p->parents)
628  {
629  if (pp == proxy)
630  {
631  ATH_MSG_WARNING("Weird, proxy is in parents list of parents");
632  }
633  }
634  }
635  for (auto c : proxy->children)
636  {
637  for (auto cc : c->children)
638  {
639  if (cc == proxy)
640  {
641  ATH_MSG_WARNING("Weird, proxy is in children list of children");
642  }
643  }
644  }
645  }
646  }
647 
648  ATH_MSG_DEBUG("Created " << convProxies.size() << " proxy objects");
649  return StatusCode::SUCCESS;
650 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ noUnconnectedHNodes()

StatusCode Run2ToRun3TrigNavConverterV2::noUnconnectedHNodes ( const xAOD::TrigCompositeContainer decisions) const
private

Definition at line 1530 of file Run2ToRun3TrigNavConverterV2.cxx.

1531 {
1532  // build map of all links to H nodes from IMs and FS
1533  std::set<const TrigCompositeUtils::Decision *> linkedHNodes;
1534  for (auto d : decisions)
1535  {
1536  if (d->name() == "IM" or d->name() == "FS")
1537  {
1538  for (auto el : TCU::getLinkToPrevious(d))
1539  {
1540  linkedHNodes.insert(*el); // dereferences to bare pointer
1541  }
1542  }
1543  }
1544  for (auto d : decisions)
1545  {
1546  if (d->name() == "H")
1547  {
1548  if (linkedHNodes.count(d) == 0)
1549  {
1550  ATH_MSG_ERROR("Orphaned H node");
1551  return StatusCode::FAILURE;
1552  }
1553  }
1554  }
1555  ATH_MSG_DEBUG("CHECK OK, all H modes are connected");
1556 
1557  return StatusCode::SUCCESS;
1558 }

◆ numberOfHNodesPerProxyNotExcessive()

StatusCode Run2ToRun3TrigNavConverterV2::numberOfHNodesPerProxyNotExcessive ( const ConvProxySet_t ) const
private

Definition at line 1524 of file Run2ToRun3TrigNavConverterV2.cxx.

1525 {
1526  ATH_MSG_DEBUG("CHECK OK, no excessive number of H nodes per proxy");
1527  return StatusCode::SUCCESS;
1528 }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printProxies()

void Run2ToRun3TrigNavConverterV2::printProxies ( const ConvProxySet_t proxies,
std::function< bool(const ConvProxy *)>  selector = [](const ConvProxy*){return true;},
const std::vector< std::function< void(const ConvProxy *)>> &  printers = {} 
) const
private

Definition at line 653 of file Run2ToRun3TrigNavConverterV2.cxx.

655  {
656  ATH_MSG_DEBUG("Printing proxies");
657  ATH_MSG_DEBUG("" );
658  for ( auto p: proxies) {
659  if ( selector(p) ){
660  ATH_MSG_DEBUG("Proxy " << p->description() );
661  for (auto& printer: printers) {
662  printer(p);
663  }
664  ATH_MSG_DEBUG("" );
665  }
666  }
667 }

◆ removeTopologicalProxies()

StatusCode Run2ToRun3TrigNavConverterV2::removeTopologicalProxies ( ConvProxySet_t convProxies) const
private

Definition at line 920 of file Run2ToRun3TrigNavConverterV2.cxx.

921 {
922  for (auto i = std::begin(convProxies); i != std::end(convProxies);)
923  {
924  if ((*i)->parents.size() > 1)
925  {
926  ConvProxy *toDel = *i;
927  // remove it from parents/children
928  for (auto parent : toDel->parents)
929  {
930  parent->children.erase(toDel);
931  }
932  for (auto child : toDel->children)
933  {
934  child->parents.erase(toDel);
935  }
936  delete toDel;
937  i = convProxies.erase(i);
938  }
939  else
940  {
941  ++i;
942  }
943  }
944  return StatusCode::SUCCESS;
945 }

◆ removeUnassociatedProxies()

StatusCode Run2ToRun3TrigNavConverterV2::removeUnassociatedProxies ( ConvProxySet_t convProxies) const
private

Definition at line 734 of file Run2ToRun3TrigNavConverterV2.cxx.

735 {
736  // remove proxies that have no chains
737  for (auto i = std::begin(convProxies); i != std::end(convProxies);)
738  {
739  if ((*i)->runChains.empty())
740  {
741  ConvProxy *toDel = *i;
742  // remove it from parents/children
743  for (auto parent : toDel->parents)
744  {
745  parent->children.erase(toDel);
746  }
747  for (auto child : toDel->children)
748  {
749  child->parents.erase(toDel);
750  }
751  delete toDel;
752  i = convProxies.erase(i);
753  }
754  else
755  {
756  ++i;
757  }
758  }
759  ATH_MSG_DEBUG("After eliminating proxies not associated to chainsof intereset left with " << convProxies.size());
760  return StatusCode::SUCCESS;
761 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ roiToSave()

bool Run2ToRun3TrigNavConverterV2::roiToSave ( const HLT::TrigNavStructure run2Nav,
const HLT::TriggerElement::FeatureAccessHelper fea 
) const
private

Definition at line 1485 of file Run2ToRun3TrigNavConverterV2.cxx.

1486 {
1487  auto [sgKey, sgCLID, sgName] = getSgKey(run2Nav, roi);
1488  if (std::find(m_setRoiName.begin(), m_setRoiName.end(), sgName) != m_setRoiName.end())
1489  {
1490  return true;
1491  }
1492 
1493  return false;
1494 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateTerminusNode()

StatusCode Run2ToRun3TrigNavConverterV2::updateTerminusNode ( xAOD::TrigCompositeContainer decisions,
const EventContext &  context 
) const
private

Definition at line 1170 of file Run2ToRun3TrigNavConverterV2.cxx.

1171 {
1172  // Check that only ChainIDs (not LegIDs) are present in the terminus "HLTPassRaw" node.
1173  // Check that only chains which pass the event are included.
1174  TCU::Decision* terminus = decisions.at(0);
1175  ATH_CHECK( terminus->name() == TCU::summaryPassNodeName() );
1176  TCU::DecisionIDContainer currentIDs;
1177  TCU::DecisionIDContainer filteredIDs;
1178  TCU::decisionIDs(terminus, currentIDs); // Extract, std::vector -> std::set
1179  for (const TCU::DecisionID id : currentIDs)
1180  {
1181  const TCU::DecisionID idToCheck = ( TCU::isLegId(id) ? TCU::getIDFromLeg( HLT::Identifier(id) ).numeric() : id );
1182  const std::string chainName = HLT::Identifier(idToCheck).name();
1183  // Sanity check
1184  if (!m_chainsToSave.empty())
1185  {
1186  if (std::find(m_chainsToSave.begin(), m_chainsToSave.end(), chainName) == m_chainsToSave.end())
1187  {
1188  ATH_MSG_ERROR("Navigation information for chain " << chainName << " in "
1189  << TCU::summaryPassNodeName() << " but this chain wasn't on the list of chains to save");
1190  return StatusCode::FAILURE;
1191  }
1192  }
1193  if (m_tdt->isPassed(chainName))
1194  {
1195  filteredIDs.insert(idToCheck);
1196  }
1197  }
1198  terminus->setDecisions( std::vector<TCU::DecisionID>() ); // decisions.clear(), but via the xAOD setter function
1199  TCU::insertDecisionIDs(filteredIDs, terminus); // Insert, std::set -> std::vector
1200  ATH_MSG_VERBOSE("After filtering out leg IDs and checking isPassed, "
1201  "the terminus node goes from " << currentIDs.size() << " to " << filteredIDs.size() << " chain IDs.");
1202  if (msgLvl(MSG::VERBOSE))
1203  {
1204  for (const TCU::DecisionID id : filteredIDs)
1205  {
1206  ATH_MSG_VERBOSE(" -- Retained passing ID: " << HLT::Identifier(id));
1207  }
1208  }
1209  return StatusCode::SUCCESS;
1210 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_allTEIdsToChains

TEIdToChainsMap_t Run2ToRun3TrigNavConverterV2::m_allTEIdsToChains
private

Definition at line 98 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_CaloClusterCLID

CLID Run2ToRun3TrigNavConverterV2::m_CaloClusterCLID {0}
private

Definition at line 187 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_CaloClusterContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_CaloClusterContainerCLID {0}
private

Definition at line 188 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_chainIdsPrinter

std::function<void(const ConvProxy*)> Run2ToRun3TrigNavConverterV2::m_chainIdsPrinter = [&](const ConvProxy* p){ for (auto id: p->passChains ) ATH_MSG_DEBUG("chain id " << id); }
private

Definition at line 150 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_chainsToSave

Gaudi::Property<std::vector<std::string> > Run2ToRun3TrigNavConverterV2::m_chainsToSave {this, "Chains", {}, "If not specified, all chains are handled"}
private

Definition at line 90 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_clidSvc

ServiceHandle<IClassIDSvc> Run2ToRun3TrigNavConverterV2::m_clidSvc {this, "ClassIDSvc", "ClassIDSvc", "Service to translate CLID to class name"}
private

Definition at line 83 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_collectionsToSave

Gaudi::Property<std::vector<std::string> > Run2ToRun3TrigNavConverterV2::m_collectionsToSave {this, "Collections", {}}
private

Definition at line 91 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_collectionsToSaveDecoded

std::map<CLID, std::set<std::string> > Run2ToRun3TrigNavConverterV2::m_collectionsToSaveDecoded
private

Definition at line 177 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_configSvc

ServiceHandle<TrigConf::IHLTConfigSvc> Run2ToRun3TrigNavConverterV2::m_configSvc {this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc", "Trigger configuration service"}
private

Definition at line 82 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_configUpdateMutex

std::mutex Run2ToRun3TrigNavConverterV2::m_configUpdateMutex
mutableprivate

Definition at line 97 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doCompression

Gaudi::Property<bool> Run2ToRun3TrigNavConverterV2::m_doCompression {this, "doCompression", false, "Collapse navigation elements to save ouput space"}
private

Definition at line 86 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_doLinkFeatures

Gaudi::Property<bool> Run2ToRun3TrigNavConverterV2::m_doLinkFeatures {this, "doLinkFeatures", true, "Add links to objects, setting it false makes sense when running tests"}
private

Definition at line 87 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_doSelfValidation

Gaudi::Property<bool> Run2ToRun3TrigNavConverterV2::m_doSelfValidation {this, "doSelfValidation", false, "Run consistency checks after stages of conversion (slows down the alg)"}
private

Definition at line 85 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_ElectronContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_ElectronContainerCLID {0}
private

Definition at line 191 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_finalTEIdsToChains

TEIdToChainsMap_t Run2ToRun3TrigNavConverterV2::m_finalTEIdsToChains
private

Definition at line 98 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_hNodesPerProxyThreshold

Gaudi::Property<size_t> Run2ToRun3TrigNavConverterV2::m_hNodesPerProxyThreshold {this, "hNodesPerProxyThreshhold", 15, "Limit number of H nodes per TE (if exceeded conversion results in an error)"}
private

Definition at line 89 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_includeTauTrackFeatures

Gaudi::Property<bool> Run2ToRun3TrigNavConverterV2::m_includeTauTrackFeatures {this, "addTauTracks", false, "Add Tau Track collection as feature element"}
private

Definition at line 88 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_MuonContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_MuonContainerCLID {0}
private

Definition at line 193 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_PhotonContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_PhotonContainerCLID {0}
private

Definition at line 192 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_roIDescriptorCLID

CLID Run2ToRun3TrigNavConverterV2::m_roIDescriptorCLID {0}
private

Definition at line 181 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_roIDescriptorCollectionCLID

CLID Run2ToRun3TrigNavConverterV2::m_roIDescriptorCollectionCLID {0}
private

Definition at line 182 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_roisToSave

Gaudi::Property<std::vector<std::string> > Run2ToRun3TrigNavConverterV2::m_roisToSave {this, "Rois", {}}
private

Definition at line 92 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_setRoiName

std::vector<std::string> Run2ToRun3TrigNavConverterV2::m_setRoiName
private

Definition at line 179 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TauJetContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_TauJetContainerCLID {0}
private

Definition at line 194 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TauTrackContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_TauTrackContainerCLID {0}
private

Definition at line 190 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_tdt

PublicToolHandle<Trig::TrigDecisionTool> Run2ToRun3TrigNavConverterV2::m_tdt {this, "TrigDecisionTool", "", "When enabled read navigation from TDT/off by default"}
private

Definition at line 81 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_teIDPrinter

std::function<void(const ConvProxy*)> Run2ToRun3TrigNavConverterV2::m_teIDPrinter = [&](const ConvProxy* p){ ATH_MSG_DEBUG("TE id " << TrigConf::HLTUtils::hash2string(p->te->getId())); }
private

Definition at line 151 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TrackParticleContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_TrackParticleContainerCLID {0}
private

Definition at line 189 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TrigEMClusterCLID

CLID Run2ToRun3TrigNavConverterV2::m_TrigEMClusterCLID {0}
private

Definition at line 185 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TrigEMClusterContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_TrigEMClusterContainerCLID {0}
private

Definition at line 186 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_trigNavKey

SG::ReadHandleKey<xAOD::TrigNavigation> Run2ToRun3TrigNavConverterV2::m_trigNavKey {this, "TrigNavReadKey", "TrigNavigation"}
private

Definition at line 80 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_trigOutputNavKey

SG::WriteHandleKey<xAOD::TrigCompositeContainer> Run2ToRun3TrigNavConverterV2::m_trigOutputNavKey {this, "OutputNavKey", "HLTNav_R2ToR3Summary"}
private

Definition at line 94 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TrigRingerRingsCLID

CLID Run2ToRun3TrigNavConverterV2::m_TrigRingerRingsCLID {0}
private

Definition at line 183 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_TrigRingerRingsContainerCLID

CLID Run2ToRun3TrigNavConverterV2::m_TrigRingerRingsContainerCLID {0}
private

Definition at line 184 of file Run2ToRun3TrigNavConverterV2.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
Run2ToRun3TrigNavConverterV2::fillRelevantTracks
StatusCode fillRelevantTracks(ConvProxySet_t &convProxies) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1051
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
operator<
bool operator<(const DataVector< T > &a, const DataVector< T > &b)
Vector ordering relation.
TrigCompositeUtils::featureString
const std::string & featureString()
Definition: TrigCompositeUtils.h:421
createLinkingScheme.iter
iter
Definition: createLinkingScheme.py:62
Run2ToRun3TrigNavConverterV2::m_roIDescriptorCLID
CLID m_roIDescriptorCLID
Definition: Run2ToRun3TrigNavConverterV2.h:181
SpecialCases::mu2MunoL1Special
const std::regex mu2MunoL1Special
Definition: SpecialCases.h:37
Run2ToRun3TrigNavConverterV2::collapseProxies
StatusCode collapseProxies(ConvProxySet_t &, MAP &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:779
Run2ToRun3TrigNavConverterV2::m_trigNavKey
SG::ReadHandleKey< xAOD::TrigNavigation > m_trigNavKey
Definition: Run2ToRun3TrigNavConverterV2.h:80
TrigConf::TrigConfData::name
const std::string & name() const
Definition: TrigConfData.h:22
Run2ToRun3TrigNavConverterV2::fillRelevantRois
StatusCode fillRelevantRois(ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:986
Run2ToRun3TrigNavConverterV2::createL1Nodes
StatusCode createL1Nodes(const ConvProxySet_t &convProxies, xAOD::TrigCompositeContainer &decisions, const EventContext &context) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1212
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:407
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:138
HLT::TrigNavStructure::label
std::string label(class_id_type clid, const index_or_label_type &sti_or_label) const
Definition: TrigNavStructure.cxx:773
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:41
Run2ToRun3TrigNavConverterV2::linkRoiNode
StatusCode linkRoiNode(ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1323
Run2ToRun3TrigNavConverterV2::updateTerminusNode
StatusCode updateTerminusNode(xAOD::TrigCompositeContainer &, const EventContext &context) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1170
TrigCompositeUtils::newDecisionIn
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name)
Helper method to create a Decision object, place it in the container and return a pointer to it.
Definition: TrigCompositeUtilsRoot.cxx:44
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
index
Definition: index.py:1
Run2ToRun3TrigNavConverterV2::allProxiesConnected
StatusCode allProxiesConnected(const ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1510
hist_file_dump.d
d
Definition: hist_file_dump.py:142
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
xAOD::teId
teId
Definition: L2StandAloneMuon_v1.cxx:324
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
Run2ToRun3TrigNavConverterV2::m_configSvc
ServiceHandle< TrigConf::IHLTConfigSvc > m_configSvc
Definition: Run2ToRun3TrigNavConverterV2.h:82
Run2ToRun3TrigNavConverterV2::m_configUpdateMutex
std::mutex m_configUpdateMutex
Definition: Run2ToRun3TrigNavConverterV2.h:97
Run2ToRun3TrigNavConverterV2::removeUnassociatedProxies
StatusCode removeUnassociatedProxies(ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:734
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:59
Run2ToRun3TrigNavConverterV2::getSgKey
std::tuple< uint32_t, CLID, std::string > getSgKey(const HLT::TrigNavStructure &navigationDecoder, const HLT::TriggerElement::FeatureAccessHelper &helper) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1560
ConvProxy::MissingFEA
static const uint64_t MissingFEA
Definition: Run2ToRun3TrigNavConverterV2.h:48
SpecialCases::bjetMuChain
const std::regex bjetMuChain
Definition: SpecialCases.h:39
Run2ToRun3TrigNavConverterV2::getHighestPtObject
std::pair< std::size_t, std::size_t > getHighestPtObject(const ConvProxy &, const HLT::TrigNavStructure &) const
Return pair of indices (feature index in proxy->features vector, object index) identifying the highes...
Definition: Run2ToRun3TrigNavConverterV2.cxx:1592
TrigCompositeUtils::summaryPassNodeName
const std::string & summaryPassNodeName()
Definition: TrigCompositeUtils.h:430
AthCommonDataStore::renounce
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Definition: AthCommonDataStore.h:380
Run2ToRun3TrigNavConverterV2::m_collectionsToSave
Gaudi::Property< std::vector< std::string > > m_collectionsToSave
Definition: Run2ToRun3TrigNavConverterV2.h:91
python.TrigCompositeUtils.isLegId
def isLegId(chainName)
Definition: DecisionHandling/python/TrigCompositeUtils.py:18
HLT::TriggerElement::getId
te_id_type getId() const
reset internals.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:43
Run2ToRun3TrigNavConverterV2::m_trigOutputNavKey
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_trigOutputNavKey
Definition: Run2ToRun3TrigNavConverterV2.h:94
Run2ToRun3TrigNavConverterV2::bjetMuChainConfigDecoder
StatusCode bjetMuChainConfigDecoder(TEIdToChainsMap_t &allTES, TEIdToChainsMap_t &finalTEs, const TrigConf::HLTChain *ptrChain) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:548
HLT::TriggerElement::FeatureAccessHelper::getCLID
class_id_type getCLID() const
Class ID of object.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:208
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:70
ReadBchFromCrest.begin
begin
Definition: ReadBchFromCrest.py:80
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
defineDB.jets
jets
Definition: JetTagCalibration/share/defineDB.py:24
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TrigCompositeUtils::insertDecisionIDs
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
Definition: TrigCompositeUtilsRoot.cxx:78
Run2ToRun3TrigNavConverterV2::m_roisToSave
Gaudi::Property< std::vector< std::string > > m_roisToSave
Definition: Run2ToRun3TrigNavConverterV2.h:92
navigation2dot.teName
def teName(teid)
Definition: navigation2dot.py:59
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Run2ToRun3TrigNavConverterV2::m_TrigRingerRingsCLID
CLID m_TrigRingerRingsCLID
Definition: Run2ToRun3TrigNavConverterV2.h:183
Run2ToRun3TrigNavConverterV2::m_setRoiName
std::vector< std::string > m_setRoiName
Definition: Run2ToRun3TrigNavConverterV2.h:179
TrigConf::HLTChain::signatures
const std::vector< HLTSignature * > & signatures() const
Definition: TrigConfHLTData/TrigConfHLTData/HLTChain.h:110
xAOD::TrigComposite_v1::setDecisions
void setDecisions(const std::vector< TrigCompositeUtils::DecisionID > &decisions)
Set positive HLT chain decisions associated with this TrigComposite. Navigation use.
Run2ToRun3TrigNavConverterV2::m_collectionsToSaveDecoded
std::map< CLID, std::set< std::string > > m_collectionsToSaveDecoded
Definition: Run2ToRun3TrigNavConverterV2.h:177
HLTNavDetails::formatSGkey
std::string formatSGkey(const std::string &prefix, const std::string &containername, const std::string &label)
declaration of formatting function.
Definition: Holder.cxx:122
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
Run2ToRun3TrigNavConverterV2::m_TauTrackContainerCLID
CLID m_TauTrackContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:190
Run2ToRun3TrigNavConverterV2::m_tdt
PublicToolHandle< Trig::TrigDecisionTool > m_tdt
Definition: Run2ToRun3TrigNavConverterV2.h:81
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
Run2ToRun3TrigNavConverterV2::m_chainIdsPrinter
std::function< void(const ConvProxy *)> m_chainIdsPrinter
Definition: Run2ToRun3TrigNavConverterV2.h:150
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Run2ToRun3TrigNavConverterV2::m_allTEIdsToChains
TEIdToChainsMap_t m_allTEIdsToChains
Definition: Run2ToRun3TrigNavConverterV2.h:98
HLT::TrigNavStructure
Definition: TrigNavStructure.h:40
TrigCompositeUtils::createAndStore
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
Definition: TrigCompositeUtilsRoot.cxx:28
TrigCompositeUtils::roiString
const std::string & roiString()
Definition: TrigCompositeUtils.h:419
Run2ToRun3TrigNavConverterV2::m_ElectronContainerCLID
CLID m_ElectronContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:191
Run2ToRun3TrigNavConverterV2::m_MuonContainerCLID
CLID m_MuonContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:193
SpecialCases::egammaDiEtcut
const std::regex egammaDiEtcut
Definition: SpecialCases.h:31
SpecialCases::gammaXeChain
const std::regex gammaXeChain
Definition: SpecialCases.h:30
Run2ToRun3TrigNavConverterV2::getExpectedParticleCLID
CLID getExpectedParticleCLID(const std::string &teName) const
Helper function to determine expected particle CLID based on TE name Returns 0 if no specific type is...
Definition: Run2ToRun3TrigNavConverterV2.cxx:1633
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
ConvProxy::children
std::set< ConvProxy * > children
Definition: Run2ToRun3TrigNavConverterV2.h:44
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
Run2ToRun3TrigNavConverterV2::feaToHash
uint64_t feaToHash(const std::vector< HLT::TriggerElement::FeatureAccessHelper > &feaVector, const HLT::TriggerElement *te_ptr, const HLT::TrigNavStructure &navigationDecoder) const
returns true if this particular feature is to be saved (linked)
Definition: Run2ToRun3TrigNavConverterV2.cxx:1431
Run2ToRun3TrigNavConverterV2::m_roIDescriptorCollectionCLID
CLID m_roIDescriptorCollectionCLID
Definition: Run2ToRun3TrigNavConverterV2.h:182
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:115
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
Run2ToRun3TrigNavConverterV2::createSFNodes
StatusCode createSFNodes(const ConvProxySet_t &, xAOD::TrigCompositeContainer &, const TEIdToChainsMap_t &finalTEs, const EventContext &context) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1096
AthCommonDataStore
Definition: AthCommonDataStore.h:52
Run2ToRun3TrigNavConverterV2::m_TauJetContainerCLID
CLID m_TauJetContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:194
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Run2ToRun3TrigNavConverterV2::filterFEAs
std::vector< HLT::TriggerElement::FeatureAccessHelper > filterFEAs(const std::vector< HLT::TriggerElement::FeatureAccessHelper > &feaVector, const HLT::TrigNavStructure &navigationDecoder) const
< both method skip TrigPassBits
Definition: Run2ToRun3TrigNavConverterV2.cxx:1409
Run2ToRun3TrigNavConverterV2::extractTECtoChainMapping
StatusCode extractTECtoChainMapping(TEIdToChainsMap_t &allTES, TEIdToChainsMap_t &finalTEs) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:401
HLT::TrigNavStructure::getDirectPredecessors
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
Definition: TrigNavStructure.cxx:120
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigCompositeUtils::getLinkToPrevious
const std::vector< ElementLink< DecisionContainer > > getLinkToPrevious(const Decision *d)
returns links to previous decision object 'seed'
Definition: TrigCompositeUtilsRoot.cxx:157
beamspotman.n
n
Definition: beamspotman.py:727
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
SpecialCases::isTopo
const std::regex isTopo
Definition: SpecialCases.h:34
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
Run2ToRun3TrigNavConverterV2::linkTrkNode
StatusCode linkTrkNode(ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1345
Run2ToRun3TrigNavConverterV2::createIMHNodes
StatusCode createIMHNodes(ConvProxySet_t &, xAOD::TrigCompositeContainer &, const EventContext &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1067
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Run2ToRun3TrigNavConverterV2::m_includeTauTrackFeatures
Gaudi::Property< bool > m_includeTauTrackFeatures
Definition: Run2ToRun3TrigNavConverterV2.h:88
Run2ToRun3TrigNavConverterV2::m_TrigEMClusterContainerCLID
CLID m_TrigEMClusterContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:186
TEIdToChainsMap_t
std::map< HLT::te_id_type, std::set< HLT::Identifier > > TEIdToChainsMap_t
Definition: Run2ToRun3TrigNavConverterV2.h:62
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
Run2ToRun3TrigNavConverterV2::m_PhotonContainerCLID
CLID m_PhotonContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:192
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:54
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:49
TrigCompositeUtils::initialRoIString
const std::string & initialRoIString()
Definition: TrigCompositeUtils.h:417
DataVector
Derived DataVector<T>.
Definition: DataVector.h:795
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
TrigCompositeUtils::hltSeedingNodeName
const std::string & hltSeedingNodeName()
Definition: TrigCompositeUtils.h:424
xAOD::decisions
decisions
Definition: TrigComposite_v1.cxx:101
Run2ToRun3TrigNavConverterV2::removeTopologicalProxies
StatusCode removeTopologicalProxies(ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:920
SpecialCases::egammaEtcut
const std::regex egammaEtcut
Definition: SpecialCases.h:32
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
columnar::isAvailable
bool isAvailable(ObjectId< CI, CM > id) const noexcept
Definition: ColumnAccessor.h:181
ChainNameParser::multiplicities
std::vector< int > multiplicities(const std::string &chain)
Definition: ChainNameParser.cxx:226
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Run2ToRun3TrigNavConverterV2::collapseFeaturesProxies
StatusCode collapseFeaturesProxies(ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:808
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:239
Run2ToRun3TrigNavConverterV2::m_finalTEIdsToChains
TEIdToChainsMap_t m_finalTEIdsToChains
Definition: Run2ToRun3TrigNavConverterV2.h:98
HLT::StandaloneNavigation
Definition: StandaloneNavigation.h:14
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
Run2ToRun3TrigNavConverterV2::m_doCompression
Gaudi::Property< bool > m_doCompression
Definition: Run2ToRun3TrigNavConverterV2.h:86
ConvProxySet_t
std::set< ConvProxy * > ConvProxySet_t
Definition: Run2ToRun3TrigNavConverterV2.h:61
Run2ToRun3TrigNavConverterV2::associateChainsToProxies
StatusCode associateChainsToProxies(ConvProxySet_t &, const TEIdToChainsMap_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:669
TrigConf::HLTUtils::hash2string
static const std::string hash2string(HLTHash, const std::string &category="TE")
hash function translating identifiers into names (via internal dictionary)
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:188
Run2ToRun3TrigNavConverterV2::m_doLinkFeatures
Gaudi::Property< bool > m_doLinkFeatures
Definition: Run2ToRun3TrigNavConverterV2.h:87
Run2ToRun3TrigNavConverterV2::getFeaSize
std::size_t getFeaSize(const ConvProxy &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1242
Run2ToRun3TrigNavConverterV2::numberOfHNodesPerProxyNotExcessive
StatusCode numberOfHNodesPerProxyNotExcessive(const ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1524
TrigCompositeUtils::createLegName
HLT::Identifier createLegName(const HLT::Identifier &chainIdentifier, size_t counter)
Generate the HLT::Identifier which corresponds to a specific leg of a given chain.
Definition: TrigCompositeUtilsRoot.cxx:166
Run2ToRun3TrigNavConverterV2::allProxiesHaveChain
StatusCode allProxiesHaveChain(const ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1496
HLT::TrigNavStructure::getRoINodes
static const std::vector< TriggerElement * > & getRoINodes(const TriggerElement *somenode)
gets all RoI type nodes seeding indirectly this TriggerElement
Definition: TrigNavStructure.cxx:73
Run2ToRun3TrigNavConverterV2::fillRelevantFeatures
StatusCode fillRelevantFeatures(ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:947
Run2ToRun3TrigNavConverterV2::feaToSave
bool feaToSave(const HLT::TriggerElement::FeatureAccessHelper &fea, const std::string &sgName) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1469
xAOD::TrigComposite_v1::name
const std::string & name() const
Get a human-readable name for the object.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
HLT::TrigNavStructure::getAllTEs
std::vector< TriggerElement * > & getAllTEs()
access needed by slimming tools.
Definition: TrigNavStructure.cxx:374
TrigCompositeUtils::linkToPrevious
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
Definition: TrigCompositeUtilsRoot.cxx:140
DeMoScan.index
string index
Definition: DeMoScan.py:362
Run2ToRun3TrigNavConverterV2::collapseFeaturelessProxies
StatusCode collapseFeaturelessProxies(ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:856
Run2ToRun3TrigNavConverterV2::m_CaloClusterCLID
CLID m_CaloClusterCLID
Definition: Run2ToRun3TrigNavConverterV2.h:187
HLT::TrigNavStructure::isInitialNode
static bool isInitialNode(const TriggerElement *te)
queries if node is an initial one
Definition: TrigNavStructure.cxx:499
ReadCalibFromCrest.typeName
typeName
Definition: ReadCalibFromCrest.py:439
a
TList * a
Definition: liststreamerinfos.cxx:10
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:610
h
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:108
HLT::TriggerElement::FeatureAccessHelper
the FeatureAccessHelper is a class used to keep track of features attached to this TE.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:192
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TrigRoiDescriptorCollection
Definition: TrigRoiDescriptorCollection.h:21
xAOD::TauTrack_v1
Definition: TauTrack_v1.h:27
HLT::StandaloneNavigation::deserialize
virtual bool deserialize(const std::vector< uint32_t > &input)
Definition: StandaloneNavigation.cxx:88
Run2ToRun3TrigNavConverterV2::is2LegTopoChain
size_t is2LegTopoChain(const TrigConf::HLTChain *ptrChain) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:357
TrigCompositeUtils::hypoAlgNodeName
const std::string & hypoAlgNodeName()
Definition: TrigCompositeUtils.h:427
DeMoScan.first
bool first
Definition: DeMoScan.py:534
Run2ToRun3TrigNavConverterV2::mirrorTEsStructure
StatusCode mirrorTEsStructure(ConvProxySet_t &, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:587
python.TriggerAPI.TriggerAPISession.chainName
chainName
Definition: TriggerAPISession.py:426
Run2ToRun3TrigNavConverterV2::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
Definition: Run2ToRun3TrigNavConverterV2.h:83
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:65
Run2ToRun3TrigNavConverterV2::doCompression
StatusCode doCompression(ConvProxySet_t &convProxies, const HLT::TrigNavStructure &run2Nav) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:763
python.utility.LHE.merge
def merge(input_file_pattern, output_file)
Merge many input LHE files into a single output file.
Definition: LHE.py:29
HLT::Identifier::name
std::string name() const
reports human redable name
Definition: HLTIdentifier.cxx:12
Run2ToRun3TrigNavConverterV2::m_CaloClusterContainerCLID
CLID m_CaloClusterContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:188
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
ConvProxy
Definition: Run2ToRun3TrigNavConverterV2.h:35
LArCellBinning.step
step
Definition: LArCellBinning.py:158
feaToSkip
bool feaToSkip(const HLT::TriggerElement::FeatureAccessHelper &fea)
Definition: Run2ToRun3TrigNavConverterV2.cxx:1401
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
SpecialCases::tauXeChain
const std::regex tauXeChain
Definition: SpecialCases.h:38
Run2ToRun3TrigNavConverterV2::printProxies
void printProxies(const ConvProxySet_t &proxies, std::function< bool(const ConvProxy *)> selector=[](const ConvProxy *){return true;}, const std::vector< std::function< void(const ConvProxy *)>> &printers={}) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:653
Run2ToRun3TrigNavConverterV2::linkFeaNode
StatusCode linkFeaNode(ConvProxySet_t &convProxies, xAOD::TrigCompositeContainer &, const HLT::TrigNavStructure &run2Nav, const EventContext &context) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:1264
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
Run2ToRun3TrigNavConverterV2::m_TrigRingerRingsContainerCLID
CLID m_TrigRingerRingsContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:184
Run2ToRun3TrigNavConverterV2::cureUnassociatedProxies
StatusCode cureUnassociatedProxies(ConvProxySet_t &) const
Definition: Run2ToRun3TrigNavConverterV2.cxx:701
TrigCompositeUtils::getIDFromLeg
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
Definition: TrigCompositeUtilsRoot.cxx:180
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:44
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
Run2ToRun3TrigNavConverterV2::m_teIDPrinter
std::function< void(const ConvProxy *)> m_teIDPrinter
Definition: Run2ToRun3TrigNavConverterV2.h:151
ConvProxy::parents
std::set< ConvProxy * > parents
Definition: Run2ToRun3TrigNavConverterV2.h:45
test_pyathena.counter
counter
Definition: test_pyathena.py:15
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:27
Run2ToRun3TrigNavConverterV2::m_TrigEMClusterCLID
CLID m_TrigEMClusterCLID
Definition: Run2ToRun3TrigNavConverterV2.h:185
TrigCompositeUtils::inputMakerNodeName
const std::string & inputMakerNodeName()
Definition: TrigCompositeUtils.h:426
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
Run2ToRun3TrigNavConverterV2::m_chainsToSave
Gaudi::Property< std::vector< std::string > > m_chainsToSave
Definition: Run2ToRun3TrigNavConverterV2.h:90
Run2ToRun3TrigNavConverterV2::m_TrackParticleContainerCLID
CLID m_TrackParticleContainerCLID
Definition: Run2ToRun3TrigNavConverterV2.h:189
SpecialCases::egammaCombinedWithEtcut
const std::regex egammaCombinedWithEtcut
Definition: SpecialCases.h:33
fitman.k
k
Definition: fitman.py:528
python.handimod.cc
int cc
Definition: handimod.py:522
Run2ToRun3TrigNavConverterV2::m_doSelfValidation
Gaudi::Property< bool > m_doSelfValidation
Definition: Run2ToRun3TrigNavConverterV2.h:85
TrigCompositeUtils::decisionToElementLink
ElementLink< DecisionContainer > decisionToElementLink(const Decision *d, const EventContext &ctx)
Takes a raw pointer to a Decision and returns an ElementLink to the Decision.
Definition: TrigCompositeUtilsRoot.cxx:123
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
HLT::te_id_type
uint32_t te_id_type
Definition: Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/Types.h:11