ATLAS Offline Software
Loading...
Searching...
No Matches
NavigationCore.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <sstream>
6#include <iostream>
7#include <algorithm>
8
9#include "GaudiKernel/IConversionSvc.h"
12#include "CxxUtils/crc64.h"
14
16
19
22#include <unordered_map>
23
24
25using namespace HLT;
26using namespace HLTNavDetails;
27
28template<typename T>
29std::ostream& operator<<( std::ostream& s, const std::vector<T>& v)
30{
31 s<< "[";for(auto i:v){s << i << ", ";} s << "]";
32 return s;
33}
34
37 m_serializerSvc(nullptr),
38 m_storeGate(nullptr),
39 m_objectsKeyPrefix("HLT"),
41 m_holderfactory(nullptr),
43{
44}
45
46/*****************************************************************************
47 *
48 * PRETTY PRINTING
49 *
50 *****************************************************************************/
51
52MsgStream& HLT::operator<< ( MsgStream& m, const NavigationCore& nav ) {
53 std::string str;
54 nav.printASCIIArt(str);
55
56 m << str;
57 return m;
58}
59
60bool NavigationCore::extractBlob(const std::vector<uint32_t>& input, std::vector<uint32_t>::const_iterator& it, std::vector<uint32_t>& blob) const {
61 blob.clear();
62 if ( it == input.end() )
63 return false;
64
65 unsigned sizeOfBlob = *it;
66 std::vector<uint32_t>::const_iterator begin = it;
67 ++begin;
68 std::vector<uint32_t>::const_iterator end = it;
69 ++end;
70 advance(end, sizeOfBlob);
71 if ( end <= input.end()) {
72 blob.reserve(end-begin);
73 blob.insert(blob.end(), begin, end);
74 it = end; // update iterator
75 return true;
76 }
77 return false; // failed to get blob
78}
79
80
81bool NavigationCore::serialize( std::vector<uint32_t>& output) const {
82 std::vector<unsigned int> cuts;
83 return serialize(output,cuts);
84}
85
86bool NavigationCore::serialize( std::vector<uint32_t>& output, std::vector<unsigned int>& cuts ) const {
87 std::vector<std::pair<CLID, std::string> > clid_name;
88 clid_name.clear();
89 return serialize(output, cuts, clid_name);
90}
91
92bool NavigationCore::serialize( std::vector<uint32_t>& output, std::vector<unsigned int>& cuts, std::vector<std::pair<CLID, std::string> >& clid_name ) const {
93 std::vector<uint32_t> holderdata;
94 std::vector<unsigned int> holderblobsizes;
95
96 std::lock_guard<std::recursive_mutex> lock(getMutex());
97 const TrigHolderStructure& holderstorage = getHolderStorage();
98
99 bool status = false;
100 if ( m_classesToPayload.empty() ) { // this is offline case
101 status = serializeHoldersWithoutPayload(holderstorage.getAllHolders<IHolder>(),holderdata, holderblobsizes, clid_name);
102 } else { // this is online case when list of classes to payload is not empty
103 status = serializeHoldersWithPayload(m_classesToPayload,holderdata,holderblobsizes,clid_name);
104 }
105
106 if(!status){
107 ATH_MSG_WARNING("holder serialization failed");
108 return false;
109 }
110
111 status = serializeWithHolderSection(holderdata,holderblobsizes,output,cuts,clid_name);
112
113 if(!status){
114 ATH_MSG_WARNING("full serialization failed");
115 return false;
116 }
117
118 ATH_MSG_DEBUG("total size of serialized navigation: " << output.size());
119
120 return true;
121}
122
123bool NavigationCore::serialize_DSonly( std::vector<uint32_t>& output, std::vector<unsigned int>& cuts, std::vector<std::pair<CLID, std::string> >& clid_name ) const {
124 std::vector<uint32_t> holderdata;
125 std::vector<unsigned int> holderblobsizes;
126
127 bool status = serializeHoldersWithPayload(m_classesToPayload_DSonly,holderdata,holderblobsizes,clid_name);
128 if(!status){
129 ATH_MSG_WARNING("holder serialization failed");
130 return false;
131 }
132
133 status = serializeWithHolderSection(holderdata,holderblobsizes,output,cuts,clid_name);
134 if(!status){
135 ATH_MSG_WARNING("full serialization failed");
136 return false;
137 }
138
139 ATH_MSG_DEBUG("total size of serialized navigation (DS only): " << output.size());
140
141 return true;
142}
143
144
145/*****************************************************************************
146 *
147 * DESERIALIZATION
148 *
149 *****************************************************************************/
150
151bool NavigationCore::deserialize( const std::vector<uint32_t>& input ) {
152 std::lock_guard<std::recursive_mutex> lock(getMutex());
153 TrigHolderStructure& holderstorage = getHolderStorage();
154
155 std::vector<uint32_t>::const_iterator inputIt = input.begin();
156
157 ATH_MSG_DEBUG("deserialize: deserializing input of size: " << input.size());
158
159
160 if (input.size()==0) {
161 ATH_MSG_WARNING("Cannot work on empty payload");
162 return false;
163 }
164 unsigned int version = *inputIt++; // ignore version
165
166 ATH_MSG_DEBUG("deserialize: the serialized input has versions " << version);
167
168 if ( version != 3 and version !=4 ) {
169 ATH_MSG_WARNING("No backward compatibility beyond version 3 possible; data was serialized with V: " << version
170 << " while we are in version 4");
171 return true;
172 }
173 ATH_MSG_DEBUG("deserialize: deserialization of Navigation version: " << version);
174
175 unsigned int totalSize = *inputIt++; // total size
176 if ( totalSize != input.size() )
177 ATH_MSG_WARNING("deserialize: the navigation is truncated: " << input.size()
178 << " while should be: " << totalSize );
179
180 if ( input.size() == 2 ) { // there was only space for version and size
181 ATH_MSG_WARNING("deserialize: the navigation is truncated badly, no recovery possible " );
182 return false;
183 }
184
185 bool tesDeserializationStatus = deserializeTEs(inputIt,input.size());
186 ATH_MSG_DEBUG("deserialize: TEs structure unpacked, status: " << tesDeserializationStatus );
187
188
189 ATH_MSG_DEBUG("do we have holder payload? " << (inputIt != input.end()));
190
191 // Keep track of blobs we've deserialized for each event.
192 struct DeserializedMemo
193 {
194 std::mutex m_mutex;
195 EventContext::ContextEvt_t m_evt;
196 std::unordered_map<uint64_t, std::shared_ptr<HLT::BaseHolder>> m_holders;
197 };
199
200 const EventContext& ctx = Gaudi::Hive::currentContext();
201 DeserializedMemo& memo = *memos.get (ctx);
202 std::scoped_lock memolock (memo.m_mutex);
203 if (memo.m_evt != ctx.evt()) {
204 memo.m_holders.clear();
205 memo.m_evt = ctx.evt();
206 }
207
208 // EOF TEs deserialization
209 // deserialize Features
210 std::vector<uint32_t>::const_iterator it = inputIt;
211 std::vector<uint32_t> blob;
212 while ( extractBlob(input, it, blob) ) {
213 // Skip this blob if we've already deserialized it.
214 // See ATLASRECTS-6278, ATEAM-734 and ATR-25282
215 uint64_t hash = CxxUtils::crc64 (reinterpret_cast<const char*>(blob.data()),
216 blob.size()*sizeof(*blob.data()));
217
218 auto& holder = memo.m_holders[hash]; // ref(!) to empty or existing holder pointer
219 if (! holder ) {
220 ATH_MSG_DEBUG("deserializing holder blob with size/hash " << blob.size() << "/" << hash);
221 holder = std::shared_ptr<HLT::BaseHolder>(m_holderfactory->fromSerialized(version,blob.begin(),blob.end()));
222 if (! holder ) continue; // error during deserialization
223 } else {
224 ATH_MSG_DEBUG("blob with size/hash " << blob.size() << "/" << hash
225 << " already deserialized; re-using holder");
226 }
227
228 if(!holderstorage.registerHolder(holder)){
229 ATH_MSG_WARNING("deserialize: holder registration for holder with clid: " << holder->typeClid() << " and label: " << holder->label() << " failed.");
230 }
231 }
232 return true;
233}
234
236 std::lock_guard<std::recursive_mutex> l2lock(l2.getMutex());
237 const TrigHolderStructure& l2Holderstorage = l2.getHolderStorage();
238
239 // we need to pick the holders which are at L2 and move them to EF
240 for(auto l2holder : l2Holderstorage.getAllHolders<IHolder>()){
241 ATH_MSG_DEBUG("will add holder " << *l2holder);
242 std::string label(l2holder->label());
243 IHolder* efholder = getHolder(l2holder->typeClid(), label);
244 if ( efholder != 0 ) {
245 if ( (efholder->label() != l2holder->label())
246 || (efholder->subTypeIndex() != l2holder->subTypeIndex()) ) {
247
248 ATH_MSG_DEBUG("fixing bug for " << *efholder);
249 // bug which we need to fix (some week of data in autumn 2008)
250 // we have to delete current holder
251 // and replace it by L2 one
252 //
253 // efholder->setSubTypeIndex(l2holder->subTypeIndex());
254
255 ATH_MSG_DEBUG("after fixing " << *efholder);
256 }
257 } else {
258 ATH_MSG_DEBUG("cloning the holder from L2 " << *l2holder);
259
260 bool status = createHolder(efholder, l2holder->typeClid(),l2holder->label(), l2holder->subTypeIndex());
261 if(!status){
262 ATH_MSG_WARNING("in merge could not create EF holder");
263 }
264
265 //not sure if there is any possibility for this case but check anyways -Lukas
266 if(efholder->key()!=l2holder->key()){
267 ATH_MSG_WARNING("in merge the created EF holder has different SG access key than L2 holder we tried to copy");
268 }
269
270 registerHolder(efholder);
271 }
272 }
273 return true;
274}
275
276/*****************************************************************************
277 *
278 * very important RESET
279 *
280 *****************************************************************************/
281void NavigationCore::reset(bool inFinalize) {
282 TrigNavStructure::reset(inFinalize);
283
284 ATH_MSG_DEBUG("Navigation reset done");
285}
286
287uint16_t NavigationCore::nextSubTypeIndex(CLID clid, const std::string& /*label*/) const {
288 std::lock_guard<std::recursive_mutex> lock(getMutex());
289 const TrigHolderStructure& holderstorage = getHolderStorage();
290
291 auto holders = holderstorage.getHoldersOfClid(clid);
292
293 if ( holders.empty() )
295
296 std::vector<sub_index_type> sub_indices(holders.size());
297 std::transform(holders.begin(), holders.end(), sub_indices.begin(),
298 [](BaseHolder* h) -> sub_index_type { return h->subTypeIndex(); });
299
300 return (*std::max_element(sub_indices.begin(),sub_indices.end()))+1;
301}
302
304
305 ATH_MSG_VERBOSE("NavigationCore::prepare preregistering objects of clid: " << clid << " label: " << label);
306 IHolder *holder = getHolder(clid, label);
307 if ( holder ) {
308 ATH_MSG_VERBOSE("NavigationCore::prepare preregistering objects not executed as it already exists " << *holder);
309 return holder;
310 }
311
312 uint16_t index = nextSubTypeIndex(clid, label);
313 ATH_MSG_VERBOSE("NavigationCore::prepare creating handler for type (CLID): " << clid
314 << " label: " << label << " index: " << index);
315
316 if ( !createHolder(holder, clid, label, index) ) {
317 ATH_MSG_INFO("NavigationCore::prepare Can't create storage for objects of CLID: " << clid << " as it is requested by configuration");
318 return nullptr;
319 }
320
321 ATH_MSG_VERBOSE("Holder created, registering " << holder << " " << *holder);
322
323 if ( !registerHolder(holder) ) {
324 ATH_MSG_WARNING("Holder registration failed " << holder << " " << *holder);
325 return nullptr;
326 }
327 if ( !holder->syncWithSG() ) {
328 ATH_MSG_WARNING("Holder SG sync failed" << holder << " " << *holder);
329 return nullptr;
330 }
331
332 return holder;
333}
334
336 if ( msgLvl(MSG::VERBOSE) ) {
337 for ( const auto& [clid, holder] : HLT::TypeMaps::holders() ) {
338 ATH_MSG_VERBOSE("NavigationCore::prepare Compile time known types : " << *holder);
339 }
340 }
341
342 ATH_MSG_VERBOSE("NavigationCore::prepare Preregistering objects #:" << m_classesToPreregister.size());
343
344 // populate structure with "must have" features
345 for ( const CSPair& conf : m_classesToPreregister ) {
346 CLID clid = conf.first;
347 std::string label = conf.second;
348 if ( prepareOneHolder(clid, label) == 0 ) {
349 ATH_MSG_WARNING("NavigationCore::prepare failed preparing the holder for CLID: " << clid << " and label " << label);
350 }
351 }
352 ATH_MSG_DEBUG("NavigationCore::prepare Navigation structure prepared for next event");
353}
354
356 std::lock_guard<std::recursive_mutex> lock(getMutex());
357 TrigHolderStructure& holderstorage = getHolderStorage();
358
359 auto shared_holder = std::shared_ptr<HLT::BaseHolder>(holder);
360 holderstorage.registerHolder(shared_holder);
361 ATH_MSG_DEBUG("registerHolder for OK " << *holder);
362 return true;
363}
364
365bool NavigationCore::createHolder( IHolder*& holder, CLID clid, const std::string& label, uint16_t index) const {
366 ATH_MSG_DEBUG("createHolder: creating holder for CLID: " << clid << " label: " << label << " and index: " << index);
367 //reset holder
368 holder = 0;
369 auto baseholder = m_holderfactory->createHolder(clid,label, index);
370 if(!baseholder){
371 ATH_MSG_ERROR("createHolder: creation of holder for CLID: " << clid << " label: " << label << " and index: " << index << " failed");
372 }
373
374 holder = dynamic_cast<IHolder*>(baseholder);
375
376 if(!holder){
377 ATH_MSG_ERROR("createHolder: cast to IHolder* failed");
378 }
379
380 return true;
381}
382
383IHolder* NavigationCore::getHolder(CLID clid, uint16_t subTypeIndex) const {
384 std::lock_guard<std::recursive_mutex> lock(getMutex());
385 const TrigHolderStructure& holderstorage = getHolderStorage();
386
387 return holderstorage.getHolder<IHolder>(clid, subTypeIndex);
388}
389
390IHolder* NavigationCore::getHolder(CLID clid, const std::string& label) const {
391 std::lock_guard<std::recursive_mutex> lock(getMutex());
392 const TrigHolderStructure& holderstorage = getHolderStorage();
393
394 return holderstorage.getHolder<IHolder>(clid, label);
395}
396
397uint32_t NavigationCore::string2hash( const std::string& s, const std::string& category) {
398 return TrigConf::HLTUtils::string2hash(s, category);
399}
400
401void NavigationCore::getAllOfType ( const std::string& id, std::vector< HLT::TriggerElement* >& output,
402 const bool activeOnly) const {
403 if ( id == "" )
404 return getAll(output, activeOnly);
405
406 return TrigNavStructure::getAllOfType( string2hash(id, "TE"), output, activeOnly);
407}
408
409
411 const index_or_label_type& index_or_label,
412 bool only_single_feature,
414 bool travel_backward_recursively,
415 const TriggerElement*& source,
416 std::string& sourcelabel) const {
417
418 return TrigNavStructure::getFeatureAccessors(te,clid,index_or_label,only_single_feature,features,travel_backward_recursively,source,sourcelabel);
419}
420
422 const index_or_label_type& index_or_label,
423 bool only_single_feature,
425 const TriggerElement*& source,
426 std::string& sourcelabel ) const {
427
428 bool status = TrigNavStructure::getFeatureAccessorsSingleTE(te,clid,index_or_label,only_single_feature,features,source,sourcelabel);
429
430 //if query was via subindex we don't cache the query (no support yet)
431 if(index_or_label.index() == 0) return status;
432
433 return status;
434}
435
436bool NavigationCore::serializeWithHolderSection(const std::vector<uint32_t>& holderdata, const std::vector<unsigned int>& holderblobsizes, std::vector<uint32_t>& output,
437 std::vector<unsigned int>& cuts ,std::vector<std::pair<CLID, std::string> >& /*clid_name*/) const {
438 cuts.clear();
439 // clid_name.clear(); Don't reset this vector here since the vector is not remade. Otherwise datascouting stops working.
440
441 unsigned int version=4;
442 ATH_MSG_DEBUG("NavigationCore::serialize: serializing with version " << version);
443
444 output.push_back(version);
445
446 unsigned int totalSizeIndex = output.size();
447 output.push_back(0); // reserve one word (accessible under the index totalSize), it is 0 if there was truncation here
448 // and != output.size() if truncation using cuts
449
450 cuts.push_back(output.size()); // mark a cut place
451
452 bool tesSerializationStatus = serializeTEs(output);
453
454 ATH_MSG_DEBUG("serializes: TE serialization status: " << tesSerializationStatus << " size: " << output.size());
455
456 cuts.push_back(output.size()); // mark a cut place
457
458 output.insert(output.end(),holderdata.begin(),holderdata.end());
459
460 for(auto hc : holderblobsizes){cuts.push_back(cuts.back()+hc);}
461
462 output[totalSizeIndex] = output.size();
463
464 ATH_MSG_DEBUG("serialization done");
465 return true;
466}
467
468bool NavigationCore::serializeHoldersWithPayload(const std::vector<CSPair>& payload, std::vector<uint32_t>& output,
469 std::vector<uint32_t>& holderblobsizes,
470 std::vector<std::pair<CLID, std::string> >& clid_name) const {
471
472 ATH_MSG_DEBUG("serialization: number of classes to payload: " << payload.size());
473 for ( auto& cl : payload) {
474 ATH_MSG_DEBUG("serialization (ordered) of featue attempting : " << cl.first << " " << cl.second);
475
476 IHolder *holder = getHolder(cl.first,cl.second);
477 if ( ! holder ) {
478 ATH_MSG_DEBUG("serialization (ordered) of feature skipped, nothing know on this objects" );
479 continue;
480 }
481 ATH_MSG_DEBUG("serialization (ordered) of feature: " << holder->typeClid() << " label: " << holder->label()
482 << " size of payload up to now: " << output.size());
483
484 std::vector<uint32_t> holderblob;
485 size_t payloadsize = 0;
486 bool status = holder->serializeWithPayload(cl.sel,holderblob,payloadsize);
487 if(!status){
488 ATH_MSG_WARNING("problem serializing holder: " << *holder);
489 return false;
490 }
491
492 output.push_back(holderblob.size()); //leading bit indicates size
493 output.insert(output.end(),holderblob.begin(),holderblob.end());
494
495 holderblobsizes.push_back(1+holderblob.size()); //one for leading size bit
496 clid_name.push_back(std::pair < CLID, std::string> (holder->typeClid(), holder->label()));
497 }
498
499 return true;
500}
501
502bool NavigationCore::serializeHoldersWithoutPayload(const std::vector<IHolder*>& holders, std::vector<uint32_t>& output, std::vector<uint32_t>& holderblobsizes, std::vector<std::pair<CLID, std::string> >& clid_name) const {
503 for(auto& holder : holders){
504 ATH_MSG_DEBUG("serialization of feature: " << holder->typeClid() << " label: " << holder->label()
505 << " size of payload: " << output.size());
506
507 std::vector<uint32_t> holderblob;
508 bool status = holder->serialize(holderblob);
509 if(!status){
510 ATH_MSG_WARNING("problem serializing holder: " << *holder);
511 return false;
512 }
513 output.push_back(holderblob.size()); //leading bit indicates size
514 output.insert(output.end(),holderblob.begin(),holderblob.end());
515
516 holderblobsizes.push_back(1+holderblob.size()); //one for leading size bit
517 clid_name.push_back(std::pair < CLID, std::string> (holder->typeClid(), holder->label()));
518 }
519 return true;
520}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Maintain a set of objects, one per slot.
uint32_t CLID
The Class ID type.
static unsigned int totalSize(const MultiDimArray< T, N > &ht)
std::ostream & operator<<(std::ostream &s, const std::vector< T > &v)
Define macros for attributes used to control the static checker.
virtual const std::string & key() const =0
returns the containers StoreGate key
bool serializeWithPayload(const xAOD::AuxSelection &sel, std::vector< uint32_t > &output, size_t &payloadsize)
serializes this Holder including payload
Definition Holder.cxx:79
virtual bool syncWithSG(SG::OwnershipPolicy policy=SG::OWN_ELEMENTS)=0
const std::string & label() const
returns the label of objects stores by this holder
Definition Holder.h:85
virtual CLID typeClid() const =0
returns the CLID of objects stores by this holder
uint16_t subTypeIndex() const
returns the index (short number used when linking object to the TE) of objects stores by this holder
Definition Holder.h:111
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
bool registerHolder(HLTNavDetails::IHolder *holder)
NavigationCore(const AthAlgTool &logger)
constructor with parent AlgTool for printing
ITrigHolderFactory * m_holderfactory
uint16_t nextSubTypeIndex(CLID clid, const std::string &label) const
bool extractBlob(const std::vector< uint32_t > &input, std::vector< uint32_t >::const_iterator &it, std::vector< uint32_t > &blob) const
const AthAlgTool & m_logger
std::vector< CSPair > m_classesToPayload_DSonly
classess are put to payload according to that priority list (CLID + key)
static uint32_t string2hash(const std::string &, const std::string &category="TE")
convert strin g to hash.
HLTNavDetails::Holder< T > * getHolder(uint16_t subTypeIndex) const
as above but does not create holder on demand (return 0 if not found)
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
IConversionSvc * m_serializerSvc
virtual bool serialize(std::vector< uint32_t > &output) const
method serizlizes the navigation structure The structure is serrizlized in following order ....
unsigned m_objectsIndexOffset
small integer used to generate sub type index
virtual bool getFeatureAccessorsSingleTE(const TriggerElement *te, CLID clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, const TriggerElement *&source=::HLT::TrigNavStructure::m_unspecifiedTE, std::string &sourcelabel=::HLT::TrigNavStructure::m_unspecifiedLabel) const
void getAllOfType(const std::string &id, std::vector< HLT::TriggerElement * > &output, const bool activeOnly=true) const
return trigger elements given the name of TEs
bool serializeHoldersWithPayload(const std::vector< CSPair > &payload, std::vector< uint32_t > &output, std::vector< uint32_t > &holderblobsizes, std::vector< std::pair< CLID, std::string > > &clid_name) const
StoreGateSvc * m_storeGate
bool merge(const NavigationCore &l2)
attemtps to merge two trees
std::vector< CSPair > m_classesToPayload
classess are put to payload according to that priority list (CLID + key)
virtual void prepare()
prepapres the navigation for next event
std::vector< CSPair > m_classesToPreregister
classes mentioned here will be put to SG irrespectively of thier presence in event
bool msgLvl(const MSG::Level lvl) const
virtual bool getFeatureAccessors(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, bool travel_backward_recursively, const TriggerElement *&source=m_unspecifiedTE, std::string &sourcelabel=m_unspecifiedLabel) const
retrieve features accessors according to the requrements This method is actually workhorse for all ab...
bool deserialize(const std::vector< uint32_t > &input)
bool serializeHoldersWithoutPayload(const std::vector< HLTNavDetails::IHolder * > &holders, std::vector< uint32_t > &output, std::vector< uint32_t > &holderblobsizes, std::vector< std::pair< CLID, std::string > > &clid_name) const
std::string m_objectsKeyPrefix
property setting prefix which is to be given to all trigger EDM objects
bool serialize_DSonly(std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const
bool serializeWithHolderSection(const std::vector< uint32_t > &holderdata, const std::vector< unsigned int > &holderblobsizes, std::vector< uint32_t > &output, std::vector< unsigned int > &cuts, std::vector< std::pair< CLID, std::string > > &clid_name) const
bool createHolder(HLTNavDetails::IHolder *&holder, CLID clid, const std::string &label, uint16_t idx) const
creates holder for type given by CLID
HLTNavDetails::IHolder * prepareOneHolder(CLID clid, const std::string &label)
std::vector< HolderType * > getAllHolders() const
std::vector< HolderType * > getHoldersOfClid(class_id_type clid) const
HolderType * getHolder(class_id_type clid, const std::variant< sub_index_type, std::string > &stiOrLabel) const
bool registerHolder(const std::shared_ptr< BaseHolder > &holder)
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
void printASCIIArt(std::string &str, const TriggerElement *te=0, int offset=0) const
pretty printing of the navigational structure (heavy)
bool serializeTEs(std::vector< uint32_t > &output) const
method serizlizes the navigation structure
void getAllOfType(const te_id_type id, std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements if name is given.
virtual bool getFeatureAccessors(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, bool travel_backward_recursively, const TriggerElement *&source=m_unspecifiedTE, std::string &sourcelabel=m_unspecifiedLabel) const
bool deserializeTEs(std::vector< uint32_t >::const_iterator &start, unsigned int totalSize)
void getAll(std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements.
static const TriggerElement *m_unspecifiedTE ATLAS_THREAD_SAFE
virtual bool getFeatureAccessorsSingleTE(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label, bool only_single_feature, TriggerElement::FeatureVec &features, const TriggerElement *&source, std::string &sourcelabel) const
std::recursive_mutex & getMutex()
TrigHolderStructure & getHolderStorage()
std::string label(class_id_type clid, const index_or_label_type &sti_or_label) const
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
static const CLIDtoHolderMap & holders()
Definition TypeMaps.h:30
Maintain a set of objects, one per slot.
static HLTHash string2hash(const std::string &, const std::string &category="TE")
hash function translating TE names into identifiers
A crc-64 implementation, using pclmul where possible.
static Root::TMsgLogger logger("iLumiCalc")
uint64_t crc64(const CRCTable &table, const char *data, size_t data_len)
Find the CRC-64 of a string,.
Definition crc64.cxx:696
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
const FeatureContainerInit< FEATURE, CONTAINER > RegisterFeatureContainerTypes< FEATURE, CONTAINER >::s
std::variant< sub_index_type, std::string > index_or_label_type
MsgStream & operator<<(MsgStream &m, const Navigation &nav)
Definition index.py:1