|
ATLAS Offline Software
|
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>
|
| 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 |
|
|
| 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 |
| 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 |
| 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 |
| 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 |
| Wrapper around matchDecision. Returns boolean if the match was successful. More...
|
|
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. 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...
|
|
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.
◆ StoreGateSvc_t
◆ EventViewCreatorAlgorithm() [1/2]
EventViewCreatorAlgorithm::EventViewCreatorAlgorithm |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~EventViewCreatorAlgorithm()
EventViewCreatorAlgorithm::~EventViewCreatorAlgorithm |
( |
| ) |
|
|
virtual |
◆ EventViewCreatorAlgorithm() [2/2]
EventViewCreatorAlgorithm::EventViewCreatorAlgorithm |
( |
| ) |
|
|
protected |
◆ 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.
◆ checkCache()
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.
195 std::vector<LinkInfo<ViewContainer>> previousStepViews = findLinks<ViewContainer>(outputDecision,
viewString(), TrigDefs::allFeaturesOfType);
197 if (previousStepViews.size()) {
200 const bool previousStepDidNotUsedCachedView =
endsWith(previousView.
dataID(),
"_probe");
201 if (previousStepDidNotUsedCachedView) {
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.");
208 bool usedROIMatchingFlag{
false};
211 ATH_MSG_ERROR(
"Called matchInCollection in an EVCA configured with mergeUsingFeature=True, however ROI matching was used instead?! Should not be possible.");
226 std::vector<LinkInfo<ViewContainer>> viewsToLinkVector =
viewsToLink(outputDecision);
228 const SG::View* toLink = *(toLinkLI.link);
230 bool foundIt =
false;
231 for (
const SG::View* prevLinked :
view->getParentLinks()) {
232 if (prevLinked == toLink) {
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.");
◆ debugPrintOut()
provides debug printout of the output of the algorithm
Definition at line 200 of file InputMakerBase.cxx.
205 if (inputHandle.isValid()) {
206 if (inputHandle->size() > 0) {
215 ATH_MSG_DEBUG(
"Output " << outputHandle.
key() <<
" with "<< outputHandle->
size() <<
" decisions:");
216 for (
const auto outdecision : *outputHandle){
219 ATH_MSG_DEBUG(
"Number of positive decisions for this output: " << objDecisions.size() );
◆ decisionInputs()
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.
◆ decisionInputToOutput()
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.
50 size_t usedROIMatching = 0, usedFeatureMatching = 0;
52 MatchingCache matchingCache;
53 size_t totalInput = 0;
57 if( not inputHandle.isValid() ) {
58 ATH_MSG_DEBUG(
"Got no decisions from input "<<
inputKey.key() <<
" because implicit handle not valid");
61 if( inputHandle->size() == 0){
62 ATH_MSG_DEBUG(
"Got no decisions from input "<<
inputKey.key()<<
": implicit handle is valid but container is empty.");
65 ATH_MSG_DEBUG(
"Running on input "<<
inputKey.key()<<
" with " << inputHandle->size() <<
" elements" );
68 size_t input_counter = 0;
72 bool usedROIMatchingFlag =
false;
74 const bool alreadyAdded =
matchInCollection(outDecisions, inputDecision, alreadyAddedIndex, usedROIMatchingFlag, matchingCache);
78 if (usedROIMatchingFlag) {
81 ++usedFeatureMatching;
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"));
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);
99 totalInput+=input_counter;
102 if (usedROIMatching and usedFeatureMatching) {
103 ATH_MSG_DEBUG(
"This input maker used Feature-based mapping on " << usedFeatureMatching <<
" inputs and ROI-based mapping on " << usedROIMatching
111 ATH_MSG_DEBUG(
"Merging complete: from "<<totalInput<<
" input decision to "<<outputHandle->
size()<<
" output decisions");
113 return StatusCode::SUCCESS;
◆ decisionOutputs()
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.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode EventViewCreatorAlgorithm::execute |
( |
const EventContext & |
context | ) |
const |
|
overridevirtual |
Definition at line 48 of file EventViewCreatorAlgorithm.cxx.
59 ATH_CHECK( viewsHandle.record( std::make_unique<ViewContainer>() ) );
60 auto viewVector = viewsHandle.ptr();
64 MatchingCache matchingCache;
69 cachedViews = cachedRH.
ptr();
76 std::vector<ElementLink<TrigRoiDescriptorCollection>> RoIsFromDecision;
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.");
82 ATH_MSG_DEBUG(
"Have output " << outputHandle.
key() <<
" with " << outputHandle->
size() <<
" elements" );
88 for (
Decision* outputDecision : *outputHandle ) {
91 ATH_MSG_ERROR(
"No '" <<
roiString() <<
"'link was attached by the ROITool. Decision object dump:" << *outputDecision);
92 return StatusCode::FAILURE;
104 const bool useCached =
checkCache(cachedViews, outputDecision, cachedIndex, matchingCache);
107 auto roiIt =
find(RoIsFromDecision.begin(), RoIsFromDecision.end(), roiEL);
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 );
122 }
else if ( roiIt == RoIsFromDecision.end() ) {
125 RoIsFromDecision.push_back(roiEL);
126 ATH_MSG_DEBUG(
"Found RoI:" << **roiEL <<
" FS=" << (*roiEL)->isFullscan() <<
". Making View.");
128 viewVector->push_back( newView );
139 std::vector<LinkInfo<xAOD::MuonContainer>> muonELInfo = findLinks<xAOD::MuonContainer>(outputDecision,
featureString(), TrigDefs::lastFeatureOfType);
146 std::vector<LinkInfo<xAOD::JetContainer>> jetELInfo = findLinks<xAOD::JetContainer>(outputDecision,
featureString(), TrigDefs::lastFeatureOfType);
158 const size_t existingIndex =
std::distance(RoIsFromDecision.begin(), roiIt);
166 ATH_MSG_DEBUG(
"Launching execution in " << viewVector->size() <<
" unique views" );
173 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ finalize()
virtual StatusCode EventViewCreatorAlgorithm::finalize |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getMatchingHashForDecision()
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 159 of file InputMakerBase.cxx.
160 std::set<const Decision*> cache;
161 std::vector<SG::sgkey_t>
keys;
162 std::vector<uint32_t> clids;
163 std::vector<Decision::index_type> indicies;
164 std::vector<const Decision*> sources;
167 if (
keys.size() != 1) {
168 bool suppressError =
false;
171 suppressError =
true;
175 if (
keys.size() > 1) {
176 suppressError =
false;
178 if (not suppressError) {
179 ATH_MSG_ERROR(
"InputMakerBase::getMatchingHashForDecision Did not locate exactly one object having searched for a link named '" << linkNameToMatch
180 <<
"', found " <<
keys.size() <<
". Unable to match this Decision object.");
181 for (
size_t i = 0;
i <
keys.size(); ++
i) {
182 const std::string* sgKeyStr =
evtStore()->keyToString(
keys.at(
i));
183 ATH_MSG_ERROR(
" -- Key:" <<
keys.at(
i) <<
" KeyStr:" << (sgKeyStr ? *sgKeyStr :
"UNKNOWN") <<
" Index:" << indicies.at(
i) <<
" CLID:" << clids.at(
i));
195 const uint64_t matchingHash =
keys.at(0) + clids.at(0) + indicies.at(0);
◆ 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.
33 ATH_MSG_ERROR(
"The EventViewCreatorAlgorithm class cannot be used as the InputMaker for an empty step.");
34 return StatusCode::FAILURE;
44 return StatusCode::SUCCESS;
◆ inputHandles()
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 |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, InDet::SiSPGNNTrackMaker, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ linkViewToParent()
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.
266 return StatusCode::SUCCESS;
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;
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;
284 ATH_MSG_DEBUG(
"Will link " << viewsToLinkVector.size() <<
" parent view(s)" );
288 ATH_MSG_DEBUG(
"Parent view linked (" << toLinkLI.link.dataID() <<
", index:" << toLinkLI.link.index() <<
")" );
291 return StatusCode::SUCCESS;
◆ matchDecision()
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 140 of file InputMakerBase.cxx.
142 ATH_MSG_DEBUG(
"matchDecision "<<linkNameToMatch<<
" with matchingHash="<<matchingHash);
144 matchingCache.setMatchingHash(toMatch, matchingHash);
149 const uint64_t checkHash = matchingCache.getMatchingHash(checkDecision);
151 if (checkHash == matchingHash) {
◆ matchInCollection()
Wrapper around matchDecision. Returns boolean if the match was successful.
< Used to accelerate the recursive typelessFindLinks.
Definition at line 117 of file InputMakerBase.cxx.
118 std::set<const Decision*> cache;
119 std::vector<SG::sgkey_t>
keys;
120 std::vector<uint32_t> clids;
121 std::vector<Decision::index_type> indicies;
122 std::vector<const Decision*> sources;
124 bool hasFeature =
false;
125 if (
keys.size() != 0) hasFeature=
true;
135 usedROIMatchingFlag =
true;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
344 auto oneObjectCollection = std::make_unique< xAOD::JetContainer >();
345 auto oneObjectAuxCollection = std::make_unique< xAOD::JetAuxContainer >();
346 oneObjectCollection->setStore( oneObjectAuxCollection.get() );
349 oneObjectCollection->push_back( copiedJet );
350 *copiedJet = *theObject;
354 ATH_CHECK( handle.record( std::move(oneObjectCollection),std::move(oneObjectAuxCollection) ) );
356 return StatusCode::SUCCESS;
◆ placeMuonInView()
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.
313 auto oneObjectCollection = std::make_unique< xAOD::MuonContainer >();
314 auto oneObjectAuxCollection = std::make_unique< xAOD::MuonAuxContainer >();
315 oneObjectCollection->setStore( oneObjectAuxCollection.get() );
318 oneObjectCollection->push_back( copiedMuon );
319 *copiedMuon = *theObject;
321 auto muonCandidate = std::make_unique< ConstDataVector< MuonCandidateCollection > >();
324 if(msLink.isValid() && extTrackLink.isValid()) muonCandidate->push_back(
new MuonCombined::MuonCandidate(msLink, (*extTrackLink)->trackLink(), (*extTrackLink)->index()) );
329 ATH_CHECK( handleMuon.record( std::move( oneObjectCollection ), std::move( oneObjectAuxCollection )) );
333 ATH_CHECK( handleCandidate.record( std::move( muonCandidate ) ) );
335 return StatusCode::SUCCESS;
◆ placeRoIInView()
Seeds a newly created view with an ROI collection containing the single seeding ROI.
Definition at line 294 of file EventViewCreatorAlgorithm.cxx.
296 auto oneRoIColl = std::make_unique< ConstDataVector<TrigRoiDescriptorCollection> >();
298 oneRoIColl->push_back( *roiEL );
305 ATH_CHECK( handle.record( std::move( oneRoIColl ) ) );
306 return StatusCode::SUCCESS;
◆ populateMatchingCacheWithCachedViews()
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.
250 for (
const Decision* cachedView : *cachedViews) {
253 return StatusCode::FAILURE;
255 matchingCache.setMatchingHash(cachedView, matchingHash);
257 matchingCache.linkOutputToInput(cachedView, cachedView);
259 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ 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.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode InputMakerBase::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ viewsToLink()
Obtain view(s) from most recent prior step(s) which are to be wired up.
Definition at line 183 of file EventViewCreatorAlgorithm.cxx.
184 return findLinks<ViewContainer>(outputDecision,
viewString(), TrigDefs::lastFeatureOfType);
◆ 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
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
◆ m_evtStore
◆ 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
input decisions array, will be implicit (renounced).
Definition at line 87 of file InputMakerBase.h.
◆ m_inViewJets
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
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
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
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
◆ 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
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 |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ 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 |
◆ m_viewsKey
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:
SG::WriteHandleKey< ConstDataVector< MuonCandidateCollection > > m_inViewMuonCandidates
Gaudi::Property< bool > m_requireParentView
bool setDetail(const std::string &name, const TYPE &value)
Set an TYPE detail on the object.
Gaudi::Property< std::vector< std::string > > m_viewFallFilter
void recursiveGetDecisions(const Decision *start, NavGraph &navGraph, const DecisionIDContainer &ids, const bool enforceDecisionOnStartNode)
Search back in time from "node" and locate all paths back through Decision objects for a given chain.
std::string find(const std::string &s)
return a remapped string
StatusCode linkViewToParent(const TrigCompositeUtils::Decision *outputDecision, SG::View *newView) const
Makes sure the views are linked, if configuration requireParentView is set.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_cachedViewsKey
SmartIF< IScheduler > getScheduler() const
Obtain smart pointer to scheduler in order to schedule newly spawned views.
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)
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.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
void insertDecisionIDs(const Decision *src, Decision *dest)
Appends the decision IDs of src to the dest decision object.
bool msgLvl(const MSG::Level lvl) const
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
void printAllPaths(MsgStream &log, MSG::Level msgLevel=MSG::VERBOSE) const
Helper function.
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...
void renounceArray(SG::VarHandleKeyArray &handlesArray)
remove all handles from I/O resolution
const std::string & key() const
Return the StoreGate ID for the referenced object.
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...
SG::WriteHandleKey< xAOD::JetContainer > m_inViewJets
bool endsWith(const std::string &value, const std::string &ending)
bool isValid() const
Test to see if the link can be dereferenced.
const ID_type & dataID() const
Get the key that we reference, as a string.
Gaudi::Property< bool > m_reverseViews
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
void linkParent(const IProxyDict *parent)
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
ToolHandle< IViewCreatorROITool > m_roiTool
SG::WriteHandleKey< xAOD::MuonContainer > m_inViewMuons
SG::WriteHandleKey< ConstDataVector< TrigRoiDescriptorCollection > > m_inViewRoIs
SG::View * makeView(const std::string &common_name, int const unique_index=-1, bool const allowFallThrough=true)
const std::vector< ElementLink< DecisionContainer > > getLinkToPrevious(const Decision *d)
returns links to previous decision object 'seed'
bool typelessFindLinks(const Decision *start, const std::string &linkName, std::vector< sgkey_t > &keyVec, std::vector< uint32_t > &clidVec, std::vector< Decision::index_type > &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...
pointer_type ptr()
Dereference the pointer.
StatusCode scheduleViews(ViewContainer *viewVector, std::string const &nodeName, EventContext const &sourceContext, SmartIF< IScheduler > scheduler, bool reverseOrder=false)
Default, invalid implementation of ClassID_traits.
const ElementLink< TrackParticleContainer > & muonSpectrometerTrackParticleLink() const
Returns an ElementLink to the InnerDetector TrackParticle used in identification of this muon.
void setName(const std::string &name)
Set a human-readable name for the object.
Structure to hold a transient Directed Acyclic Graph (DAG) structure. NavGraph is populated from,...
const std::vector< TrigCompositeUtils::DecisionID > & decisions() const
Get positive HLT chain decisions associated with this TrigComposite. Navigation use.
Gaudi::Property< bool > m_viewFallThrough
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.
#define CHECK(...)
Evaluate an expression and check for errors.
SG::WriteHandleKey< ViewContainer > m_viewsKey
void setFilter(std::vector< std::string > const &inputFilter)
Gaudi::Property< std::string > m_viewNodeName
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class used to describe composite objects in the HLT.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
const std::string & featureString()
StatusCode populateMatchingCacheWithCachedViews(const TrigCompositeUtils::DecisionContainer *cachedViews, MatchingCache &matchingCache) const
We look for matching Decision Objects in a matchingCache.
Gaudi::Property< bool > m_cacheDisabled
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Muon_v1 Muon
Reference the current persistent version:
virtual StatusCode sysInitialize() override
Override sysInitialize.
def cached(func)
Decorator to cache function return value.
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
const_pointer_type ptr()
Dereference the pointer.
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
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 ...
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
std::set< DecisionID > DecisionIDContainer
Gaudi::Property< bool > m_placeMuonInView
index_type index() const
Get the index of the element inside of its container.
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const ElementLink< TrackParticleContainer > & extrapolatedMuonSpectrometerTrackParticleLink() const
Returns an ElementLink to the Extrapolated Muon Spectrometer TrackParticle used in identification of ...
const std::string & roiString()
Gaudi::Property< bool > m_placeJetInView
const T * at(size_type n) const
Access an element, as an rvalue.
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.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
size_type size() const noexcept
Returns the number of elements in the collection.
const std::string & viewString()
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Jet_v1 Jet
Definition of the current "jet version".
const std::string & inputMakerNodeName()