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

Used at the start of a sequence to create the EventViews: retrieves filtered collections via menu decision from previous step, merges them and writes out a merged collection to be consumed by HypoAlg(s). Spawns EventViews for each unique ROI associated to each Decision object in the merged output. Links the EventView and the ROI to each Decision object in the merged output. More...

#include <EventViewCreatorAlgorithm.h>

Inheritance diagram for EventViewCreatorAlgorithm:
Collaboration diagram for EventViewCreatorAlgorithm:

Public Member Functions

 EventViewCreatorAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~EventViewCreatorAlgorithm ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &) const override
 
virtual StatusCode finalize () override
 
virtual StatusCode sysInitialize () override
 initialise this base class and renounce input decision key handles 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 > &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

 EventViewCreatorAlgorithm ()
 
StatusCode linkViewToParent (const TrigCompositeUtils::Decision *outputDecision, SG::View *newView) const
 Makes sure the views are linked, if configuration requireParentView is set. More...
 
StatusCode placeRoIInView (const ElementLink< TrigRoiDescriptorCollection > &roi, SG::View *view, const EventContext &context) const
 Seeds a newly created view with an ROI collection containing the single seeding ROI. More...
 
SmartIF< IScheduler > getScheduler () const
 Obtain smart pointer to scheduler in order to schedule newly spawned views. More...
 
bool checkCache (const TrigCompositeUtils::DecisionContainer *cachedViews, const TrigCompositeUtils::Decision *outputDecision, size_t &cachedIndex, MatchingCache &matchingCache, const EventContext &context) const
 Allow for the re-use of EventViews run in a previous Step in another EVCA instance configured to spawn EventViews using the same reconstruction sequence (i.e. More...
 
StatusCode populateMatchingCacheWithCachedViews (const TrigCompositeUtils::DecisionContainer *cachedViews, MatchingCache &matchingCache, const EventContext &context) const
 We look for matching Decision Objects in a matchingCache. More...
 
const SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionInputs () const
 methods for derived classes to access handles of the base class input and output decisions; other read/write handles may be implemented by derived classes More...
 
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutputs () const
 methods for derived classes to access handles of the base class input and output decisions; other read/write handles may be implemented by derived classes More...
 
void debugPrintOut (const EventContext &context, SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle) const
 provides debug printout of the output of the algorithm More...
 
StatusCode decisionInputToOutput (const EventContext &context, SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle) const
 does the standard handling of input decisions: read from handles with all the checks, create merged output handles and link them, copies links and return outputHandles More...
 
size_t matchDecision (const TrigCompositeUtils::DecisionContainer *outDecisions, const TrigCompositeUtils::Decision *toMatch, const std::string &linkNameToMatch, MatchingCache &matchingCache, const EventContext &ctx) const
 Checks for merge-able Decision objects coming from N upstream filters. Check based on most-recent element link with name 'linkNameToMatch'. Works for any link type. More...
 
bool matchInCollection (const TrigCompositeUtils::DecisionContainer *outDecisions, const TrigCompositeUtils::Decision *toMatch, size_t &matchIndex, bool &usedROIMatchingFlag, MatchingCache &matchingCache, const EventContext &ctx) const
 Wrapper around matchDecision. Returns boolean if the match was successful. More...
 
uint64_t getMatchingHashForDecision (const TrigCompositeUtils::Decision *toMatch, const std::string &linkNameToMatch, const EventContext &ctx) const
 Searches from toMatch to locate a single (type-less) Element Link with given edge name. Returns a hash corresponding to this Element Link. More...
 
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...
 

Protected Attributes

SG::WriteHandleKey< ViewContainerm_viewsKey
 
SG::WriteHandleKey< ConstDataVector< TrigRoiDescriptorCollection > > m_inViewRoIs
 
Gaudi::Property< std::string > m_schedulerName { this, "SchedulerName", "AvalancheSchedulerSvc", "Name of the scheduler" }
 
Gaudi::Property< std::string > m_viewNodeName { this, "ViewNodeName", "", "Name of the ControlFlow node to attach new views to" }
 
Gaudi::Property< bool > m_viewFallThrough
 
Gaudi::Property< std::vector< std::string > > m_viewFallFilter
 
Gaudi::Property< bool > m_requireParentView
 
Gaudi::Property< bool > m_reverseViews
 
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainerm_cachedViewsKey
 
ToolHandle< IViewCreatorROIToolm_roiTool
 
StringProperty m_roisLink
 
Gaudi::Property< bool > m_mergeUsingFeature
 
Gaudi::Property< bool > m_isEmptyStep
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::vector< TrigCompositeUtils::LinkInfo< ViewContainer > > viewsToLink (const TrigCompositeUtils::Decision *outputDecision) const
 Obtain view(s) from most recent prior step(s) which are to be wired up. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainerm_inputs { this, "InputMakerInputDecisions", {}, "Input Decisions (implicit)" }
 input decisions array, will be implicit (renounced). More...
 
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainerm_outputs { this, "InputMakerOutputDecisions", "", "Output Decisions" }
 output decisions More...
 
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
 

Muon slice code

Gaudi::Property< bool > m_placeMuonInView
 
SG::WriteHandleKey< xAOD::MuonContainerm_inViewMuons
 
SG::WriteHandleKey< ConstDataVector< MuonCandidateCollection > > m_inViewMuonCandidates
 
StatusCode placeMuonInView (const xAOD::Muon *theObject, SG::View *view, const EventContext &context) const
 Creates a SG::VIEW_ELEMENTS collection inside a newly created View populated by the MuonCombined::MuonCandidate used to seed the View Also currently populated by the xAOD::Muon for the iso use case, but this should be removed. More...
 

Jet slice code

Gaudi::Property< bool > m_placeJetInView
 
Gaudi::Property< bool > m_cacheDisabled
 
SG::WriteHandleKey< xAOD::JetContainerm_inViewJets
 
StatusCode placeJetInView (const xAOD::Jet *theObject, SG::View *view, const EventContext &context) const
 Creates a SG::VIEW_ELEMENTS collection inside a newly created View populated by the jet used to seed the View. More...
 

Detailed Description

Used at the start of a sequence to create the EventViews: retrieves filtered collections via menu decision from previous step, merges them and writes out a merged collection to be consumed by HypoAlg(s). Spawns EventViews for each unique ROI associated to each Decision object in the merged output. Links the EventView and the ROI to each Decision object in the merged output.

Definition at line 44 of file EventViewCreatorAlgorithm.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

◆ EventViewCreatorAlgorithm() [1/2]

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

Definition at line 17 of file EventViewCreatorAlgorithm.cxx.

18 : InputMakerBase( name, pSvcLocator ) {}

◆ ~EventViewCreatorAlgorithm()

EventViewCreatorAlgorithm::~EventViewCreatorAlgorithm ( )
virtual

Definition at line 20 of file EventViewCreatorAlgorithm.cxx.

20 {}

◆ EventViewCreatorAlgorithm() [2/2]

EventViewCreatorAlgorithm::EventViewCreatorAlgorithm ( )
protected

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
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 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ checkCache()

bool EventViewCreatorAlgorithm::checkCache ( const TrigCompositeUtils::DecisionContainer cachedViews,
const TrigCompositeUtils::Decision outputDecision,
size_t &  cachedIndex,
MatchingCache matchingCache,
const EventContext &  context 
) const
protected

Allow for the re-use of EventViews run in a previous Step in another EVCA instance configured to spawn EventViews using the same reconstruction sequence (i.e.

both algs should share a common ViewNodeName).

Definition at line 187 of file EventViewCreatorAlgorithm.cxx.

187  {
188  if (cachedViews == nullptr or m_cacheDisabled) {
189  return false; // No cached input configured, which is fine.
190  }
191 
192  // If we ever stop using cached views mid-processing of a chain, then it is by far safer to continue to not use cached views in all following steps. See for example towards the end of ATR-25996
193  // We can tell this by querying for View instances in previous steps and looking for evidence of the instance being cached (no "_probe" postfix, from initiall "tag" pass)
194  // or not cached (with "_probe" postfix, from second "probe" pass)
195  std::vector<LinkInfo<ViewContainer>> previousStepViews = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::allFeaturesOfType);
196  // If this collection is empty then we're the 1st step, so OK to look for a cached EventView to re-use. Otherwise...
197  if (previousStepViews.size()) {
198  // If there are one or more prior steps, we want to focus on the most recent which will be the first entry in the vector
199  ElementLink<ViewContainer> previousView = previousStepViews.at(0).link;
200  const bool previousStepDidNotUsedCachedView = endsWith(previousView.dataID(), "_probe");
201  if (previousStepDidNotUsedCachedView) {
202  // If we are not the 1st step, and the previous step did not use a cached view, then we are safer here to not use one either. Don't search for one. Just say no to caching here.
203  ATH_MSG_DEBUG("Previous probe step used a probe EventView for this decision object. Do not attempt to use a cached EventView in this step.");
204  return false;
205  }
206  }
207 
208  bool usedROIMatchingFlag{false}; // Sanity check
209  bool result = matchInCollection(cachedViews, outputDecision, cachedIndex, usedROIMatchingFlag, matchingCache, context);
210  if (usedROIMatchingFlag and m_mergeUsingFeature) {
211  ATH_MSG_ERROR("Called matchInCollection in an EVCA configured with mergeUsingFeature=True, however ROI matching was used instead?! Should not be possible.");
212  }
213 
214  if (result) {
215  // We have another check we have to make before we are confident that we can re-use this View
216  // The view will have originally be launched linked to N proxies (N>=0), which are the previous Steps which the View
217  // needs to link to (in which one might need to later search for physics collections needed in this or later Steps).
218  //
219  // But the list of proxies in the probe pass might be different than what it was in the tag pass.
220  // We cannot change the list of proxies in the existing tag EventView (it is now immutable)
221  //
222  // So if we are missing required proxies then we cannot re-use this EventView and have to reject the cached EV.
223  const SG::View* view = *(cachedViews->at(cachedIndex)->objectLink<ViewContainer>(viewString()));
224 
225  // What prior views would we have linked if we were spawning a new View here in probe?
226  std::vector<LinkInfo<ViewContainer>> viewsToLinkVector = viewsToLink(outputDecision);
227  for (const LinkInfo<ViewContainer>& toLinkLI : viewsToLinkVector) {
228  const SG::View* toLink = *(toLinkLI.link);
229  // Was toLink linked as a proxy back in the tag stage?
230  bool foundIt = false;
231  for (const SG::View* prevLinked : view->getParentLinks()) {
232  if (prevLinked == toLink) {
233  foundIt = true;
234  break;
235  }
236  }
237  if (!foundIt) {
238  ATH_MSG_DEBUG("The cached view from the tag step is not linked to the required views from earlier steps which we need in the probe processing, we cannot re-use it.");
239  result = false;
240  break;
241  }
242  }
243  }
244 
245  return result;
246 }

