ATLAS Offline Software
Loading...
Searching...
No Matches
Trig::NavigationTesterAlg Class Reference

#include <NavigationTesterAlg.h>

Inheritance diagram for Trig::NavigationTesterAlg:
Collaboration diagram for Trig::NavigationTesterAlg:

Public Member Functions

 NavigationTesterAlg (const std::string &name, ISvcLocator *pSvcLocator)
 ~NavigationTesterAlg () override=default
StatusCode initialize () override
StatusCode execute (const EventContext &context) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

using CombinationsVector = std::vector<std::vector<const xAOD::IParticle *>>
using CombinationsSet = std::set<std::set<const xAOD::IParticle *>>
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

StatusCode verifyFlatContent (const std::string &chain) const
StatusCode verifyCombinationsSize (const CombinationsVector &run2, const CombinationsVector &run3, const std::string &chain) const
StatusCode verifyCombinationsContent (const CombinationsSet &run2, const CombinationsSet &run3, const std::string &chain) const
bool combinationsEmpty (const CombinationsVector &combs) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

PublicToolHandle< Trig::TrigDecisionToolm_tdt {this, "TrigDecisionTool", "", "When enabled read navigation from TDT/off by default"}
PublicToolHandle< Trig::TrigDecisionToolm_tdtRun3 {this, "TrigDecisionToolRun3", "", "Use for directly accessing objects"}
PublicToolHandle< Trig::TrigDecisionToolm_tdtRun2 {this, "TrigDecisionToolRun2", "", "Use for directly accessing objects"}
ToolHandle< Trig::IIParticleRetrievalToolm_toolRun2
ToolHandle< Trig::IIParticleRetrievalToolm_toolRun3
Gaudi::Property< std::vector< std::string > > m_chains
Gaudi::Property< bool > m_failOnDifference
Gaudi::Property< bool > m_verifyCombinationsSize
Gaudi::Property< bool > m_verifyCombinations
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 14 of file NavigationTesterAlg.h.

Member Typedef Documentation

◆ CombinationsSet

using Trig::NavigationTesterAlg::CombinationsSet = std::set<std::set<const xAOD::IParticle *>>
private

Definition at line 45 of file NavigationTesterAlg.h.

◆ CombinationsVector

using Trig::NavigationTesterAlg::CombinationsVector = std::vector<std::vector<const xAOD::IParticle *>>
private

Definition at line 44 of file NavigationTesterAlg.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ NavigationTesterAlg()

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

Definition at line 61 of file NavigationTesterAlg.cxx.

61 :
62 AthReentrantAlgorithm(name, pSvcLocator)
63 {}

◆ ~NavigationTesterAlg()

Trig::NavigationTesterAlg::~NavigationTesterAlg ( )
overridedefault

Member Function Documentation

◆ combinationsEmpty()

bool Trig::NavigationTesterAlg::combinationsEmpty ( const CombinationsVector & combs) const
private

Definition at line 261 of file NavigationTesterAlg.cxx.

261 {
262 size_t counter = 0;
263 for ( const std::vector<const xAOD::IParticle*>& outerc: combs )
264 counter += outerc.size();
265 return counter == 0;
266 }

◆ declareGaudiProperty()

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 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ 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.

◆ evtStore()

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.

◆ execute()

StatusCode Trig::NavigationTesterAlg::execute ( const EventContext & context) const
override

Definition at line 78 of file NavigationTesterAlg.cxx.

