ATLAS Offline Software
Loading...
Searching...
No Matches
EventViewCreatorAlgorithm.cxx
Go to the documentation of this file.
1/*
2 General-purpose view creation algorithm <bwynne@cern.ch>
3
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
8#include "AthLinks/ElementLink.h"
10#include "AthViews/View.h"
12
13#include <sstream>
14
16 if (!track) {
18 }
19 return ElementLink<xAOD::TrackParticleContainer>{static_cast<const xAOD::TrackParticleContainer&>(*track->container()),
20 track->index()};
21}
22
23using namespace TrigCompositeUtils;
24
25EventViewCreatorAlgorithm::EventViewCreatorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator )
26: InputMakerBase( name, pSvcLocator ) {}
27
29
31 ATH_MSG_DEBUG("Will produce views=" << m_viewsKey << " roIs=" << m_inViewRoIs );
32 ATH_CHECK( m_viewsKey.initialize() );
33 ATH_CHECK( m_inViewRoIs.initialize() );
34 ATH_CHECK( m_roiTool.retrieve() );
36 if (not m_cachedViewsKey.empty()) {
37 renounce(m_cachedViewsKey); // Reading in and using cached inputs is optional, not guarenteed to be produced in every event.
38 }
39
40 if (m_isEmptyStep) {
41 ATH_MSG_ERROR("The EventViewCreatorAlgorithm class cannot be used as the InputMaker for an empty step.");
42 return StatusCode::FAILURE;
43 }
44
45 // Muon slice code
48
49 // Jet slice code
51
52 return StatusCode::SUCCESS;
53}
54
55
56StatusCode EventViewCreatorAlgorithm::execute( const EventContext& context ) const {
57
58 // create the output decisions from the input collections
59 ATH_MSG_DEBUG("Starting to merge " << decisionInputs().size() << " inputs to the " << decisionOutputs().key() << " output.");
61 ATH_CHECK(outputHandle.isValid());
62 ATH_CHECK(decisionInputToOutput(context, outputHandle));
63 ATH_MSG_DEBUG("Merging complete");
64
65 // make the views
66 auto viewsHandle = SG::makeHandle( m_viewsKey, context );
67 ATH_CHECK( viewsHandle.record( std::make_unique<ViewContainer>() ) );
68 auto viewVector = viewsHandle.ptr();
69
70 // Check for an optional input handle to use as a source of cached, already-executed, views.
71 const DecisionContainer* cachedViews = nullptr;
72 MatchingCache matchingCache; // Used to remember temporarily which hash is associated with each DecisionObject when performing maching in a PROBE IM to TAG IM DecisionObjects
73 if (!m_cachedViewsKey.empty()) {
75 // Even if the handle is configured, this precursor EventViewCreatorAlg may not have executed in a given event
76 if (cachedRH.isValid()) {
77 cachedViews = cachedRH.ptr();
78 ATH_CHECK(populateMatchingCacheWithCachedViews(cachedViews, matchingCache));
79 }
80 }
81
82 // Keep track of the ROIs we spawn a View for, do not spawn duplicates.
83 // For many cases, this will be covered by the Merging operation preceding this.
84 std::vector<ElementLink<TrigRoiDescriptorCollection>> RoIsFromDecision;
85
86 if( outputHandle->size() == 0) {
87 ATH_MSG_DEBUG( "Have no decisions in output handle "<< outputHandle.key() << ". Handle is valid but container is empty. "
88 << "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.");
89 } else {
90 ATH_MSG_DEBUG( "Have output " << outputHandle.key() << " with " << outputHandle->size() << " elements" );
91 }
92
93 // Find and link to the output Decision objects the ROIs to run over
94 ATH_CHECK( m_roiTool->attachROILinks(*outputHandle, context) );
95
96 for ( Decision* outputDecision : *outputHandle ) {
97
98 if (!outputDecision->hasObjectLink(roiString(), ClassID_traits<TrigRoiDescriptorCollection>::ID())) {
99 ATH_MSG_ERROR("No '" << roiString() << "'link was attached by the ROITool. Decision object dump:" << *outputDecision);
100 return StatusCode::FAILURE;
101 }
102 const ElementLink<TrigRoiDescriptorCollection> roiEL = outputDecision->objectLink<TrigRoiDescriptorCollection>(roiString());
103 ATH_CHECK(roiEL.isValid());
104
105 // We do one of three things here, either...
106 // 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.
107 // b) We encounter a new ROI and hence need to spawn a new view.
108 // c) We encounter a ROI that we have already seen in looping over this outputHandle, we can re-use a view.
109
110 // cachedIndex and useCached are to do with a)
111 size_t cachedIndex = std::numeric_limits<std::size_t>::max();
112 const bool useCached = checkCache(cachedViews, outputDecision, cachedIndex, matchingCache);
113
114 // roiIt is to do with b) and c)
115 auto roiIt = find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL);
116
117 if (useCached) {
118
119 // Re-use an already processed view from a previously executed EVCA instance
120 const Decision* cached = cachedViews->at(cachedIndex);
121 ElementLink<ViewContainer> cachedViewEL = cached->objectLink<ViewContainer>(viewString());
123 ATH_CHECK(cachedViewEL.isValid());
124 ATH_CHECK(cachedROIEL.isValid());
125 ATH_MSG_DEBUG("Re-using cached existing view from " << cachedViewEL.dataID() << ", index:" << cachedViewEL.index() << " on ROI " << **cachedROIEL);
126 outputDecision->setObjectLink( viewString(), cachedViewEL );
127 outputDecision->setObjectLink( roiString(), cachedROIEL );
128 // Note: This overwrites the link created in the above tool with what should be a spatially identical ROI (check?)
129
130 } else if ( roiIt == RoIsFromDecision.end() ) {
131
132 // We have not yet spawned an ROI on this View. Do it now.
133 RoIsFromDecision.push_back(roiEL);
134 ATH_MSG_DEBUG("Found RoI:" << **roiEL << " FS=" << (*roiEL)->isFullscan() << ". Making View.");
135 SG::View* newView = ViewHelper::makeView( name()+"_view", viewVector->size() /*view counter*/, m_viewFallThrough );
136 viewVector->push_back( newView );
137 // Use a fall-through filter if one is provided
138 if ( m_viewFallFilter.size() ) {
139 newView->setFilter( m_viewFallFilter );
140 }
141 // Set parent view, if required. Note: Must be called before we link the new view to outputDecision.
142 ATH_CHECK(linkViewToParent(outputDecision, newView));
143 // Add the single ROI into the view to seed it.
144 ATH_CHECK(placeRoIInView(roiEL, viewVector->back(), context));
145 // Special muon case - following from a FullScan view, seed each new View with its MuonCombined::MuonCandidate
146 if (m_placeMuonInView) {
147 std::vector<LinkInfo<xAOD::MuonContainer>> muonELInfo = findLinks<xAOD::MuonContainer>(outputDecision, featureString(), TrigDefs::lastFeatureOfType);
148 ATH_CHECK( muonELInfo.size() == 1 );
149 ATH_CHECK( muonELInfo.at(0).isValid() );
150 ATH_CHECK( placeMuonInView( *(muonELInfo.at(0).link), viewVector->back(), context ) );
151 }
152 // Special jet case - following from a FullScan view, seed each new View with its xAOD::Jet
153 if (m_placeJetInView) {
154 std::vector<LinkInfo<xAOD::JetContainer>> jetELInfo = findLinks<xAOD::JetContainer>(outputDecision, featureString(), TrigDefs::lastFeatureOfType);
155 ATH_CHECK( jetELInfo.size() == 1 );
156 ATH_CHECK( jetELInfo.at(0).isValid() );
157 ATH_CHECK( placeJetInView( *(jetELInfo.at(0).link), viewVector->back(), context ) );
158 }
159 // Link the view to the Decision object
160 outputDecision->setObjectLink( viewString(), ElementLink<ViewContainer>(m_viewsKey.key(), viewVector->size()-1 ));
161 ATH_MSG_DEBUG( "Made new View, storing view in viewVector " << m_viewsKey.key() << " index:" << viewVector->size()-1 );
162
163 } else {
164
165 // We have already spawned a ROI in this View. Link it here too.
166 const size_t existingIndex = std::distance(RoIsFromDecision.begin(), roiIt);
167 ATH_MSG_DEBUG("Found existing View, stored in view in viewVector " << m_viewsKey.key() << " index:" << existingIndex );
168 outputDecision->setObjectLink( viewString(), ElementLink<ViewContainer>(m_viewsKey.key(), existingIndex )); //adding View link to Decision
169
170 }
171 } // loop over output decisions
172
173 // launch view execution
174 ATH_MSG_DEBUG( "Launching execution in " << viewVector->size() << " unique views" );
175 ATH_CHECK( ViewHelper::scheduleViews( viewVector, // Vector containing views
176 m_viewNodeName, // CF node to attach views to
177 context, // Source context
178 getScheduler(), // Scheduler to launch with
179 m_reverseViews ) ); // Debug option
180
181 return StatusCode::SUCCESS;
182}
183
184bool endsWith(const std::string& value, const std::string& ending) {
185 if (ending.size() > value.size()) {
186 return false;
187 }
188 return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
189}
190
191std::vector<LinkInfo<ViewContainer>> EventViewCreatorAlgorithm::viewsToLink(const Decision* outputDecision) const {
193}
194
195bool EventViewCreatorAlgorithm::checkCache(const DecisionContainer* cachedViews, const Decision* outputDecision, size_t& cachedIndex, MatchingCache& matchingCache) const {
196 if (cachedViews == nullptr or m_cacheDisabled) {
197 return false; // No cached input configured, which is fine.
198 }
199
200 // 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
201 // 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)
202 // or not cached (with "_probe" postfix, from second "probe" pass)
203 std::vector<LinkInfo<ViewContainer>> previousStepViews = findLinks<ViewContainer>(outputDecision, viewString(), TrigDefs::allFeaturesOfType);
204 // If this collection is empty then we're the 1st step, so OK to look for a cached EventView to re-use. Otherwise...
205 if (previousStepViews.size()) {
206 // 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
207 ElementLink<ViewContainer> previousView = previousStepViews.at(0).link;
208 const bool previousStepDidNotUsedCachedView = endsWith(previousView.dataID(), "_probe");
209 if (previousStepDidNotUsedCachedView) {
210 // 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.
211 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.");
212 return false;
213 }
214 }
215
216 bool usedROIMatchingFlag{false}; // Sanity check
217 bool result = matchInCollection(cachedViews, outputDecision, cachedIndex, usedROIMatchingFlag, matchingCache);
218 if (usedROIMatchingFlag and m_mergeUsingFeature) {
219 ATH_MSG_ERROR("Called matchInCollection in an EVCA configured with mergeUsingFeature=True, however ROI matching was used instead?! Should not be possible.");
220 }
221
222 if (result) {
223 // We have another check we have to make before we are confident that we can re-use this View
224 // The view will have originally be launched linked to N proxies (N>=0), which are the previous Steps which the View
225 // needs to link to (in which one might need to later search for physics collections needed in this or later Steps).
226 //
227 // But the list of proxies in the probe pass might be different than what it was in the tag pass.
228 // We cannot change the list of proxies in the existing tag EventView (it is now immutable)
229 //
230 // So if we are missing required proxies then we cannot re-use this EventView and have to reject the cached EV.
231 const SG::View* view = *(cachedViews->at(cachedIndex)->objectLink<ViewContainer>(viewString()));
232
233 // What prior views would we have linked if we were spawning a new View here in probe?
234 std::vector<LinkInfo<ViewContainer>> viewsToLinkVector = viewsToLink(outputDecision);
235 for (const LinkInfo<ViewContainer>& toLinkLI : viewsToLinkVector) {
236 const SG::View* toLink = *(toLinkLI.link);
237 // Was toLink linked as a proxy back in the tag stage?
238 bool foundIt = false;
239 for (const SG::View* prevLinked : view->getParentLinks()) {
240 if (prevLinked == toLink) {
241 foundIt = true;
242 break;
243 }
244 }
245 if (!foundIt) {
246 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.");
247 result = false;
248 break;
249 }
250 }
251 }
252
253 return result;
254}
255
257 const std::string linkNameToMatch = m_mergeUsingFeature ? featureString() : m_roisLink.value();
258 for (const Decision* cachedView : *cachedViews) {
259 const uint64_t matchingHash = getMatchingHashForDecision(cachedView, linkNameToMatch);
260 if (matchingHash == std::numeric_limits<std::size_t>::max()) {
261 return StatusCode::FAILURE;
262 }
263 matchingCache.setMatchingHash(cachedView, matchingHash);
264 // 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
265 matchingCache.linkOutputToInput(cachedView, cachedView);
266 }
267 return StatusCode::SUCCESS;
268}
269
270
271StatusCode EventViewCreatorAlgorithm::linkViewToParent( const TrigCompositeUtils::Decision* outputDecision, SG::View* newView ) const {
272 if (!m_requireParentView) {
273 ATH_MSG_DEBUG("Parent view linking not required");
274 return StatusCode::SUCCESS;
275 }
276 // We must call this BEFORE having added the new link, check
277 if (outputDecision->hasObjectLink(viewString())) {
278 ATH_MSG_ERROR("Called linkViewToParent on a Decision object which already has been given a '"
279 << viewString() << "' link. Call this fn BEFORE linking the new View.");
280 return StatusCode::FAILURE;
281 }
282 std::vector<LinkInfo<ViewContainer>> viewsToLinkVector = viewsToLink(outputDecision);
283 if (viewsToLinkVector.size() == 0) {
284 ATH_MSG_ERROR("Could not find the parent View, but 'RequireParentView' is true.");
285 return StatusCode::FAILURE;
286 }
287 // Note: Some Physics Objects will have diverging reco paths, but later re-combine.
288 // Examples include an ROI processed as both Electron and Photon re-combining for PrecisionCalo.
289 // Or, a tau ROI processed with different algorithms for different chains in an earlier Step.
290 // This will only cause a problem if downstream a collection is requested which was produced in more that one
291 // of the linked parent Views (or their parents...) as it is then ambiguous which collection should be read.
292 ATH_MSG_DEBUG( "Will link " << viewsToLinkVector.size() << " parent view(s)" );
293 for (const LinkInfo<ViewContainer>& toLinkLI : viewsToLinkVector) {
294 ATH_CHECK(toLinkLI.isValid());
295 newView->linkParent( *(toLinkLI.link) );
296 ATH_MSG_DEBUG( "Parent view linked (" << toLinkLI.link.dataID() << ", index:" << toLinkLI.link.index() << ")" );
297 }
298
299 return StatusCode::SUCCESS;
300}
301
302StatusCode EventViewCreatorAlgorithm::placeRoIInView( const ElementLink<TrigRoiDescriptorCollection>& roiEL, SG::View* view, const EventContext& context ) const {
303 // fill the RoI output collection
304 auto oneRoIColl = std::make_unique< ConstDataVector<TrigRoiDescriptorCollection> >();
305 oneRoIColl->clear( SG::VIEW_ELEMENTS ); //Don't delete the RoIs
306 oneRoIColl->push_back( *roiEL );
307
308 view->setROI(roiEL);
309
310 //store the RoI in the view
311 auto handle = ViewHelper::makeHandle( view, m_inViewRoIs, context );
312 ATH_CHECK( handle.record( std::move( oneRoIColl ) ) );
313 return StatusCode::SUCCESS;
314}
315
316
317StatusCode EventViewCreatorAlgorithm::placeMuonInView( const xAOD::Muon* theObject, SG::View* view, const EventContext& context ) const {
318 // fill the Muon output collection
319 ATH_MSG_DEBUG( "Adding Muon To View : " << m_inViewMuons.key()<<" and "<<m_inViewMuonCandidates.key() );
320 auto oneObjectCollection = std::make_unique< xAOD::MuonContainer >();
321 auto oneObjectAuxCollection = std::make_unique< xAOD::MuonAuxContainer >();
322 oneObjectCollection->setStore( oneObjectAuxCollection.get() );
323
324 xAOD::Muon* copiedMuon = oneObjectCollection->push_back( std::make_unique<xAOD::Muon>());
325
326 *copiedMuon = *theObject;
327
328 auto muonCandidate = std::make_unique< ConstDataVector< MuonCandidateCollection > >();
329 auto* msLink = theObject->trackParticle(xAOD::Muon::TrackParticleType::MuonSpectrometerTrackParticle);
330 auto* extTrackLink = theObject->trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
331 if(msLink && extTrackLink) {
332
333 muonCandidate->push_back( std::make_unique<MuonCombined::MuonCandidate>(makeLink(msLink),
334 extTrackLink->trackLink(),
335 extTrackLink->index()) );
336 }
337 //store both in the view
338 auto handleMuon = ViewHelper::makeHandle( view, m_inViewMuons, context );
339 ATH_CHECK( handleMuon.record( std::move( oneObjectCollection ), std::move( oneObjectAuxCollection )) );
340
341 auto handleCandidate = ViewHelper::makeHandle( view, m_inViewMuonCandidates, context );
342 ATH_CHECK( handleCandidate.record( std::move( muonCandidate ) ) );
343
344 return StatusCode::SUCCESS;
345}
346
347// TODO - Template this?
348StatusCode EventViewCreatorAlgorithm::placeJetInView( const xAOD::Jet* theObject, SG::View* view, const EventContext& context ) const {
349
350 // fill the Jet output collection
351 ATH_MSG_DEBUG( "Adding Jet To View : " << m_inViewJets.key() );
352
353 auto oneObjectCollection = std::make_unique< xAOD::JetContainer >();
354 auto oneObjectAuxCollection = std::make_unique< xAOD::JetAuxContainer >();
355 oneObjectCollection->setStore( oneObjectAuxCollection.get() );
356
357 xAOD::Jet* copiedJet = new xAOD::Jet();
358 oneObjectCollection->push_back( copiedJet );
359 *copiedJet = *theObject;
360
361 auto handle = ViewHelper::makeHandle( view, m_inViewJets, context );
362 ATH_CHECK( handle.record( std::move(oneObjectCollection),std::move(oneObjectAuxCollection) ) );
363
364 return StatusCode::SUCCESS;
365}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
bool endsWith(const std::string &value, const std::string &ending)
ElementLink< xAOD::TrackParticleContainer > makeLink(const xAOD::TrackParticle *track)
size_t size() const
Number of registered mappings.
DataVector< SG::View > ViewContainer
View container for recording in StoreGate.
Definition View.h:290
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)
const T * at(size_type n) const
Access an element, as an rvalue.
SG::WriteHandleKey< xAOD::MuonContainer > m_inViewMuons
Gaudi::Property< bool > m_placeJetInView
StatusCode linkViewToParent(const TrigCompositeUtils::Decision *outputDecision, SG::View *newView) const
Makes sure the views are linked, if configuration requireParentView is set.
Gaudi::Property< bool > m_placeMuonInView
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.
Gaudi::Property< std::vector< std::string > > m_viewFallFilter
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.
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_cachedViewsKey
SG::WriteHandleKey< ConstDataVector< TrigRoiDescriptorCollection > > m_inViewRoIs
Gaudi::Property< bool > m_requireParentView
virtual StatusCode initialize() override
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 ...
virtual StatusCode execute(const EventContext &) const override
SG::WriteHandleKey< ViewContainer > m_viewsKey
bool checkCache(const TrigCompositeUtils::DecisionContainer *cachedViews, const TrigCompositeUtils::Decision *outputDecision, size_t &cachedIndex, MatchingCache &matchingCache) const
Allow for the re-use of EventViews run in a previous Step in another EVCA instance configured to spaw...
SG::WriteHandleKey< ConstDataVector< MuonCandidateCollection > > m_inViewMuonCandidates
Gaudi::Property< bool > m_reverseViews
Gaudi::Property< bool > m_cacheDisabled
Gaudi::Property< bool > m_viewFallThrough
ToolHandle< IViewCreatorROITool > m_roiTool
SG::WriteHandleKey< xAOD::JetContainer > m_inViewJets
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...
SmartIF< IScheduler > getScheduler() const
Obtain smart pointer to scheduler in order to schedule newly spawned views.
Gaudi::Property< std::string > m_viewNodeName
StatusCode populateMatchingCacheWithCachedViews(const TrigCompositeUtils::DecisionContainer *cachedViews, MatchingCache &matchingCache) const
We look for matching Decision Objects in a matchingCache.
Gaudi::Property< bool > m_isEmptyStep
bool matchInCollection(const TrigCompositeUtils::DecisionContainer *outDecisions, const TrigCompositeUtils::Decision *toMatch, size_t &matchIndex, bool &usedROIMatchingFlag, MatchingCache &matchingCache) const
Wrapper around matchDecision. Returns boolean if the match was successful.
uint64_t getMatchingHashForDecision(const TrigCompositeUtils::Decision *toMatch, const std::string &linkNameToMatch) const
Searches from toMatch to locate a single (type-less) Element Link with given edge name....
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,...
StringProperty m_roisLink
const SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > & decisionOutputs() const
methods for derived classes to access handles of the base class input and output decisions; other rea...
InputMakerBase(const std::string &name, ISvcLocator *pSvcLocator)
constructor, to be called by sub-class constructors
const SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > & decisionInputs() const
methods for derived classes to access handles of the base class input and output decisions; other rea...
Gaudi::Property< bool > m_mergeUsingFeature
const_pointer_type ptr()
Dereference the pointer.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
A "view" of the event store (IProxyDict).
Definition View.h:46
void setFilter(std::vector< std::string > const &inputFilter)
Set a filtering rule for anything loaded via fall-through.
Definition View.h:86
void linkParent(const IProxyDict *parent)
Link to the previously used views.
Definition View.cxx:35
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const TrackParticle * trackParticle(TrackParticleType type) const
Returns a pointer (which can be NULL) to the TrackParticle used in identification of this muon.
Definition Muon_v1.cxx:482
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.
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:140
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const std::string & viewString()
const std::string & roiString()
const std::string & featureString()
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
void findLinks(const Decision *start, const std::string &linkName, std::vector< LinkInfo< T > > &links, unsigned int behaviour=TrigDefs::allFeaturesOfType, std::set< const xAOD::TrigComposite * > *fullyExploredFrom=nullptr)
search back the TC links for the object of type T linked to the one of TC (recursively) Populates pro...
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
static const unsigned int allFeaturesOfType
Run 3 "enum". Return all features along legs (still with type and container checks).
StatusCode scheduleViews(ViewContainer *viewVector, std::string const &nodeName, EventContext const &sourceContext, SmartIF< IScheduler > scheduler, bool reverseOrder=false)
Definition ViewHelper.h:85
SG::View * makeView(const std::string &common_name, int const unique_index=-1, bool const allowFallThrough=true)
Definition ViewHelper.h:252
auto makeHandle(const SG::View *view, const KEY &key, const EventContext &ctx)
Create a view handle from a handle key.
Definition ViewHelper.h:273
Jet_v1 Jet
Definition of the current "jet version".
TrackParticle_v1 TrackParticle
Reference the current persistent version:
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
Muon_v1 Muon
Reference the current persistent version:
Used to cache each incoming Decision object's ElementLink which is being used to identify the Decisio...
void linkOutputToInput(const TrigCompositeUtils::Decision *outputDecision, const TrigCompositeUtils::Decision *inputDecision)
void setMatchingHash(const TrigCompositeUtils::Decision *inputDecision, const uint64_t matchingHash)
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition LinkInfo.h:22