◆ debugPrintOut()

void InputMakerBase::debugPrintOut ( const EventContext &  context,
SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &  outputHandle 
) const
protectedinherited

provides debug printout of the output of the algorithm

Definition at line 203 of file InputMakerBase.cxx.

203  {
204  size_t validInput=0;
205  for ( const auto& inputKey: decisionInputs() ) {
206  auto inputHandle = SG::makeHandle( inputKey, context );
207  ATH_MSG_DEBUG(" " << inputKey.key() << " " << (inputHandle.isValid()? "valid": "not valid" ) );
208  if (inputHandle.isValid()) {
209  if (inputHandle->size() > 0) {
210  validInput++;
211  } else {
212  ATH_MSG_DEBUG(" " << inputKey.key() << " actually NOT valid due to size() == 0");
213  }
214  }
215  }
216  ATH_MSG_DEBUG( "Number of implicit ReadHandles for input decisions is " << decisionInputs().size() << ", " << validInput << " are valid/not-empty" );
217 
218  ATH_MSG_DEBUG("Output " << outputHandle.key() <<" with "<< outputHandle->size() <<" decisions:");
219  for (const auto outdecision : *outputHandle){
221  TrigCompositeUtils::decisionIDs( outdecision, objDecisions );
222  ATH_MSG_DEBUG("Number of positive decisions for this output: " << objDecisions.size() );
223  for ( TrigCompositeUtils::DecisionID id : objDecisions ) {
224  ATH_MSG_DEBUG( " --- decision " << HLT::Identifier( id ) );
225  }
226  }
227 }

◆ decisionInputs()

const SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > & InputMakerBase::decisionInputs ( ) const
protectedinherited

methods for derived classes to access handles of the base class input and output decisions; other read/write handles may be implemented by derived classes

Definition at line 17 of file InputMakerBase.cxx.

17  {
18  return m_inputs;
19 }

◆ decisionInputToOutput()

StatusCode InputMakerBase::decisionInputToOutput ( const EventContext &  context,
SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &  outputHandle 
) const
protectedinherited

does the standard handling of input decisions: read from handles with all the checks, create merged output handles and link them, copies links and return outputHandles

Definition at line 43 of file InputMakerBase.cxx.

43  {
44 
45  ATH_MSG_DEBUG("Creating one merged output per Decision object, IsEmptyStep flag = " << m_isEmptyStep);
46  ATH_CHECK( outputHandle.isValid() );
47  TrigCompositeUtils::DecisionContainer* outDecisions = outputHandle.ptr();
48 
49  // Empty IMs have a dynamic (runtime) matching configuration. But any single IM should find itself using exclusively-feature or exclusively-ROI based matching
50  size_t usedROIMatching = 0, usedFeatureMatching = 0;
51 
52  MatchingCache matchingCache; // Used to remember temporarily which hash is associated with each Decision object when performing the de-duplication matching
53  size_t totalInput = 0;
54  for ( const auto& inputKey: decisionInputs() ) {
55  auto inputHandle = SG::makeHandle( inputKey, context );
56 
57  if( not inputHandle.isValid() ) {
58  ATH_MSG_DEBUG( "Got no decisions from input "<< inputKey.key() << " because implicit handle not valid");
59  continue;
60  }
61  if( inputHandle->size() == 0){
62  ATH_MSG_DEBUG( "Got no decisions from input "<< inputKey.key()<<": implicit handle is valid but container is empty.");
63  continue;
64  }
65  ATH_MSG_DEBUG( "Running on input "<< inputKey.key()<<" with " << inputHandle->size() << " elements" );
66 
67 
68  size_t input_counter = 0;
69  for (const TrigCompositeUtils::Decision* inputDecision : *inputHandle){
70  ATH_MSG_DEBUG( " -- Input Decision " << input_counter <<": has " <<TrigCompositeUtils::getLinkToPrevious(inputDecision).size()<<" previous links");
71 
72  bool usedROIMatchingFlag = false;
73  size_t alreadyAddedIndex = std::numeric_limits<std::size_t>::max();
74  const bool alreadyAdded = matchInCollection(outDecisions, inputDecision, alreadyAddedIndex, usedROIMatchingFlag, matchingCache, context);
75 
76  TrigCompositeUtils::Decision* outputDecision = nullptr;
77  if (alreadyAdded) { // Already added, at alreadyAddedIndex
78  if (usedROIMatchingFlag) {
79  ++usedROIMatching;
80  } else {
81  ++usedFeatureMatching;
82  }
83  outputDecision = outDecisions->at( alreadyAddedIndex );
84  ATH_MSG_DEBUG( " -- Matched to existing, " << inputKey.key() << " index " << input_counter << " is merged into existing output index " << alreadyAddedIndex << (usedROIMatchingFlag ? " Matched using ROI" : " Matched using Feature"));
85  } else { // Not already added, make new
86  outputDecision = TrigCompositeUtils::newDecisionIn( outDecisions );
87  outputDecision->setName(inputMakerNodeName());
88  outputDecision->setDetail<int32_t>("isEmpty", static_cast<int32_t>(m_isEmptyStep)); // Transient detail (only used by runtime navigation validation, never persisted)
89  matchingCache.linkOutputToInput(outputDecision, inputDecision);
90  ATH_MSG_DEBUG( " -- Did not match to existing, " << inputKey.key() << " index " << input_counter << " creates output index " << outDecisions->size()-1);
91  }
92 
93  // Note: We will call linkToPrevious and insertDecisionIDs N times on a single "outputDecision", where N is the number of inputDecision which checkExisting determines are the same object.
94  TrigCompositeUtils::linkToPrevious( outputDecision, inputDecision, context ); // Link inputDecision object as the 'seed' of outputDecision
95  TrigCompositeUtils::insertDecisionIDs( inputDecision, outputDecision ); // Copy decision IDs from inputDecision into outputDecision
96  ATH_MSG_DEBUG(" -- This output decision now has " << TrigCompositeUtils::getLinkToPrevious(outputDecision).size() << " seeds and "<< outputDecision->decisions().size() << " decisionIds");
97  input_counter++;
98  } // loop over input decisions
99  totalInput+=input_counter;
100  } // end of: for ( auto inputKey: decisionInputs() )
101 
102  if (usedROIMatching and usedFeatureMatching) {
103  // downgrade ERROR to WARNING temporarely, since we have one case of tau+jet+tauprobe chain interaction, which meets this condition
104  // stay with WARNING to monitor such cases, then remove if they seem to be ok
105  ATH_MSG_WARNING("This input maker used Feature-based mapping on " << usedFeatureMatching << " inputs and ROI-based mapping on " << usedROIMatching
106  << " inputs. The isEmptyIM flag is " << m_isEmptyStep);
107  //return StatusCode::FAILURE;
108  }
109 
110  // Print some debug messages summarising the content of the outputHandles.
111  if (msgLvl(MSG::DEBUG)) {
112  debugPrintOut(context, outputHandle);
113  }
114  ATH_MSG_DEBUG("Merging complete: from "<<totalInput<<" input decision to "<<outputHandle->size()<<" output decisions");
115 
116  return StatusCode::SUCCESS;
117 }