79 {
80 for (const std::string &chain : m_chains)
81 {
82 const bool chainPassed = m_tdt->isPassed(chain, TrigDefs::Physics | TrigDefs::allowResurrectedDecision);
83 ATH_MSG_DEBUG("Begin testing chain " << chain << (chainPassed ? " and will dive into details as the chain passed " : " but will not do anything as the chain did not pass"));
84 if (!chainPassed) continue;
85
86 // explicitely excluded chains
87 bool isExcluded = false;
88 for (const auto& excludedChain : SpecialCases::excludedChains) {
89 if (chain == excludedChain) {
90 isExcluded = true;
91 break; // Break out of the exclusion check loop
92 }
93 }
94
95 if (isExcluded) {
96 continue; // Skip the current iteration of the main loop
97 }
98
99 // We assume that the navigation is ultimately a set of element links
100 // We're comparing two types of navigation but they should both point to the same
101 // objects.
102 // We don't care about the order of the combinations, or the order within the
103 // combinations, we just care that they are the same. Therefore, we can convert the
104 // vectors to sets and just look at the differences between them
105 CombinationsVector vecCombinationsRun2;
106 ATH_MSG_DEBUG("Checking features of chain " << chain);
107 ATH_CHECK(m_toolRun2->retrieveParticles(vecCombinationsRun2, chain));
108 auto combsRun2 = vectorToSet(vecCombinationsRun2);
109 ATH_MSG_DEBUG("Run 2 size " << combsRun2.size());
110 // if Run 2 size is 0 we discard any further testing
111 if (combsRun2.size() == 0)
112 {
113 ATH_MSG_DEBUG("Chain " << chain << " testing discarded due to detected Run 2 size == 0");
114 continue;
115 }
116 for (auto& c : combsRun2 ) {
117 ATH_MSG_DEBUG(c);
118 }
119 CombinationsVector vecCombinationsRun3;
120 ATH_CHECK(m_toolRun3->retrieveParticles(vecCombinationsRun3, chain));
121 auto combsRun3 = vectorToSet(vecCombinationsRun3);
122 ATH_MSG_DEBUG("Run 3 size " << combsRun3.size());
123
124 if (combinationsEmpty(vecCombinationsRun2) and combinationsEmpty(vecCombinationsRun3)) {
125 ATH_MSG_DEBUG("Both, Run2 and Run3 combinations are effectively empty");
126 continue;
127 }
128
129
130 for (auto& c : combsRun3 ) {
131 ATH_MSG_DEBUG(c);
132 }
133 if ( std::regex_match(chain, SpecialCases::gammaXeChain) ) {
135 } else {
137 ATH_CHECK(verifyCombinationsSize(vecCombinationsRun2, vecCombinationsRun3, chain));
138 }
139 if ( m_verifyCombinations ) {
140 ATH_CHECK(verifyCombinationsContent(combsRun2, combsRun3, chain));
141 }
142 }
143
144 ATH_MSG_DEBUG("Verified chain " << chain);
145 }
146 return StatusCode::SUCCESS;
147 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
StatusCode verifyFlatContent(const std::string &chain) const
StatusCode verifyCombinationsSize(const CombinationsVector &run2, const CombinationsVector &run3, const std::string &chain) const
PublicToolHandle< Trig::TrigDecisionTool > m_tdt
std::vector< std::vector< const xAOD::IParticle * > > CombinationsVector
ToolHandle< Trig::IIParticleRetrievalTool > m_toolRun3
StatusCode verifyCombinationsContent(const CombinationsSet &run2, const CombinationsSet &run3, const std::string &chain) const
Gaudi::Property< bool > m_verifyCombinations
Gaudi::Property< bool > m_verifyCombinationsSize
bool combinationsEmpty(const CombinationsVector &combs) const
ToolHandle< Trig::IIParticleRetrievalTool > m_toolRun2
Gaudi::Property< std::vector< std::string > > m_chains
const std::regex gammaXeChain
const std::vector< std::string > excludedChains
Definition SpecialCases.h:8

◆ 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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ initialize()

StatusCode Trig::NavigationTesterAlg::initialize ( )
override

Definition at line 65 of file NavigationTesterAlg.cxx.

66 {
67 ATH_CHECK(m_tdt.retrieve());
68 ATH_CHECK(m_tdtRun2.retrieve());
69 ATH_CHECK(m_tdtRun3.retrieve());
70 ATH_CHECK(m_toolRun2.retrieve());
71 ATH_CHECK(m_toolRun3.retrieve());
72
73 if (m_chains.size() == 0)
74 ATH_MSG_WARNING("No chains provided, algorithm will be no-op");
75 return StatusCode::SUCCESS;
76 }
#define ATH_MSG_WARNING(x,...)
PublicToolHandle< Trig::TrigDecisionTool > m_tdtRun3
PublicToolHandle< Trig::TrigDecisionTool > m_tdtRun2

◆ 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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ 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 }

◆ 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.

◆ 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();
384 }
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)

◆ 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 {
366 }

◆ setFilterPassed()

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

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< 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.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< 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 AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ 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.

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

◆ verifyCombinationsContent()

StatusCode Trig::NavigationTesterAlg::verifyCombinationsContent ( const CombinationsSet & run2,
const CombinationsSet & run3,
const std::string & chain ) const
private

Definition at line 198 of file NavigationTesterAlg.cxx.