◆ decisionOutputs()

const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & InputMakerBase::decisionOutputs ( ) const
protectedinherited

methods for derived classes to access handles of the base class input and output decisions; other read/write handles may be implemented by derived classes

Definition at line 21 of file InputMakerBase.cxx.

21  {
22  return m_outputs;
23 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  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 > &  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 > &  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 > &  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 > &  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; }

◆ 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 EventViewCreatorAlgorithm::execute ( const EventContext &  context) const
overridevirtual

Definition at line 48 of file EventViewCreatorAlgorithm.cxx.

48  {
49 
50  // create the output decisions from the input collections
51  ATH_MSG_DEBUG("Starting to merge " << decisionInputs().size() << " inputs to the " << decisionOutputs().key() << " output.");
53  ATH_CHECK(outputHandle.isValid());
54  ATH_CHECK(decisionInputToOutput(context, outputHandle));
55  ATH_MSG_DEBUG("Merging complete");
56 
57  // make the views
58  auto viewsHandle = SG::makeHandle( m_viewsKey, context );
59  ATH_CHECK( viewsHandle.record( std::make_unique<ViewContainer>() ) );
60  auto viewVector = viewsHandle.ptr();
61 
62  // Check for an optional input handle to use as a source of cached, already-executed, views.
63  const DecisionContainer* cachedViews = nullptr;
64  MatchingCache matchingCache; // Used to remember temporarily which hash is associated with each DecisionObject when performing maching in a PROBE IM to TAG IM DecisionObjects
65  if (!m_cachedViewsKey.empty()) {
67  // Even if the handle is configured, this precursor EventViewCreatorAlg may not have executed in a given event
68  if (cachedRH.isValid()) {
69  cachedViews = cachedRH.ptr();
70  ATH_CHECK(populateMatchingCacheWithCachedViews(cachedViews, matchingCache, context));
71  }
72  }
73 
74  // Keep track of the ROIs we spawn a View for, do not spawn duplicates.
75  // For many cases, this will be covered by the Merging operation preceding this.
76  std::vector<ElementLink<TrigRoiDescriptorCollection>> RoIsFromDecision;
77 
78  if( outputHandle->size() == 0) {
79  ATH_MSG_DEBUG( "Have no decisions in output handle "<< outputHandle.key() << ". Handle is valid but container is empty. "
80  << "This can happen if a ROI-based HLT chain leg was activated in a chain whose L1 item which does not explicitly require the ROI.");
81  } else {
82  ATH_MSG_DEBUG( "Have output " << outputHandle.key() << " with " << outputHandle->size() << " elements" );
83  }
84 
85  // Find and link to the output Decision objects the ROIs to run over
86  ATH_CHECK( m_roiTool->attachROILinks(*outputHandle, context) );
87 
88  for ( Decision* outputDecision : *outputHandle ) {
89 
90  if (!outputDecision->hasObjectLink(roiString(), ClassID_traits<TrigRoiDescriptorCollection>::ID())) {
91  ATH_MSG_ERROR("No '" << roiString() << "'link was attached by the ROITool. Decision object dump:" << *outputDecision);
92  return StatusCode::FAILURE;
93  }
94  const ElementLink<TrigRoiDescriptorCollection> roiEL = outputDecision->objectLink<TrigRoiDescriptorCollection>(roiString());
95  ATH_CHECK(roiEL.isValid());
96 
97  // We do one of three things here, either...
98  // a) We realise that an identically configured past EVCA has already run a View on an equivalent ROI. If so we can re-use this.
99  // b) We encounter a new ROI and hence need to spawn a new view.
100  // c) We encounter a ROI that we have already seen in looping over this outputHandle, we can re-use a view.
101 
102  // cachedIndex and useCached are to do with a)
103  size_t cachedIndex = std::numeric_limits<std::size_t>::max();
104  const bool useCached = checkCache(cachedViews, outputDecision, cachedIndex, matchingCache, context);
105 
106  // roiIt is to do with b) and c)
107  auto roiIt = find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL);
108 
109  if (useCached) {
110 
111  // Re-use an already processed view from a previously executed EVCA instance
112  const Decision* cached = cachedViews->at(cachedIndex);
113  ElementLink<ViewContainer> cachedViewEL = cached->objectLink<ViewContainer>(viewString());
115  ATH_CHECK(cachedViewEL.isValid());
116  ATH_CHECK(cachedROIEL.isValid());
117  ATH_MSG_DEBUG("Re-using cached existing view from " << cachedViewEL.dataID() << ", index:" << cachedViewEL.index() << " on ROI " << **cachedROIEL);
118  outputDecision->setObjectLink( viewString(), cachedViewEL );
119  outputDecision->setObjectLink( roiString(), cachedROIEL );
120  // Note: This overwrites the link created in the above tool with what should be a spatially identical ROI (check?)
121 
122  } else if ( roiIt == RoIsFromDecision.end() ) {
123 
124  // We have not yet spawned an ROI on this View. Do it now.
125  RoIsFromDecision.push_back(roiEL);
126  ATH_MSG_DEBUG("Found RoI:" << **roiEL << " FS=" << (*roiEL)->isFullscan() << ". Making View.");
127  SG::View* newView = ViewHelper::makeView( name()+"_view", viewVector->size() /*view counter*/, m_viewFallThrough );
128  viewVector->push_back( newView );
129  // Use a fall-through filter if one is provided
130  if ( m_viewFallFilter.size() ) {
131  newView->setFilter( m_viewFallFilter );
132  }
133  // Set parent view, if required. Note: Must be called before we link the new view to outputDecision.
134  ATH_CHECK(linkViewToParent(outputDecision, newView));
135  // Add the single ROI into the view to seed it.
136  ATH_CHECK(placeRoIInView(roiEL, viewVector->back(), context));
137  // Special muon case - following from a FullScan view, seed each new View with its MuonCombined::MuonCandidate
138  if (m_placeMuonInView) {
139  std::vector<LinkInfo<xAOD::MuonContainer>> muonELInfo = findLinks<xAOD::MuonContainer>(outputDecision, featureString(), TrigDefs::lastFeatureOfType);
140  ATH_CHECK( muonELInfo.size() == 1 );
141  ATH_CHECK( muonELInfo.at(0).isValid() );
142  ATH_CHECK( placeMuonInView( *(muonELInfo.at(0).link), viewVector->back(), context ) );
143  }
144  // Special jet case - following from a FullScan view, seed each new View with its xAOD::Jet
145  if (m_placeJetInView) {
146  std::vector<LinkInfo<xAOD::JetContainer>> jetELInfo = findLinks<xAOD::JetContainer>(outputDecision, featureString(), TrigDefs::lastFeatureOfType);
147  ATH_CHECK( jetELInfo.size() == 1 );
148  ATH_CHECK( jetELInfo.at(0).isValid() );
149  ATH_CHECK( placeJetInView( *(jetELInfo.at(0).link), viewVector->back(), context ) );
150  }
151  // Link the view to the Decision object
152  outputDecision->setObjectLink( viewString(), ElementLink<ViewContainer>(m_viewsKey.key(), viewVector->size()-1 ));
153  ATH_MSG_DEBUG( "Made new View, storing view in viewVector " << m_viewsKey.key() << " index:" << viewVector->size()-1 );
154 
155  } else {
156 
157  // We have already spawned a ROI in this View. Link it here too.
158  const size_t existingIndex = std::distance(RoIsFromDecision.begin(), roiIt);
159  ATH_MSG_DEBUG("Found existing View, stored in view in viewVector " << m_viewsKey.key() << " index:" << existingIndex );
160  outputDecision->setObjectLink( viewString(), ElementLink<ViewContainer>(m_viewsKey.key(), existingIndex )); //adding View link to Decision
161 
162  }
163  } // loop over output decisions
164 
165  // launch view execution
166  ATH_MSG_DEBUG( "Launching execution in " << viewVector->size() << " unique views" );
167  ATH_CHECK( ViewHelper::scheduleViews( viewVector, // Vector containing views
168  m_viewNodeName, // CF node to attach views to
169  context, // Source context
170  getScheduler(), // Scheduler to launch with
171  m_reverseViews ) ); // Debug option
172 
173  return StatusCode::SUCCESS;
174 }

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

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ finalize()