198 {
199 // compare combinations
200
201 using xAODParticle = const xAOD::IParticle;
202
203 auto isSubsetPresent = [](const std::set<xAODParticle*>& subset, const CombinationsSet& r2) {
204 for (const auto& setInRun2 : r2) {
205 // Manual check for all particles in subset
206 bool allFound = true;
207 for (auto particle : subset) {
208 if (setInRun2.find(particle) == setInRun2.end()) {
209 allFound = false;
210 break; // If any particle is not found, no need to check further
211 }
212 }
213 if (allFound) return true; // Found all particles in this subset of Run2
214 }
215 return false; // Did not find the subset
216 };
217
218
219 auto isAnySubsetPresent = [&isSubsetPresent](const CombinationsSet& r3, const CombinationsSet& r2) {
220 for (const auto& subset : r3) {
221 if (isSubsetPresent(subset, r2)) {
222 return true; // At least one subset from Run3 is found in Run2
223 }
224 }
225 return false; // No subset from Run3 was found in Run2
226 };
227
228 bool result { false };
229 // hack for "HLT_e26_lhmedium_nod0_mu8noL1" case
230 // hack for "HLT_e24_lhmedium_L1EM20VHI_mu8noL1" type case
231 // hack for "HLT_mu11_2mu4noL1_nscan03_L1MU11_2MU6" type case
232 if ( std::regex_match(chain, SpecialCases::specialEchain) or
233 std::regex_match(chain, SpecialCases::specialElMuChain) or
234 std::regex_match(chain, SpecialCases::mu2MunoL1Special) ) {
235 result = isAnySubsetPresent(run3, run2);
236 } else {
237 // now subset checked on a level of objects, instead of group of objects
238 result = isAnySubsetPresent(run2, run3);
239 }
240
241 if (not result) {
242 // Subset check failed - this is the more severe condition
243 ATH_MSG_WARNING("Run2 objects not within subset of Run3 for chain " << chain
244 << " (multiplicities: " << ChainNameParser::multiplicities(chain) << ")");
245 ATH_MSG_WARNING(" Run2 combs: " << run2);
246 ATH_MSG_WARNING(" Run3 combs: " << run3);
247 if ( m_failOnDifference ) {
248 return StatusCode::FAILURE;
249 }
250 } else if (run2 != run3) {
251 // Combinations differ but subset check passed - informational
252 ATH_MSG_WARNING("Run2/Run3 combinations differ (but subset OK) for chain " << chain
253 << " (multiplicities: " << ChainNameParser::multiplicities(chain) << ")");
254 ATH_MSG_DEBUG(" Run2 combs: " << run2);
255 ATH_MSG_DEBUG(" Run3 combs: " << run3);
256 }
257
258 return StatusCode::SUCCESS;
259 }
std::set< std::set< const xAOD::IParticle * > > CombinationsSet
Gaudi::Property< bool > m_failOnDifference
std::vector< int > multiplicities(const std::string &chain)
const std::regex specialElMuChain
const std::regex specialEchain
const std::regex mu2MunoL1Special

◆ verifyCombinationsSize()

StatusCode Trig::NavigationTesterAlg::verifyCombinationsSize ( const CombinationsVector & run2,
const CombinationsVector & run3,
const std::string & chain ) const
private

Definition at line 184 of file NavigationTesterAlg.cxx.

184 {
185 // In Run3 we do not use decision per RoI but per object, so for a single RoI with
186 // more than one object we will have more combinations in Run3 than Run2.
187 if (run2.size() > run3.size()) {
188 ATH_MSG_WARNING("Combination size mismatch for chain " << chain
189 << ": Run2=" << run2.size() << " Run3=" << run3.size()
190 << " (possible false positive from chain config decoding)");
191 if ( m_failOnDifference ) {
192 return StatusCode::FAILURE;
193 }
194 }
195 return StatusCode::SUCCESS;
196 }

◆ verifyFlatContent()

StatusCode Trig::NavigationTesterAlg::verifyFlatContent ( const std::string & chain) const
private

Definition at line 149 of file NavigationTesterAlg.cxx.