virtual StatusCode EventViewCreatorAlgorithm::finalize ( )
inlineoverridevirtual

Definition at line 51 of file EventViewCreatorAlgorithm.h.

51 { return StatusCode::SUCCESS; }

◆ getMatchingHashForDecision()

uint64_t InputMakerBase::getMatchingHashForDecision ( const TrigCompositeUtils::Decision toMatch,
const std::string &  linkNameToMatch,
const EventContext &  ctx 
) const
protectedinherited

Searches from toMatch to locate a single (type-less) Element Link with given edge name. Returns a hash corresponding to this Element Link.

< Used to accelerate the recursive typelessFindLinks.

Definition at line 162 of file InputMakerBase.cxx.

162  {
163  std::set<const Decision*> cache;
164  std::vector<SG::sgkey_t> keys;
165  std::vector<uint32_t> clids;
166  std::vector<uint16_t> indicies;
167  std::vector<const Decision*> sources; // Unused
168  TrigCompositeUtils::typelessFindLinks(toMatch, linkNameToMatch, keys, clids, indicies, sources, TrigDefs::lastFeatureOfType, &cache);
169  ATH_MSG_DEBUG("getMatchingHashForDecision keys.size()="<<keys.size());
170  if (keys.size() != 1) {
171  bool suppressError = false;
172  // We silence this ERROR when the IM isEmptyStep and we are tentatively testing at runtime if there is an available "feature" link.
173  if (m_isEmptyStep and linkNameToMatch == featureString()) {
174  suppressError = true;
175  }
176  // However... we _always_ want to print the ERROR if we got here not because keys.size() == 0 but because keys.size() > 1!
177  // This is an ambiguous situation, and such things are always bad.
178  if ( keys.size() > 1) {
179  suppressError = false;
180  }
181  if (not suppressError) {
182  ATH_MSG_ERROR("InputMakerBase::getMatchingHashForDecision Did not locate exactly one object having searched for a link named '" << linkNameToMatch
183  << "', found " << keys.size() << ". Unable to match this Decision object.");
184  for (size_t i = 0; i < keys.size(); ++i) {
185  const std::string* sgKeyStr = evtStore()->keyToString(keys.at(i));
186  ATH_MSG_ERROR(" -- Key:" << keys.at(i) << " KeyStr:" << (sgKeyStr ? *sgKeyStr : "UNKNOWN") << " Index:" << indicies.at(i) << " CLID:" << clids.at(i));
187  }
188  // Super verbose output
189  ATH_MSG_ERROR(" -- -- TRACKING FULL HISTORY ");
190  NavGraph navGraph;
191  recursiveGetDecisions(toMatch, navGraph, ctx);
192  navGraph.printAllPaths(msg(), MSG::ERROR);
193  }
195  }
196 
197  // Construct a new hash by combining the SGkey (a hash), the CLID (a hash) and the index (an offset)
198  const uint64_t matchingHash = keys.at(0) + clids.at(0) + indicies.at(0);
199  return matchingHash;
200 }

◆ getScheduler()

SmartIF<IScheduler> EventViewCreatorAlgorithm::getScheduler ( ) const
protected

Obtain smart pointer to scheduler in order to schedule newly spawned views.

◆ initialize()

StatusCode EventViewCreatorAlgorithm::initialize ( )
overridevirtual

Definition at line 22 of file EventViewCreatorAlgorithm.cxx.

22  {
23  ATH_MSG_DEBUG("Will produce views=" << m_viewsKey << " roIs=" << m_inViewRoIs );
26  ATH_CHECK( m_roiTool.retrieve() );
28  if (not m_cachedViewsKey.empty()) {
29  renounce(m_cachedViewsKey); // Reading in and using cached inputs is optional, not guarenteed to be produced in every event.
30  }
31 
32  if (m_isEmptyStep) {
33  ATH_MSG_ERROR("The EventViewCreatorAlgorithm class cannot be used as the InputMaker for an empty step.");
34  return StatusCode::FAILURE;
35  }
36 
37  // Muon slice code
40 
41  // Jet slice code
43 
44  return StatusCode::SUCCESS;
45 }

◆ 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()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ linkViewToParent()

StatusCode EventViewCreatorAlgorithm::linkViewToParent ( const TrigCompositeUtils::Decision outputDecision,
SG::View newView 
) const
protected

Makes sure the views are linked, if configuration requireParentView is set.

Failure to set the parent is an error

Definition at line 263 of file EventViewCreatorAlgorithm.cxx.

263  {
264  if (!m_requireParentView) {
265  ATH_MSG_DEBUG("Parent view linking not required");
266  return StatusCode::SUCCESS;
267  }
268  // We must call this BEFORE having added the new link, check
269  if (outputDecision->hasObjectLink(viewString())) {
270  ATH_MSG_ERROR("Called linkViewToParent on a Decision object which already has been given a '"
271  << viewString() << "' link. Call this fn BEFORE linking the new View.");
272  return StatusCode::FAILURE;
273  }
274  std::vector<LinkInfo<ViewContainer>> viewsToLinkVector = viewsToLink(outputDecision);
275  if (viewsToLinkVector.size() == 0) {
276  ATH_MSG_ERROR("Could not find the parent View, but 'RequireParentView' is true.");
277  return StatusCode::FAILURE;
278  }
279  // Note: Some Physics Objects will have diverging reco paths, but later re-combine.
280  // Examples include an ROI processed as both Electron and Photon re-combining for PrecisionCalo.
281  // Or, a tau ROI processed with different algorithms for different chains in an earlier Step.
282  // This will only cause a problem if downstream a collection is requested which was produced in more that one
283  // of the linked parent Views (or their parents...) as it is then ambiguous which collection should be read.
284  ATH_MSG_DEBUG( "Will link " << viewsToLinkVector.size() << " parent view(s)" );
285  for (const LinkInfo<ViewContainer>& toLinkLI : viewsToLinkVector) {
286  ATH_CHECK(toLinkLI.isValid());
287  newView->linkParent( *(toLinkLI.link) );
288  ATH_MSG_DEBUG( "Parent view linked (" << toLinkLI.link.dataID() << ", index:" << toLinkLI.link.index() << ")" );
289  }
290 
291  return StatusCode::SUCCESS;
292 }

◆ matchDecision()

size_t InputMakerBase::matchDecision ( const TrigCompositeUtils::DecisionContainer outDecisions,
const TrigCompositeUtils::Decision toMatch,
const std::string &  linkNameToMatch,
MatchingCache matchingCache,
const EventContext &  ctx 
) const
protectedinherited

Checks for merge-able Decision objects coming from N upstream filters. Check based on most-recent element link with name 'linkNameToMatch'. Works for any link type.

Definition at line 143 of file InputMakerBase.cxx.

143  {
144  const uint64_t matchingHash = getMatchingHashForDecision(toMatch, linkNameToMatch, ctx);
145  ATH_MSG_DEBUG("matchDecision "<<linkNameToMatch<<" with matchingHash="<<matchingHash);
146  // Cache this matching hash, so that in subsequent calls we can compare other incoming decision object's matching hash against this one
147  matchingCache.setMatchingHash(toMatch, matchingHash);
148 
149  // Look for match
150  for (size_t index = 0; index < outDecisions->size(); ++index) {
151  const TrigCompositeUtils::Decision* checkDecision = outDecisions->at(index);
152  const uint64_t checkHash = matchingCache.getMatchingHash(checkDecision);
153  ATH_MSG_DEBUG("matchDecision checkHash="<<checkHash<<" index="<<index);
154  if (checkHash == matchingHash) {
155  return index;
156  }
157  }
158 
160 }

◆ matchInCollection()

bool InputMakerBase::matchInCollection ( const TrigCompositeUtils::DecisionContainer outDecisions,
const TrigCompositeUtils::Decision toMatch,
size_t &  matchIndex,
bool &  usedROIMatchingFlag,
MatchingCache matchingCache,
const EventContext &  ctx 
) const
protectedinherited

Wrapper around matchDecision. Returns boolean if the match was successful.

< Used to accelerate the recursive typelessFindLinks.

Definition at line 120 of file InputMakerBase.cxx.

120  {
121  std::set<const Decision*> cache;
122  std::vector<SG::sgkey_t> keys;
123  std::vector<uint32_t> clids;
124  std::vector<uint16_t> indicies;
125  std::vector<const Decision*> sources; // Unused
126  TrigCompositeUtils::typelessFindLinks(toMatch, featureString(), keys, clids, indicies, sources, TrigDefs::lastFeatureOfType, &cache);
127  bool hasFeature = false;
128  if (keys.size() != 0) hasFeature=true;
129  ATH_MSG_DEBUG("This decision hasFeature="<< hasFeature);
130  // Do feature based matching if configured to do so, or do it tentatively for empty step IMs (will not generate an ERROR if it fails for the empty step case)
131  if ( m_mergeUsingFeature == true or (m_isEmptyStep and hasFeature) ) {
132  matchIndex = matchDecision(outDecisions, toMatch, featureString(), matchingCache, ctx);
133  ATH_MSG_DEBUG("matchDecision in features: "<< matchIndex);
134  }
135  // Do ROI based batching if configured to do so, or if feature matching failed for an empty step IM.
136  else {
137  matchIndex = matchDecision(outDecisions, toMatch, m_roisLink.value(), matchingCache, ctx);
138  usedROIMatchingFlag = true;
139  }
140  return (matchIndex != std::numeric_limits<std::size_t>::max());
141 }

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

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

◆ placeJetInView()

StatusCode EventViewCreatorAlgorithm::placeJetInView ( const xAOD::Jet theObject,
SG::View view,
const EventContext &  context 
) const
protected

Creates a SG::VIEW_ELEMENTS collection inside a newly created View populated by the jet used to seed the View.

Definition at line 339 of file EventViewCreatorAlgorithm.cxx.

339  {
340 
341  // fill the Jet output collection
342  ATH_MSG_DEBUG( "Adding Jet To View : " << m_inViewJets.key() );
343 
344  auto oneObjectCollection = std::make_unique< xAOD::JetContainer >();
345  auto oneObjectAuxCollection = std::make_unique< xAOD::JetAuxContainer >();
346  oneObjectCollection->setStore( oneObjectAuxCollection.get() );
347 
348  xAOD::Jet* copiedJet = new xAOD::Jet();
349  oneObjectCollection->push_back( copiedJet );
350  *copiedJet = *theObject;
351 
352  auto handle = SG::makeHandle( m_inViewJets,context );
353  ATH_CHECK( handle.setProxyDict( view ) );
354  ATH_CHECK( handle.record( std::move(oneObjectCollection),std::move(oneObjectAuxCollection) ) );
355 
356  return StatusCode::SUCCESS;
357 }

◆ placeMuonInView()

StatusCode EventViewCreatorAlgorithm::placeMuonInView ( const xAOD::Muon theObject,
SG::View view,
const EventContext &  context 
) const
protected

Creates a SG::VIEW_ELEMENTS collection inside a newly created View populated by the MuonCombined::MuonCandidate used to seed the View Also currently populated by the xAOD::Muon for the iso use case, but this should be removed.

Definition at line 310 of file EventViewCreatorAlgorithm.cxx.

310  {
311  // fill the Muon output collection
312  ATH_MSG_DEBUG( "Adding Muon To View : " << m_inViewMuons.key()<<" and "<<m_inViewMuonCandidates.key() );
313  auto oneObjectCollection = std::make_unique< xAOD::MuonContainer >();
314  auto oneObjectAuxCollection = std::make_unique< xAOD::MuonAuxContainer >();
315  oneObjectCollection->setStore( oneObjectAuxCollection.get() );
316 
317  xAOD::Muon* copiedMuon = new xAOD::Muon();
318  oneObjectCollection->push_back( copiedMuon );
319  *copiedMuon = *theObject;
320 
321  auto muonCandidate = std::make_unique< ConstDataVector< MuonCandidateCollection > >();
322  auto msLink = theObject->muonSpectrometerTrackParticleLink();
323  auto extTrackLink = theObject->extrapolatedMuonSpectrometerTrackParticleLink();
324  if(msLink.isValid() && extTrackLink.isValid()) muonCandidate->push_back( new MuonCombined::MuonCandidate(msLink, (*extTrackLink)->trackLink(), (*extTrackLink)->index()) );
325 
326  //store both in the view
327  auto handleMuon = SG::makeHandle( m_inViewMuons,context );
328  ATH_CHECK( handleMuon.setProxyDict( view ) );
329  ATH_CHECK( handleMuon.record( std::move( oneObjectCollection ), std::move( oneObjectAuxCollection )) );
330 
331  auto handleCandidate = SG::makeHandle( m_inViewMuonCandidates,context );
332  ATH_CHECK( handleCandidate.setProxyDict( view ) );
333  ATH_CHECK( handleCandidate.record( std::move( muonCandidate ) ) );
334 
335  return StatusCode::SUCCESS;
336 }

◆ placeRoIInView()

StatusCode EventViewCreatorAlgorithm::placeRoIInView ( const ElementLink< TrigRoiDescriptorCollection > &  roi,
SG::View view,
const EventContext &  context 
) const
protected

Seeds a newly created view with an ROI collection containing the single seeding ROI.

Definition at line 294 of file EventViewCreatorAlgorithm.cxx.

294  {
295  // fill the RoI output collection
296  auto oneRoIColl = std::make_unique< ConstDataVector<TrigRoiDescriptorCollection> >();
297  oneRoIColl->clear( SG::VIEW_ELEMENTS ); //Don't delete the RoIs
298  oneRoIColl->push_back( *roiEL );
299 
300  view->setROI(roiEL);
301 
302  //store the RoI in the view
303  auto handle = SG::makeHandle( m_inViewRoIs, context );
304  ATH_CHECK( handle.setProxyDict( view ) );
305  ATH_CHECK( handle.record( std::move( oneRoIColl ) ) );
306  return StatusCode::SUCCESS;
307 }

◆ populateMatchingCacheWithCachedViews()

StatusCode EventViewCreatorAlgorithm::populateMatchingCacheWithCachedViews ( const TrigCompositeUtils::DecisionContainer cachedViews,
MatchingCache matchingCache,
const EventContext &  context 
) const
protected

We look for matching Decision Objects in a matchingCache.

When we are trying in a PROBE InputMaker to match against the Decision Objects created prior in a TAG InputMaker then we need to pre-populate the cache with the data from the TAG InputMaker.

Definition at line 248 of file EventViewCreatorAlgorithm.cxx.

248  {
249  const std::string linkNameToMatch = m_mergeUsingFeature ? featureString() : m_roisLink.value();
250  for (const Decision* cachedView : *cachedViews) {
251  const uint64_t matchingHash = getMatchingHashForDecision(cachedView, linkNameToMatch, context);
252  if (matchingHash == std::numeric_limits<std::size_t>::max()) {
253  return StatusCode::FAILURE;
254  }
255  matchingCache.setMatchingHash(cachedView, matchingHash);
256  // There is no output-to-input redirection required when we're matching against the old TAG collection in the PROBE EVCA, so we can set key=value in this redirection map
257  matchingCache.linkOutputToInput(cachedView, cachedView);
258  }
259  return StatusCode::SUCCESS;
260 }

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

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::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 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode InputMakerBase::sysInitialize ( )
overridevirtualinherited

initialise this base class and renounce input decision key handles

Reimplemented from AthReentrantAlgorithm.

Definition at line 25 of file InputMakerBase.cxx.

25  {
26  CHECK( AthReentrantAlgorithm::sysInitialize() ); // initialise base class
29  ATH_MSG_DEBUG("roisLink="<<m_roisLink);
30  CHECK( m_inputs.initialize() );
31  renounceArray(m_inputs); // make inputs implicit, i.e. not required by scheduler
32  ATH_MSG_DEBUG("Will consume implicit decisions:" );
33  for (auto& input: m_inputs){
34  ATH_MSG_DEBUG( " "<<input.key() );
35  }
36  CHECK( m_outputs.initialize() );
37  ATH_MSG_DEBUG(" and produce decisions: " << m_outputs.key());
38  return StatusCode::SUCCESS;
39 }

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

◆ viewsToLink()

std::vector< LinkInfo< ViewContainer > > EventViewCreatorAlgorithm::viewsToLink ( const TrigCompositeUtils::Decision outputDecision) const
private

Obtain view(s) from most recent prior step(s) which are to be wired up.

Definition at line 183 of file EventViewCreatorAlgorithm.cxx.

183  {
184  return findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::lastFeatureOfType);
185 }

Member Data Documentation

◆ m_cacheDisabled

Gaudi::Property< bool > EventViewCreatorAlgorithm::m_cacheDisabled
protected
Initial value:
{ this, "CacheDisabled", false,
"Set whether cached EventViews are to be accessed" }

Definition at line 108 of file EventViewCreatorAlgorithm.h.

◆ m_cachedViewsKey

SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> EventViewCreatorAlgorithm::m_cachedViewsKey
protected
Initial value:
{ this, "InputCachedViews", "",
"Optional ReadHandle on the output (InputMakerOutputDecisions) of an EVCA in a previous Step, whose Views can be re-used. Not currently used." }

Definition at line 77 of file EventViewCreatorAlgorithm.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_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 AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_inputs

SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> InputMakerBase::m_inputs { this, "InputMakerInputDecisions", {}, "Input Decisions (implicit)" }
privateinherited

input decisions array, will be implicit (renounced).

Definition at line 89 of file InputMakerBase.h.

◆ m_inViewJets

SG::WriteHandleKey< xAOD::JetContainer > EventViewCreatorAlgorithm::m_inViewJets
protected
Initial value:
{this,"InViewJets","",
"Name with which the Jet should be inserted into the views"}

Definition at line 112 of file EventViewCreatorAlgorithm.h.

◆ m_inViewMuonCandidates

SG::WriteHandleKey< ConstDataVector<MuonCandidateCollection> > EventViewCreatorAlgorithm::m_inViewMuonCandidates
protected
Initial value:
{this,"InViewMuonCandidates","",
"Name with which the Muon Candidate should be inserted into the views"}

Definition at line 92 of file EventViewCreatorAlgorithm.h.

◆ m_inViewMuons

SG::WriteHandleKey< xAOD::MuonContainer > EventViewCreatorAlgorithm::m_inViewMuons
protected
Initial value:
{this,"InViewMuons","",
"Name with which the Muon should be inserted into the views"}

Definition at line 89 of file EventViewCreatorAlgorithm.h.

◆ m_inViewRoIs

SG::WriteHandleKey< ConstDataVector<TrigRoiDescriptorCollection> > EventViewCreatorAlgorithm::m_inViewRoIs
protected
Initial value:
{ this, "InViewRoIs", "Unspecified",
"Name of the collection which should be inserted into the just-spawned views to seed them with their ROI" }

Definition at line 59 of file EventViewCreatorAlgorithm.h.

◆ m_isEmptyStep

Gaudi::Property<bool> InputMakerBase::m_isEmptyStep
protectedinherited
Initial value:
{this, "isEmptyStep", false,
"True if this InputMaker instance is being used in an empty step. Forgoes the requirement to link an ROI, and auto-configures the 'mergeUsingFeature' property at runtime." }

Definition at line 56 of file InputMakerBase.h.

◆ m_mergeUsingFeature

Gaudi::Property<bool> InputMakerBase::m_mergeUsingFeature
protectedinherited
Initial value:
{this, "mergeUsingFeature", false,
"True=the IParicle-derived feature from the previous step is used to determine identical inputs. False=the ROI located with the RoIsLink property is used to determine identical inputs" }

Definition at line 53 of file InputMakerBase.h.

◆ m_outputs

SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> InputMakerBase::m_outputs { this, "InputMakerOutputDecisions", "", "Output Decisions" }
privateinherited

output decisions

Definition at line 92 of file InputMakerBase.h.

◆ m_placeJetInView

Gaudi::Property< bool > EventViewCreatorAlgorithm::m_placeJetInView
protected
Initial value:
{ this, "PlaceJetInView", false,
"Jet slice specific option. Place Jet inside newly spawned View instance. See also InViewJets" }

Definition at line 104 of file EventViewCreatorAlgorithm.h.

◆ m_placeMuonInView

Gaudi::Property< bool > EventViewCreatorAlgorithm::m_placeMuonInView
protected
Initial value:
{ this, "PlaceMuonInView", false,
"Muon slice specific option. Place Muon and MuonCandidate inside newly spawned View instance. See also InViewMuons, InViewMuonCandidates" }

Definition at line 85 of file EventViewCreatorAlgorithm.h.

◆ m_requireParentView

Gaudi::Property< bool > EventViewCreatorAlgorithm::m_requireParentView
protected
Initial value:
{ this, "RequireParentView", false,
"For each new view, locate and link any parent views (previous step). Fail if no parent view can not be found." }

Definition at line 71 of file EventViewCreatorAlgorithm.h.

◆ m_reverseViews

Gaudi::Property< bool > EventViewCreatorAlgorithm::m_reverseViews
protected
Initial value:
{ this, "ReverseViewsDebug", false,
"Reverse order of views, as a debugging option" }

Definition at line 74 of file EventViewCreatorAlgorithm.h.

◆ m_roisLink

StringProperty InputMakerBase::m_roisLink
protectedinherited
Initial value:
{this, "RoIsLink", "initialRoI",
"Name of EL to RoI object linked to the decision, used in merging input Decision objects when mergeUsingFeature=False." }

Definition at line 50 of file InputMakerBase.h.

◆ m_roiTool

ToolHandle<IViewCreatorROITool> EventViewCreatorAlgorithm::m_roiTool
protected
Initial value:
{this, "RoITool", "",
"Tool used to supply per-Decision Object the RoI on which the Decision Object's view is to be spawned"}

Definition at line 80 of file EventViewCreatorAlgorithm.h.

◆ m_schedulerName

Gaudi::Property< std::string > EventViewCreatorAlgorithm::m_schedulerName { this, "SchedulerName", "AvalancheSchedulerSvc", "Name of the scheduler" }
protected

Definition at line 63 of file EventViewCreatorAlgorithm.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.

◆ m_viewFallFilter

Gaudi::Property< std::vector< std::string > > EventViewCreatorAlgorithm::m_viewFallFilter
protected
Initial value:
{ this, "FallThroughFilter", {},
"An optional list of SG keys (or parts of them) that can come from StoreGate via FallThrough" }

Definition at line 68 of file EventViewCreatorAlgorithm.h.

◆ m_viewFallThrough

Gaudi::Property< bool > EventViewCreatorAlgorithm::m_viewFallThrough
protected
Initial value:
{ this, "ViewFallThrough", false,
"Set whether views may access StoreGate directly to retrieve data" }

Definition at line 66 of file EventViewCreatorAlgorithm.h.

◆ m_viewNodeName

Gaudi::Property< std::string > EventViewCreatorAlgorithm::m_viewNodeName { this, "ViewNodeName", "", "Name of the ControlFlow node to attach new views to" }
protected

Definition at line 64 of file EventViewCreatorAlgorithm.h.

◆ m_viewsKey

SG::WriteHandleKey< ViewContainer > EventViewCreatorAlgorithm::m_viewsKey
protected
Initial value:
{ this, "Views", "Unspecified",
"The key of views collection produced" }

Definition at line 56 of file EventViewCreatorAlgorithm.h.


The documentation for this class was generated from the following files:
EventViewCreatorAlgorithm::m_inViewMuonCandidates
SG::WriteHandleKey< ConstDataVector< MuonCandidateCollection > > m_inViewMuonCandidates
Definition: EventViewCreatorAlgorithm.h:92
InputMakerBase::matchInCollection
bool matchInCollection(const TrigCompositeUtils::DecisionContainer *outDecisions, const TrigCompositeUtils::Decision *toMatch, size_t &matchIndex, bool &usedROIMatchingFlag, MatchingCache &matchingCache, const EventContext &ctx) const
Wrapper around matchDecision. Returns boolean if the match was successful.
Definition: InputMakerBase.cxx:120
EventViewCreatorAlgorithm::m_requireParentView
Gaudi::Property< bool > m_requireParentView
Definition: EventViewCreatorAlgorithm.h:71
InputMakerBase::m_mergeUsingFeature
Gaudi::Property< bool > m_mergeUsingFeature
Definition: InputMakerBase.h:53
EventViewCreatorAlgorithm::populateMatchingCacheWithCachedViews
StatusCode populateMatchingCacheWithCachedViews(const TrigCompositeUtils::DecisionContainer *cachedViews, MatchingCache &matchingCache, const EventContext &context) const
We look for matching Decision Objects in a matchingCache.
Definition: EventViewCreatorAlgorithm.cxx:248
xAOD::TrigComposite_v1::setDetail
bool setDetail(const std::string &name, const TYPE &value)
Set an TYPE detail on the object.
InputMakerBase::decisionInputToOutput
StatusCode decisionInputToOutput(const EventContext &context, SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle) const
does the standard handling of input decisions: read from handles with all the checks,...
Definition: InputMakerBase.cxx:43
get_generator_info.result
result
Definition: get_generator_info.py:21
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
TrigCompositeUtils::DecisionID
unsigned int DecisionID
Definition: TrigComposite_v1.h:27
EventViewCreatorAlgorithm::m_viewFallFilter
Gaudi::Property< std::vector< std::string > > m_viewFallFilter
Definition: EventViewCreatorAlgorithm.h:68
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
EventViewCreatorAlgorithm::linkViewToParent
StatusCode linkViewToParent(const TrigCompositeUtils::Decision *outputDecision, SG::View *newView) const
Makes sure the views are linked, if configuration requireParentView is set.
Definition: EventViewCreatorAlgorithm.cxx:263
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
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:46
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
EventViewCreatorAlgorithm::m_cachedViewsKey
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_cachedViewsKey
Definition: EventViewCreatorAlgorithm.h:77
EventViewCreatorAlgorithm::getScheduler
SmartIF< IScheduler > getScheduler() const
Obtain smart pointer to scheduler in order to schedule newly spawned views.
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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
xAOD::TrigComposite_v1::hasObjectLink
bool hasObjectLink(const std::string &name, const CLID clid=CLID_NULL) const
Check if a link to an object with a given name and type exists. CLID_NULL to not check type.
Definition: TrigComposite_v1.cxx:226
InputMakerBase::InputMakerBase
InputMakerBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
Definition: InputMakerBase.cxx:12
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
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:80
AthCommonMsg< Gaudi::Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
athena.value
value
Definition: athena.py:122
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:30
TrigCompositeUtils::NavGraph::printAllPaths
void printAllPaths(MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const
Helper function.
Definition: NavGraph.cxx:165
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray
void renounceArray(SG::VarHandleKeyArray &handlesArray)
remove all handles from I/O resolution
Definition: AthCommonDataStore.h:364
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InputMakerBase::decisionInputs
const SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionInputs() const
methods for derived classes to access handles of the base class input and output decisions; other rea...
Definition: InputMakerBase.cxx:17
EventViewCreatorAlgorithm::placeMuonInView
StatusCode placeMuonInView(const xAOD::Muon *theObject, SG::View *view, const EventContext &context) const
Creates a SG::VIEW_ELEMENTS collection inside a newly created View populated by the MuonCombined::Muo...
Definition: EventViewCreatorAlgorithm.cxx:310
TileDigitizationConfig.inputKey
inputKey
Definition: TileDigitizationConfig.py:103
EventViewCreatorAlgorithm::m_inViewJets
SG::WriteHandleKey< xAOD::JetContainer > m_inViewJets
Definition: EventViewCreatorAlgorithm.h:112
endsWith
bool endsWith(const std::string &value, const std::string &ending)
Definition: EventViewCreatorAlgorithm.cxx:176
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
EventViewCreatorAlgorithm::m_reverseViews
Gaudi::Property< bool > m_reverseViews
Definition: EventViewCreatorAlgorithm.h:74
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
SG::View::linkParent
void linkParent(const IProxyDict *parent)
Definition: View.h:66
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
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
EventViewCreatorAlgorithm::m_roiTool
ToolHandle< IViewCreatorROITool > m_roiTool
Definition: EventViewCreatorAlgorithm.h:80
EventViewCreatorAlgorithm::m_inViewMuons
SG::WriteHandleKey< xAOD::MuonContainer > m_inViewMuons
Definition: EventViewCreatorAlgorithm.h:89
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
MuonCombined::MuonCandidate
Definition: Reconstruction/MuonIdentification/MuonCombinedEvent/MuonCombinedEvent/MuonCandidate.h:25
EventViewCreatorAlgorithm::m_inViewRoIs
SG::WriteHandleKey< ConstDataVector< TrigRoiDescriptorCollection > > m_inViewRoIs
Definition: EventViewCreatorAlgorithm.h:59
TrigCompositeUtils::typelessFindLinks
bool typelessFindLinks(const Decision *start, const std::string &linkName, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< uint16_t > &indexVec, std::vector< const Decision * > &sourceVec, const unsigned int behaviour, std::set< const Decision * > *fullyExploredFrom)
search back the TC links for the object of type T linked to the one of TC (recursively) Returns the l...
Definition: TrigCompositeUtilsRoot.cxx:581
ViewHelper::makeView
SG::View * makeView(const std::string &common_name, int const unique_index=-1, bool const allowFallThrough=true)
Definition: ViewHelper.h:241
lumiFormat.i
int i
Definition: lumiFormat.py:92
TrigCompositeUtils::getLinkToPrevious
const std::vector< ElementLink< DecisionContainer > > getLinkToPrevious(const Decision *d)
returns links to previous decision object 'seed'
Definition: TrigCompositeUtilsRoot.cxx:156
SG::WriteHandle::ptr
pointer_type ptr()
Dereference the pointer.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ViewHelper::scheduleViews
StatusCode scheduleViews(ViewContainer *viewVector, std::string const &nodeName, EventContext const &sourceContext, SmartIF< IScheduler > scheduler, bool reverseOrder=false)
Definition: ViewHelper.h:84
InputMakerBase::matchDecision
size_t matchDecision(const TrigCompositeUtils::DecisionContainer *outDecisions, const TrigCompositeUtils::Decision *toMatch, const std::string &linkNameToMatch, MatchingCache &matchingCache, const EventContext &ctx) const
Checks for merge-able Decision objects coming from N upstream filters. Check based on most-recent ele...
Definition: InputMakerBase.cxx:143
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:40
xAOD::Muon_v1::muonSpectrometerTrackParticleLink
const ElementLink< TrackParticleContainer > & muonSpectrometerTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
xAOD::TrigComposite_v1::setName
void setName(const std::string &name)
Set a human-readable name for the object.
TrigCompositeUtils::NavGraph
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
Definition: NavGraph.h:98
xAOD::TrigComposite_v1::decisions
const std::vector< TrigCompositeUtils::DecisionID > & decisions() const
Get positive HLT chain decisions associated with this TrigComposite. Navigation use.
EventViewCreatorAlgorithm::m_viewFallThrough
Gaudi::Property< bool > m_viewFallThrough
Definition: EventViewCreatorAlgorithm.h:66
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
EventViewCreatorAlgorithm::viewsToLink
std::vector< TrigCompositeUtils::LinkInfo< ViewContainer > > viewsToLink(const TrigCompositeUtils::Decision *outputDecision) const
Obtain view(s) from most recent prior step(s) which are to be wired up.
Definition: EventViewCreatorAlgorithm.cxx:183
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
EventViewCreatorAlgorithm::m_viewsKey
SG::WriteHandleKey< ViewContainer > m_viewsKey
Definition: EventViewCreatorAlgorithm.h:56
SG::View::setFilter
void setFilter(std::vector< std::string > const &inputFilter)
Definition: View.h:74
EventViewCreatorAlgorithm::m_viewNodeName
Gaudi::Property< std::string > m_viewNodeName
Definition: EventViewCreatorAlgorithm.h:64
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:20
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
InputMakerBase::m_outputs
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_outputs
output decisions
Definition: InputMakerBase.h:92
InputMakerBase::m_roisLink
StringProperty m_roisLink
Definition: InputMakerBase.h:50
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
TrigCompositeUtils::featureString
const std::string & featureString()
Definition: TrigCompositeUtilsRoot.cxx:886
EventViewCreatorAlgorithm::m_cacheDisabled
Gaudi::Property< bool > m_cacheDisabled
Definition: EventViewCreatorAlgorithm.h:108
SG::WriteHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
xAOD::Muon
Muon_v1 Muon
Reference the current persistent version:
Definition: Event/xAOD/xAODMuon/xAODMuon/Muon.h:13
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
InputMakerBase::decisionOutputs
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutputs() const
methods for derived classes to access handles of the base class input and output decisions; other rea...
Definition: InputMakerBase.cxx:21
python.decorators.cached.cached
def cached(func)
Decorator to cache function return value.
Definition: cached.py:6
InputMakerBase::getMatchingHashForDecision
uint64_t getMatchingHashForDecision(const TrigCompositeUtils::Decision *toMatch, const std::string &linkNameToMatch, const EventContext &ctx) const
Searches from toMatch to locate a single (type-less) Element Link with given edge name....
Definition: InputMakerBase.cxx:162
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
InputMakerBase::debugPrintOut
void debugPrintOut(const EventContext &context, SG::WriteHandle< TrigCompositeUtils::DecisionContainer > &outputHandle) const
provides debug printout of the output of the algorithm
Definition: InputMakerBase.cxx:203
SG::ReadHandle::ptr
const_pointer_type ptr()
Dereference the pointer.
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
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:139
DeMoScan.index
string index
Definition: DeMoScan.py:362
EventViewCreatorAlgorithm::placeJetInView
StatusCode placeJetInView(const xAOD::Jet *theObject, SG::View *view, const EventContext &context) const
Creates a SG::VIEW_ELEMENTS collection inside a newly created View populated by the jet used to seed ...
Definition: EventViewCreatorAlgorithm.cxx:339
TrigCompositeUtils::LinkInfo
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition: LinkInfo.h:28
a
TList * a
Definition: liststreamerinfos.cxx:10
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
h
EventViewCreatorAlgorithm::m_placeMuonInView
Gaudi::Property< bool > m_placeMuonInView
Definition: EventViewCreatorAlgorithm.h:85
InputMakerBase::m_isEmptyStep
Gaudi::Property< bool > m_isEmptyStep
Definition: InputMakerBase.h:56
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TrigRoiDescriptorCollection
Definition: TrigRoiDescriptorCollection.h:21
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TrigCompositeUtils::decisionIDs
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
Definition: TrigCompositeUtilsRoot.cxx:67
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
xAOD::Muon_v1::extrapolatedMuonSpectrometerTrackParticleLink
const ElementLink< TrackParticleContainer > & extrapolatedMuonSpectrometerTrackParticleLink() const
Returns an ElementLink to the Extrapolated Muon Spectrometer TrackParticle used in identification of ...
TrigCompositeUtils::roiString
const std::string & roiString()
Definition: TrigCompositeUtilsRoot.cxx:878
TrigCompositeUtils::recursiveGetDecisions
void recursiveGetDecisions(const Decision *start, NavGraph &navGraph, const EventContext &ctx, const DecisionIDContainer &ids, const bool enforceDecisionOnStartNode)
Search back in time from "node" and locate all paths back through Decision objects for a given chain.
Definition: TrigCompositeUtilsRoot.cxx:423
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
EventViewCreatorAlgorithm::m_placeJetInView
Gaudi::Property< bool > m_placeJetInView
Definition: EventViewCreatorAlgorithm.h:104
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
EventViewCreatorAlgorithm::placeRoIInView
StatusCode placeRoIInView(const ElementLink< TrigRoiDescriptorCollection > &roi, SG::View *view, const EventContext &context) const
Seeds a newly created view with an ROI collection containing the single seeding ROI.
Definition: EventViewCreatorAlgorithm.cxx:294
SG::View
Definition: View.h:25
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
EventViewCreatorAlgorithm::checkCache
bool checkCache(const TrigCompositeUtils::DecisionContainer *cachedViews, const TrigCompositeUtils::Decision *outputDecision, size_t &cachedIndex, MatchingCache &matchingCache, const EventContext &context) const
Allow for the re-use of EventViews run in a previous Step in another EVCA instance configured to spaw...
Definition: EventViewCreatorAlgorithm.cxx:187
InputMakerBase::m_inputs
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_inputs
input decisions array, will be implicit (renounced).
Definition: InputMakerBase.h:89
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
TrigCompositeUtils::viewString
const std::string & viewString()
Definition: TrigCompositeUtilsRoot.cxx:882
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
TrigCompositeUtils::inputMakerNodeName
const std::string & inputMakerNodeName()
Definition: TrigCompositeUtilsRoot.cxx:902
fitman.k
k
Definition: fitman.py:528
drawFromPickle.view
view
Definition: drawFromPickle.py:294
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
ViewContainer
Definition: View.h:161