149 {
150 const auto &run3 = m_tdtRun3->features<xAOD::IParticleContainer>(chain);
151 std::set<const xAOD::IParticle*> particlesRun3;
152 for ( auto l: run3) {
153 if ( l.link.isValid() )
154 particlesRun3.insert(*(l.link));
155 }
156
157 CombinationsVector vecCombinationsRun2;
158 ATH_CHECK(m_toolRun2->retrieveParticles(vecCombinationsRun2, chain));
159 std::set<const xAOD::IParticle*> particlesRun2;
160 for ( auto& comb: vecCombinationsRun2) {
161 for ( auto el: comb) {
162 particlesRun2.insert(el);
163 }
164 }
165
166 for ( auto f2: particlesRun2 ) {
167 bool found=false;
168 for ( auto f3: particlesRun3 ) {
169 ATH_MSG_DEBUG("Serial set of features " << f3 );
170 if ( f2 == f3)
171 found = true;
172 }
173 if ( not found ) {
174 ATH_MSG_ERROR("Missing feature in Run 3 that is present in Run 2 " << f2 << " chain " << chain << " enable DEBUG to see more details" );
175 if ( m_failOnDifference ) {
176 return StatusCode::FAILURE;
177 }
178 }
179 }
180 return StatusCode::SUCCESS;
181 }
l
Printing final latex table to .tex output file.
DataVector< IParticle > IParticleContainer
Simple convenience declaration of IParticleContainer.

Member Data Documentation

◆ m_chains

Gaudi::Property<std::vector<std::string> > Trig::NavigationTesterAlg::m_chains
private
Initial value:
{
this, "Chains", {}, "The chains to test"}

Definition at line 32 of file NavigationTesterAlg.h.

32 {
33 this, "Chains", {}, "The chains to test"};

◆ 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_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 AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_failOnDifference

Gaudi::Property<bool> Trig::NavigationTesterAlg::m_failOnDifference
private
Initial value:
{
this, "FailOnDifference", false,
"Return FAILURE if the navigation does not compare equal"}

Definition at line 34 of file NavigationTesterAlg.h.

34 {
35 this, "FailOnDifference", false,
36 "Return FAILURE if the navigation does not compare equal"};

◆ m_tdt

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

Definition at line 24 of file NavigationTesterAlg.h.

24{this, "TrigDecisionTool", "", "When enabled read navigation from TDT/off by default"};

◆ m_tdtRun2

PublicToolHandle<Trig::TrigDecisionTool> Trig::NavigationTesterAlg::m_tdtRun2 {this, "TrigDecisionToolRun2", "", "Use for directly accessing objects"}
private

Definition at line 26 of file NavigationTesterAlg.h.

26{this, "TrigDecisionToolRun2", "", "Use for directly accessing objects"};

◆ m_tdtRun3

PublicToolHandle<Trig::TrigDecisionTool> Trig::NavigationTesterAlg::m_tdtRun3 {this, "TrigDecisionToolRun3", "", "Use for directly accessing objects"}
private

Definition at line 25 of file NavigationTesterAlg.h.

25{this, "TrigDecisionToolRun3", "", "Use for directly accessing objects"};

◆ m_toolRun2

ToolHandle<Trig::IIParticleRetrievalTool> Trig::NavigationTesterAlg::m_toolRun2
private
Initial value:
{
this, "RetrievalToolRun2Nav", "", "The tool configured to use Run 2 format"}

Definition at line 28 of file NavigationTesterAlg.h.

28 {
29 this, "RetrievalToolRun2Nav", "", "The tool configured to use Run 2 format"};

◆ m_toolRun3

ToolHandle<Trig::IIParticleRetrievalTool> Trig::NavigationTesterAlg::m_toolRun3
private
Initial value:
{
this, "RetrievalToolRun3Nav", "", "The tool configured to use Run 3 format"}

Definition at line 30 of file NavigationTesterAlg.h.

30 {
31 this, "RetrievalToolRun3Nav", "", "The tool configured to use Run 3 format"};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_verifyCombinations

Gaudi::Property<bool> Trig::NavigationTesterAlg::m_verifyCombinations
private
Initial value:
{
this, "VerifyCombinationsContent", true,
"Check if combinations are compatible (point to same objects)"}

Definition at line 40 of file NavigationTesterAlg.h.

40 {
41 this, "VerifyCombinationsContent", true,
42 "Check if combinations are compatible (point to same objects)"};

◆ m_verifyCombinationsSize

Gaudi::Property<bool> Trig::NavigationTesterAlg::m_verifyCombinationsSize
private
Initial value:
{
this, "VerifyCombinationsSize", true,
"Check if combinations have matching size (that is Run2 >= Run3)"}

Definition at line 37 of file NavigationTesterAlg.h.

37 {
38 this, "VerifyCombinationsSize", true,
39 "Check if combinations have matching size (that is Run2 >= Run3)"};

◆ 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: