ATLAS Offline Software
TrigNavStructure.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <sstream>
6 #include <iostream>
7 #include <algorithm>
8 #include <iterator> // need it for advance
9 
12 
13 //#define MLOG(x) if (m_log->level()<=MSG::x+m_msgLvlOffset) *m_log << (m_msgLvlOffset+MSG::x)
14 //#define MLOG(x) if (m_log->level()<=MSG::x) *m_log << MSG::x
15 
16 using namespace HLT;
17 
18 template<typename T>
19 std::ostream& operator<<( std::ostream& s, const std::vector<T>& v)
20 {
21  s<< "[";for(auto i:v){s << i << ", ";} s << "]";
22  return s;
23 }
24 
25 std::string TrigNavStructure::m_unspecifiedLabel = "";
26 const TriggerElement* TrigNavStructure::m_unspecifiedTE = 0;
27 std::recursive_mutex TrigNavStructure::s_rmutex;
28 
29 
31  for (auto& factory : m_factory) factory.reset();
32 }
33 
34 /*****************************************************************************
35  *
36  * METHODS FOR NAVIGATION BUILDING
37  *
38  *****************************************************************************/
40  std::lock_guard<std::recursive_mutex> lock(getMutex());
41  TriggerElementFactory& factory = getFactory();
42 
43  if ( factory.empty() )
44  factory.produce(0);
45  return factory.listOfProduced().front();
46 }
47 
49  std::lock_guard<std::recursive_mutex> lock(getMutex());
50  const TriggerElementFactory& factory = getFactory();
51 
52  if ( not factory.empty() )
53  return factory.listOfProduced().front();
54  return 0;
55 }
56 
57 
59  std::lock_guard<std::recursive_mutex> lock(getMutex());
60  TriggerElementFactory& factory = getFactory();
61 
62  if ( isInitialNode(initial) ) {
63  TriggerElement* te = factory.produce(0);
64 
65  // build seeds, seeededBy relations
67  initial->relate( te, TriggerElement::seedsRelation );
68  return te;
69  }
70  return 0;
71 }
72 
73 const std::vector<TriggerElement*>& TrigNavStructure::getRoINodes( const TriggerElement* somenode ) {
75 }
76 
77 
78 // delegates all work to the more generic method
80  std::vector<TriggerElement*> list;
81  list.push_back(seednode);
82  return addNode(list, id);
83 }
84 
85 TriggerElement* TrigNavStructure::addNode( std::vector<TriggerElement* >& seeds, unsigned int id, bool ghost, bool nofwd ) {
86  std::lock_guard<std::recursive_mutex> lock(getMutex());
87  TriggerElementFactory& factory = getFactory();
88 
89  TriggerElement* te = factory.produce(id, ghost, nofwd);
90 
91 
93  for ( it = seeds.begin(); it != seeds.end(); ++it ) {
94  // relate to it
95  TriggerElement* seednode = *it;
97  seednode->relate( te, TriggerElement::seedsRelation );
98  // add previous Features
99  te->getPreviousFeatures().insert(te->getPreviousFeatures().end(),
100  seednode->getPreviousFeatures().begin(),
101  seednode->getPreviousFeatures().end());
102 
103  // copy RoI relations
104  if ( isRoINode(seednode) ) {
105  te->relate( seednode, TriggerElement::sameRoIRelation );
106  seednode->relate( te, TriggerElement::sameRoIRelation );
107  } else {
108  std::vector<TriggerElement*>::const_iterator itbegin = seednode->getRelated( TriggerElement::sameRoIRelation ).begin();
109  std::vector<TriggerElement*>::const_iterator itend = seednode->getRelated( TriggerElement::sameRoIRelation ).end();
110 
111  for ( ; itbegin != itend; ++itbegin ) {
112  te->relate( *itbegin, TriggerElement::sameRoIRelation );
113  (*itbegin)->relate( te, TriggerElement::sameRoIRelation );
114  }
115  }
116  }
117  return te;
118 }
119 
120 const std::vector<TriggerElement*>& TrigNavStructure::getDirectPredecessors(const TriggerElement* te) {
122 }
123 
124 const std::vector<TriggerElement*>& TrigNavStructure::getDirectSuccessors(const TriggerElement* te) {
126 }
127 
128 
129 const TriggerElement* TrigNavStructure::getSuccessor( const TriggerElement* te, unsigned int id ) {
130  if ( te->getId() == id )
131  return te;
132  std::vector<TriggerElement*>::const_iterator it;
133  const TriggerElement* found(0);
135  found = getSuccessor(*it, id);
136  if (found)
137  break;
138  }
139  return found;
140 }
141 
142 
143 
144 
145 /*****************************************************************************
146  *
147  * PRETTY PRINTING
148  *
149  *****************************************************************************/
150 
151 
152 void TrigNavStructure::printASCIIArt (std::string& str, const TriggerElement* te, int offset) const {
153  using namespace std;
154  const TriggerElement* initialNode = getInitialNode();
155  if ( initialNode == 0 )
156  return;
157 
158  std::lock_guard<std::recursive_mutex> lock(getMutex());
159  const TriggerElementFactory& factory = getFactory();
160 
161 
162  if ( !te )
163  te = initialNode;
164 
165  if ( te == initialNode ) {
166  // loop over all TEs which are not seeded by anything but are not initial nodes
167  const std::vector< TriggerElement* >& allTEs = factory.listOfProduced();
168  std::vector< TriggerElement* >::const_iterator allIt;
169  for (allIt = allTEs.begin(); allIt != allTEs.end(); ++allIt) {
170  if ((*allIt)->getRelated(TriggerElement::seededByRelation).size() == 0 && *allIt != getInitialNode() )
171  printASCIIArt(str, *allIt);
172  }
173  }
174 
175  ostringstream ss;
176  // pretty print
177  for ( int i=0; i < offset; i++ ) {
178  ss << "| ";
179  //cout << " ";
180  }
181  ss << "\\_";
182 
183  ss << "id:" << dec << te->getId() << ";"
184  << "active:" <<(te->getActiveState() ? "1" : "0" ) << ";"
185  << "error:" <<(te->getErrorState() ? "1" : "0" ) << ";"
186  << "ptr:" << hex << te << ";"
187  << "#seeds:" << dec << te->getRelated(TriggerElement::seedsRelation).size() << ",";
188  // add all ptrs
189  std::vector<TriggerElement*>::const_iterator seedIt;
190  for ( seedIt = getDirectSuccessors(te).begin(); seedIt != getDirectSuccessors(te).end(); ++seedIt ) {
191  ss << *seedIt <<" ";
192  }
193 
194  ss << "#seededBy:" << dec << te->getRelated(TriggerElement::seededByRelation).size() << ";"
195  << "#RoI:" << dec << te->getRelated(TriggerElement::sameRoIRelation).size() << ";"
196  << "#features:" << te->getFeatureAccessHelpers().size() << ";";
197  for ( auto& fea: te->getFeatureAccessHelpers() ) {
198  ss << fea;
199  }
200  ss << std::endl;
201 
202  std::string str2;
203  str2 = ss.str();
204  str += str2;
205 
206  if ( ! isTerminalNode(te) ) {
207  std::vector < TriggerElement* >::const_iterator it = te->getRelated( TriggerElement::seedsRelation ).begin();
208  std::vector < TriggerElement* >::const_iterator itEnd = te->getRelated( TriggerElement::seedsRelation ).end();
209  for ( ; it != itEnd; ++it ) {
210  std::string str2;
211  printASCIIArt(str, *it, offset+1);
212  str += str2;
213  }
214  }
215 }
216 
217 bool TrigNavStructure::serializeTEs( std::vector<uint32_t>& output ) const {
218  std::lock_guard<std::recursive_mutex> lock(getMutex());
219  const TriggerElementFactory& factory = getFactory();
220 
222 
223  const std::vector<TriggerElement*>& fullList = factory.listOfProduced();
224  std::vector<TriggerElement*> all;
225  all.reserve(fullList.size());
226 
227  for(std::vector<TriggerElement*>::const_iterator iter = fullList.begin(); iter != fullList.end(); ++iter) {
228  if(! (*iter)->transient() ) {
229  all.push_back( *iter );
230  }
231  }
232 
233  // reserve space (in order to be efficient it should not be resized any more, this can be studied probably later to find optimum)
234  output.reserve(10*all.size());
235 
236  // SERIALZE NAVIGATION STRUCTURE
237  // size (measured in elements)
238  output.push_back(all.size());
239 
240  // helper keys
241  std::map<TriggerElement*, uint16_t> keys;
242 
243  const TriggerElement* previous = 0;
244  std::vector<TriggerElement*>::const_iterator it;
245  uint16_t indexForTe = 0;
246  for ( it = all.begin(); it != all.end(); ++it ) {
247  // first we stream pointer as it (this is already an unique key for this TE)
248  // output.push_back((unsigned int)(*it));
249  (*it)->serialize(output, keys, previous);
250  previous = *it;
251  keys[*it] = indexForTe;
252  indexForTe++;
253  }
254 
255  return true;
256 }
257 
258 /*****************************************************************************
259  *
260  * DESERIALIZATION
261  *
262  *****************************************************************************/
263 
264 bool TrigNavStructure::deserializeTEs(std::vector<uint32_t>::const_iterator& start, unsigned int totalSize) {
265  std::lock_guard<std::recursive_mutex> lock(getMutex());
266  TriggerElementFactory& factory = getFactory();
267 
268  factory.reset();
269 
270  std::vector<uint32_t>::const_iterator& inputIt = start;
271  const size_t payloadSize = *inputIt++;
272 
273  if ( totalSize < payloadSize ) { // not all TEs were recorded
274  std::cerr << "size of the navigation payload smaller than the one required to save TEs. " << totalSize << " < " << payloadSize << std::endl;
275  return false;
276  }
277 
278 
279  const unsigned int size = *inputIt++; // size in terms of number of TEs
281  std::map<uint16_t, TriggerElement* > keys;
282 
283  for ( unsigned int i = 0; i < size; ++i ) {
284  // create new TE
285  TriggerElement* te = factory.produce(TriggerElement::enquireId(inputIt)); //
286  te->deserialize(inputIt, keys, previous);
287  previous = te;
288  // keys table for deserialization of other TEs
289  keys[i] = te;
290  }
291 
292  if ( not factory.empty() ) {
293  // rebuild sameRoI relations (this can't be done by TEs deserialization)
294  TriggerElement* initialNode = getInitialNode();
295  std::vector<TriggerElement*>::const_iterator roiTEit;
296  for ( roiTEit = getDirectSuccessors(initialNode).begin();
297  roiTEit != getDirectSuccessors(initialNode).end(); ++roiTEit ) {
298  fillSameRoIRelation((*roiTEit), (*roiTEit));
299  }
300  } // else this is empty structure, but this shoudl not bother us as it is may well be valid case
301 
302  return true;
303 }
304 
305 
306 
308  if ( ! isRoINode(te) ) {
311  }
312  if ( isTerminalNode(te) )
313  return;
314  else { // traverse all sub nodes
315  std::vector<TriggerElement*>::const_iterator it;
316  for ( it = getDirectSuccessors(te).begin(); it != getDirectSuccessors(te).end(); ++it ) {
317  fillSameRoIRelation(roi, *it);
318  }
319  }
320 }
321 
322 /*****************************************************************************
323  *
324  * QUERIES
325  *
326  *****************************************************************************/
327 
328 void TrigNavStructure::getAllRoIThresholdTEs( std::vector< TriggerElement* >& output ) const
329 {
330  const TriggerElement* initNode = getInitialNode();
331  // get first layer of TEs representing the RoIs themselves (not the thresholds!)
332  const std::vector<TriggerElement*>& rois = getDirectSuccessors(initNode);
333  for ( std::vector<TriggerElement*>::const_iterator roi_te = rois.begin();
334  roi_te != rois.end(); ++roi_te) {
335  // get threshold-like TEs:
336  const std::vector<TriggerElement*>& tes = getDirectSuccessors( (const TriggerElement*)(*roi_te) );
337  std::vector<TriggerElement*>::const_iterator te = tes.begin();
338  for ( ; te != tes.end(); ++te) {
339  output.push_back( *te );
340  }
341  }
342 }
343 
345  std::vector< TriggerElement* >& output,
346  const bool activeOnly) const {
347  std::lock_guard<std::recursive_mutex> lock(getMutex());
348  const TriggerElementFactory& factory = getFactory();
349 
350  if ( not factory.listOfProduced(id).empty() ) {
351  std::back_insert_iterator<std::vector<TriggerElement*> > outputIt( output );
352 
353  // 2 cases: only active ones, and all
354  // one can consider sorting the TEs according to the activation status and then assume that collection is sorted
355  // the same functor can be used as in copy_if
356  if (activeOnly)
357  remove_copy_if ( factory.listOfProduced(id).begin(), factory.listOfProduced(id).end(), outputIt, isNotActive );
358  else
359  copy ( factory.listOfProduced(id).begin(), factory.listOfProduced(id).end(), outputIt );
360  }
361 }
362 
363 void TrigNavStructure::getAll ( std::vector< TriggerElement* >& output, const bool activeOnly) const {
364  std::lock_guard<std::recursive_mutex> lock(getMutex());
365  const TriggerElementFactory& factory = getFactory();
366 
367  if ( not factory.listOfProduced().empty() ) {
368  std::back_insert_iterator<std::vector<TriggerElement*> > outputIt( output );
369  if (activeOnly)
370  remove_copy_if ( factory.listOfProduced().begin(), factory.listOfProduced().end(), outputIt, isNotActive );
371  else
372  copy ( factory.listOfProduced().begin(), factory.listOfProduced().end(), outputIt );
373  }
374 }
375 
376 std::vector<TriggerElement*>& TrigNavStructure::getAllTEs() {
377  std::lock_guard<std::recursive_mutex> lock(getMutex());
378  TriggerElementFactory& factory = getFactory();
379 
380  return factory.listOfProduced();
381 }
382 
383 const std::vector<TriggerElement*>& TrigNavStructure::getAllTEs() const {
384  std::lock_guard<std::recursive_mutex> lock(getMutex());
385  const TriggerElementFactory& factory = getFactory();
386 
387  return factory.listOfProduced();
388 }
389 
390 unsigned int TrigNavStructure::countAllOfType( const te_id_type id, const bool activeOnly ) const {
391  std::lock_guard<std::recursive_mutex> lock(getMutex());
392  const TriggerElementFactory& factory = getFactory();
393 
394  if ( activeOnly )
395  return factory.listOfProduced(id).size()
396  - count_if(factory.listOfProduced(id).begin(), factory.listOfProduced(id).end(), isNotActive);
397  //else
398  return factory.listOfProduced(id).size();
399 }
400 
401 
402 // need to deal with comples TopoTEs
403 // algorithm is realying on navigation i.e. does not check anything like
404 // RoIDescriptor etc. only just navigation nodes
405 // it packs all the RoINodes in to one vector does sort on it and the unique STL algos
406 // if size of temp vector is unchanged (all were unique) the there are no common RoIs
407 // Since this method is prepared to get RoI nodes one can use it for checking if the
408 // given TE is originating from given RoI, assume noone wil lquery it with initialNode
409 //
410 // in future on can revise this algorithm depending on usecases
411 // if most cases the NON Topo TEs will be chcked (only one RoI for each) then this can be simplified
412 // if RoI nodes will not be used here then security checks fro that can be abandonned)
413 // however this algo is N log(N) in current shape
414 
415 
417  std::vector<const TriggerElement*> vecRoINodes;
418 
419  if ( isRoINode(te1) ) {
420  vecRoINodes.push_back(te1);
421  } else {
422  std::back_insert_iterator<std::vector<const TriggerElement*> > outputIt( vecRoINodes );
424  }
425  if ( isRoINode(te2) ) {
426  vecRoINodes.push_back(te2);
427  } else {
428  std::back_insert_iterator<std::vector<const TriggerElement*> > outputIt( vecRoINodes );
430  }
431  // sort (by pointers, it is OK do not be scared)
432  sort(vecRoINodes.begin(), vecRoINodes.end());
433 
434  std::vector<const TriggerElement*>::const_iterator it;
435  it = adjacent_find(vecRoINodes.begin(), vecRoINodes.end());
436 
437  if ( it == vecRoINodes.end() )
438  return false;
439 
440  return true;
441 }
442 
443 
445  return ! haveCommonRoI(te1, te2);
446 }
447 
448 
450  std::vector<TriggerElement*> vecRoINodes1 = getRoINodes(te1);
451  std::vector<TriggerElement*> vecRoINodes2 = getRoINodes(te2);
452  sort(vecRoINodes1.begin(), vecRoINodes1.end());
453  sort(vecRoINodes2.begin(), vecRoINodes2.end());
454  return vecRoINodes1 == vecRoINodes2;
455 }
456 
457 
458 // similar to haveCommonRoI but other relation is queried
459 // and is simpler (no RoI special case)
460 
462  std::vector<const TriggerElement*> vecRoINodes;
463  std::back_insert_iterator<std::vector<const TriggerElement*> > outputIt( vecRoINodes );
464 
466  te1->getRelated(TriggerElement::seededByRelation).end(), outputIt);
467 
469  te2->getRelated(TriggerElement::seededByRelation).end(), outputIt);
470 
471  // sort (by pointers, it is OK do not be scared) & uniq
472  sort(vecRoINodes.begin(), vecRoINodes.end());
473 
475  it = adjacent_find(vecRoINodes.begin(), vecRoINodes.end());
476  if ( it == vecRoINodes.end() ) // after uniquing we still are
477  return false;
478  return true;
479 }
480 
482  return ! haveCommonSeed(te1, te2);
483 }
484 
486  return te1->getId() < te2->getId();
487 }
488 
490  return te1->getId() > te2->getId();
491 }
492 
493 bool TrigNavStructure::hasIdFromTheSet ( const TriggerElement* te, std::vector<unsigned int> ids ) {
494  if ( find(ids.begin(), ids.end(), te->getId()) != ids.end() )
495  return true;
496  return false;
497 }
498 
499 
500 
502  if ( te->getRelated(TriggerElement::seededByRelation).empty() and te->getId() == 0 )
503  return true;
504  return false;
505 }
506 
508  if ( te->getRelated( TriggerElement::seededByRelation ).empty() ) // this s initial node
509  return false;
510 
511  TriggerElement* whoSeedsMe = *(te->getRelated( TriggerElement::seededByRelation ).begin());
512  if ( isInitialNode(whoSeedsMe) )
513  return true;
514  return false;
515 }
516 
518  if ( te->getRelated( TriggerElement::seedsRelation ).empty() )
519  return true;
520  return false;
521 }
522 
523 
524 
525 
527  using namespace std;
528  if ( te1->getId() != te2->getId() ) {
529  return false; // distinc Id
530  }
531 
532  if ( ( isTerminalNode(te1) && isTerminalNode(te2) ) )
533  return true; // no more checks needs to be done
534  else if ( isTerminalNode(te1) || isTerminalNode(te2) )
535  return false; // one of both is terminal while another is not (case when both are terminal is covered above)
536 
537  // continue subchecks otherwise (both nonterminal)
538 
539  // folow seeds otherwise
541  return false;
542 
543  std::vector<TriggerElement*>::const_iterator seededByTe1 = te1->getRelated(TriggerElement::seedsRelation).begin();
544  std::vector<TriggerElement*>::const_iterator seededByTe2 = te2->getRelated(TriggerElement::seedsRelation).begin();
545 
546  for ( ; seededByTe1 != te1->getRelated(TriggerElement::seedsRelation).end(); ++seededByTe1, ++seededByTe2 ) {
547  if (isCompatibleTree(*seededByTe1, *seededByTe2) == false) // grrr,wrrr recursive call here
548  return false;
549  }
550  // there I should probably check as well the Features attached to the TEs
551 
552  return true;
553 }
554 
555 
556 
558  std::lock_guard<std::recursive_mutex> lock(getMutex());
559  TriggerElementFactory& factory = getFactory();
560  const TriggerElementFactory& oldFactory = nav->getFactory();
561 
562 
563  // basic checks first
564  if ( oldFactory.listOfProduced().size() > factory.listOfProduced().size() )
565  return false;
566 
567  std::vector< TriggerElement* >::const_iterator old = oldFactory.listOfProduced().begin();
569  // int i = 0;
570  do {
571  (*me)->setActiveState((*old)->getActiveState());
572  ++me;
573  ++old;
574  } while ( old != oldFactory.listOfProduced().end() );
575  return true;
576 }
577 
578 
579 
580 
581 
582 bool TrigNavStructure::combine(std::vector<unsigned int>& types,
583  std::vector<std::vector<TriggerElement*> >& output,
584  unsigned int maxResults, bool onlyActive)
585 {
586  // It should be empty anyways, but just in case...
587  output.clear();
588 
589  std::vector< std::vector<TriggerElement*> > input;
590  std::vector< std::vector<std::pair<unsigned int, unsigned int> > > newIdxs;
591 
592  for (std::vector<unsigned int>::iterator type = types.begin();
593  type != types.end(); ++type) {
594  // Use the previous iteration's output as the input for this one
595  std::vector< std::vector<TriggerElement*> > input = output;
596  std::vector< std::vector<std::pair<unsigned int, unsigned int> > > currentIdxs = newIdxs;
597 
598  // Remove the old n-tuples
599  output.clear();
600  newIdxs.clear();
601  // Re-populate output with the (n+1)-tuples. If error return false immediately...
602  if (not addOneLevel(input, currentIdxs, *type, output, newIdxs,
603  maxResults, onlyActive)) return false;
604  }
605 
606  return true;
607 }
608 
609 
610 bool TrigNavStructure::addOneLevel(std::vector< std::vector<TriggerElement*> >& currentCombs,
611  std::vector< std::vector<std::pair<unsigned int, unsigned int> > >& currentIdxs,
612  unsigned int type,
613  std::vector<std::vector<TriggerElement*> >& newCombs,
614  std::vector< std::vector<std::pair<unsigned int, unsigned int> > >& newIdxs,
615  unsigned int maxResults, bool onlyActive)
616 {
617  // Get the list of TEs of the desired type from the event
618  std::vector<TriggerElement*> newTEs;
619  getAllOfType(type, newTEs, onlyActive);
620 
621  if (currentCombs.size() == 0) {
622 
623 
624  for (unsigned int j = 0; j < newTEs.size(); j++) {
625 
626  std::vector<TriggerElement*> cbs;
627  cbs.push_back(newTEs[j]);
628  newCombs.push_back(cbs);
629 
630  // Do the same for the auxiliary data
631  std::vector<std::pair<unsigned int, unsigned int> > ti;
632  ti.push_back(std::pair<unsigned int, unsigned int>(type, j));
633  newIdxs.push_back(ti);
634  }
635  return 1;
636  }
637 
638  // Loop over existing combinations, adding the newTEs one by one
639  for (unsigned int i = 0; i < currentCombs.size(); i++) {
640 
641  // Get the current combinations
642  std::vector<TriggerElement*>& comb = currentCombs[i];
643 
644  // Get the auxiliary data that stores the type and index of each TE.
645  // "index" is the index of the TE in the vector of TEs returned by getallOfType - it
646  // is assumed to stay the same between calls of addOneLevel within the same combine() call
647  std::vector<std::pair<unsigned int, unsigned int> >& ti = currentIdxs[i];
648 
649  // The auxiliary data is used to avoid double-counting: we make sure that if multiple
650  // TEs of the same type appear in the n-tuple, they are always such that
651  // their indices in the getAllOfType vector increases with position in the n-tuple.
652  // I.E if we have TEs (e0, m1, e1, e2) and e0, e1 and e2 are of the same type,
653  // we only take the combination such that e0 comes before e1 and e1 before e2 in
654  // the getAllOfType vector of "e".
655 
656  // To implement this, go through the auxiliary data first and get the index
657  // of the last TE of the current type that is already in the ntuple:
658  int first = 0;
659 
660  for (unsigned int j = comb.size(); j > 0; j--)
661  if (ti[j - 1].first == type) {
662  first = ti[j - 1].second;
663  break;
664  }
665 
666  // Now instead of considering all the TEs in newTEs, only loop over those with
667  // index > first.
668 
669  for (unsigned int j = first + 1; j < newTEs.size(); j++) {
670 
671  TriggerElement* te = newTEs[j];
672 
673  // Continue if the TE overlaps with any of the TEs in the existing combination
674  if (overlaps(te, comb)) continue;
675 
676  // Add the new TE to the current combination
677  comb.push_back(te);
678 
679  // Add the current combination to the list for the next level
680  newCombs.push_back(comb);
681 
682  // Restore the current combination for the next iteration
683  comb.pop_back();
684 
685  // Do the same for the auxiliary data
686  ti.push_back(std::pair<unsigned int, unsigned int>(type, j));
687  newIdxs.push_back(ti);
688  ti.pop_back();
689 
690  // If the limit is exceeded, return immediately.
691  if (maxResults > 0 && newCombs.size() >= maxResults) {
692  return true;
693  }
694  }
695  }
696 
697  return true;
698 }
699 
700 bool TrigNavStructure::overlaps(const TriggerElement* te1, const std::vector<TriggerElement*>& teVec) const {
701  for (std::vector<TriggerElement*>::const_iterator te2 = teVec.begin(); te2 != teVec.end(); ++te2)
702  if (overlaps(te1, *te2)) return true;
703 
704  return false;
705 }
706 
707 bool TrigNavStructure::overlaps(const TriggerElement* te1, const TriggerElement* te2) const {
708  if (te1 == te2) return true;
709  if (haveCommonRoI(te1, te2)) return true;
710 
711  return false;
712 }
713 
714 bool TrigNavStructure::getTopologicallySpannedBy( const TriggerElement* te, const std::vector<unsigned int>& types,
715  std::vector<const TriggerElement*>& children, const bool activeOnly ) const {
716  if ( getDirectPredecessors(te).size() != types.size() ) {
717  return false;
718  }
719 
720  for ( unsigned i = 0 ; i < types.size(); ++i ) {
721  const TriggerElement* child = getSuccessor( getDirectPredecessors(te)[i], types[i]);
722  if(child!=0) {
723  if(activeOnly && !child->getActiveState()) {
724  children.clear();
725  return true;
726  }
727  children.push_back(child);
728  } else {
729  children.clear();
730  return true;
731  }
732  }
733  return true;
734 }
735 
736 unsigned int TrigNavStructure::copyAllFeatures( const TriggerElement* sourceTE, TriggerElement* destTE)
737 {
738  unsigned int n_features = 0;
739  // push back all featureAccessHelpers from source to destiny TE
740  for ( std::vector< TriggerElement::FeatureAccessHelper >::const_iterator it = sourceTE->getFeatureAccessHelpers().begin();
741  it != sourceTE->getFeatureAccessHelpers().end(); ++it ) {
742  destTE->addFeature(*it);
743  n_features++;
744  }
745  return n_features;
746 
747 }
748 
749 
750 
751 /*****************************************************************************
752  *
753  * very important RESET
754  *
755  *****************************************************************************/
756 void TrigNavStructure::reset(bool inFinalize) {
757  std::lock_guard<std::recursive_mutex> lock(getMutex());
758  if (inFinalize) {
759  for (auto& factory : m_factory) factory.reset();
760  for (auto& holder : m_holderstorage) holder.reset();
761  } else {
762  getFactory().reset();
764  }
765 }
766 
767 
769  std::lock_guard<std::recursive_mutex> lock(getMutex());
770  const TrigHolderStructure& holderstorage = getHolderStorage();
771 
772  return holderstorage.getSubTypeIndex(clid,sti_or_label);
773 }
774 
775 std::string TrigNavStructure::label(class_id_type clid, const index_or_label_type& sti_or_label) const {
776  std::lock_guard<std::recursive_mutex> lock(getMutex());
777  const TrigHolderStructure& holderstorage = getHolderStorage();
778 
779  return holderstorage.getLabel(clid,sti_or_label);
780 }
781 
782 
784 
785 
787  bool single = true; bool recursively = false;
788  bool status = getFeatureAccessors(te, clid,index_or_label,single,features,recursively);
789 
790  if(status && !features.empty()){
791  return features.front();
792  }
793  return TriggerElement::FeatureAccessHelper(); // not found
794 }
795 
796 
798  const index_or_label_type& index_or_label, const TriggerElement*& sourceTE) const {
799 
801  bool single = true; bool recursively = true;
802  bool status = getFeatureAccessors(startTE, clid,index_or_label,single,features,recursively,sourceTE);
803 
804  if(status && !features.empty()){
805  return features.front();
806  }
807  return TriggerElement::FeatureAccessHelper(); // not found
808 }
809 
811  const index_or_label_type& index_or_label,
812  bool only_single_feature,
813  TriggerElement::FeatureVec& features,
814  const TriggerElement*& source,
815  std::string& sourcelabel ) const {
816 
817  // ATH_MSG_VERBOSE("getFeatureAccessorsSingleTE: looking for:" << (only_single_feature ? "one object" : "many objects" ) << " of CLID: " << clid
818  // << " label: \"" << label << "\"" << " starting from TE: " << te->getId());
819 
820  int size = te->getFeatureAccessHelpers().size();
821 
822  // loop the feature access helper in order depending of type of request (i.e. if single featyure needed then loop from back, if all then loop from the front)
823  for ( int it = ( only_single_feature ? size-1 : 0 ); it != (only_single_feature ? -1 : size ); only_single_feature ? it--: it++ ) {
824  auto& fea = te->getFeatureAccessHelpers().at(it);
825  //ATH_MSG_VERBOSE("getFeatureAccessors: in a loop over FeatureAccessHelpers got ObjectIndex " << fea);
826 
827  if(matchFeature(fea,clid,index_or_label)){
828  sourcelabel = label(clid,fea.getIndex().subTypeIndex());
829  source = te;
830  features.push_back(fea);
831 
832  // ATH_MSG_DEBUG("getFeatureAccessors: matching feature found in te: " << *te << " index: " << fea);
833  // now the ending (depends on the "single" flag)
834  if ( only_single_feature )
835  break;
836  }
837  } // end of loop over feature access helpers of this TE
838 
839  return true;
840 }
841 
843  const index_or_label_type& index_or_label,
844  bool only_single_feature,
845  TriggerElement::FeatureVec& features,
846  bool travel_backward_recursively,
847  const TriggerElement*& source,
848  std::string& sourcelabel ) const {
849 
850  bool singleTEstatus = getFeatureAccessorsSingleTE(te,clid,index_or_label,only_single_feature,features,source,sourcelabel);
851 
852  if(!singleTEstatus){
853  // MLOG(WARNING) << "getFeatureAccessorsSingleTE() returned false" << endmsg;
854  }
855 
856 
857 
858  if ( ! travel_backward_recursively ) {
859  return true;
860  }
861 
862  // stop digging deeper if this is an RoI node already
863  if ( isRoINode(te) ) {
864  return true;
865  }
866 
867  // return if a feature(s) is/are found
868  if ( ! features.empty() ) {
869  return true;
870  }
871 
872  // recurse deeper
873  bool recursion_status = true;
874  for( TriggerElement* predecessor: getDirectPredecessors(te) ) {
875 
876  TriggerElement::FeatureVec features_in_branch;
877 
878  recursion_status = recursion_status && getFeatureAccessors( predecessor, clid, index_or_label,
879  only_single_feature, features_in_branch,
880  travel_backward_recursively,
881  source, sourcelabel);
882  features.insert(features.end(), features_in_branch.begin(), features_in_branch.end());
883  }
884 
885  if ( only_single_feature && ( features.size() > 1 || recursion_status == false) ) {
886  // MLOG(DEBUG) << "getFeatureAccessors: looking for object of CLID: " << clid
887  // << " label: \"" << label << "\"" << " found several objects matching criteria while can only return back one, this is ambiguous" << endmsg;
888 
889  if ( getDirectPredecessors(te).size() > 1 ) // mark bifurcation point as to where one can start again
890  source = te;
891 
892  return false;
893  }
894  return true;
895 }
896 
897 
899  //we always require the CLID to match
900  if(fea.getCLID() != clid) return false;
901 
902  if(index_or_label.index() == 0){
903  //subtype index case: if argument is invalid_sub_index we always match, else require exact match
904  auto index = std::get<sub_index_type>(index_or_label) ;
905  return (index == invalid_sub_index || index == fea.getIndex().subTypeIndex());
906  }
907 
908  if(index_or_label.index() == 1){
909  //label case: if argument is "" we always match, else require exact match (via)
910  auto label = std::get<std::string>(index_or_label);
911  if(label.empty()){
912  return true;
913  }
914  label = (label == "!") ? "" : label;
915  auto sub = subType(clid,label);
916  if(sub == invalid_sub_index) return false;
917  return matchFeature(fea,clid,sub);
918  }
919  return false;
920 }
921 
922 
924  std::lock_guard<std::recursive_mutex> lock(getMutex());
925  const TrigHolderStructure& holderstorage = getHolderStorage();
926 
927  return holderstorage.getHolderForFeature(fea);
928 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
HLT::TrigNavStructure::haveAllCommonRoIs
static bool haveAllCommonRoIs(const HLT::TriggerElement *te1, const HLT::TriggerElement *te2)
Definition: TrigNavStructure.cxx:449
HLT::TrigNavStructure::haveDistinctSeed
static bool haveDistinctSeed(const TriggerElement *te1, const TriggerElement *te2)
inversion of haveCommonSeed
Definition: TrigNavStructure.cxx:481
HLT::TriggerElement::addFeature
void addFeature(class_id_type clid, const ObjectIndex &index, bool forget=false)
add helper for new feature
Definition: TrigNavStructure/Root/TriggerElement.cxx:37
HLT::TrigNavStructure::combine
bool combine(std::vector< unsigned int > &types, std::vector< std::vector< TriggerElement * > > &output, unsigned int maxResults=1000, bool onlyActive=true)
For Algorithms: return all the possible n-tuples of TE* objects (te0, te1..., ten)
Definition: TrigNavStructure.cxx:582
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
HLT::TrigNavStructure::getAll
void getAll(std::vector< TriggerElement * > &output, const bool activeOnly=true) const
The query returning a collection of all TriggerElements.
Definition: TrigNavStructure.cxx:363
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
HLT::TrigNavStructure::getAllOfType
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.
Definition: TrigNavStructure.cxx:344
HLT::TrigNavStructure::label
std::string label(class_id_type clid, const index_or_label_type &sti_or_label) const
Definition: TrigNavStructure.cxx:775
HLT::TrigNavStructure::isRoINode
static bool isRoINode(const TriggerElement *te)
queries if node is an RoI type one
Definition: TrigNavStructure.cxx:507
TrigNavStructure.h
HLT::TrigNavStructure::s_rmutex
static std::recursive_mutex s_rmutex
Definition: TrigNavStructure.h:385
HLT::TriggerElement::seedsRelation
@ seedsRelation
what TEs I am seeding
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:118
index
Definition: index.py:1
HLT::TriggerElementFactory::listOfProduced
const std::vector< TriggerElement * > & listOfProduced() const
Definition: TriggerElementFactory.h:36
HLT::TrigNavStructure::printASCIIArt
void printASCIIArt(std::string &str, const TriggerElement *te=0, int offset=0) const
pretty printing of the navigational structure (heavy)
Definition: TrigNavStructure.cxx:152
HLT::TrigHolderStructure
Definition: TrigHolderStructure.h:21
HLT::TriggerElement::FeatureVec
std::vector< FeatureAccessHelper > FeatureVec
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:233
HLT::TrigNavStructure::getMutex
std::recursive_mutex & getMutex()
Definition: TrigNavStructure.h:371
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
HLT::TriggerElement::getId
te_id_type getId() const
reset internals.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:43
HLT::TriggerElement::FeatureAccessHelper::getCLID
class_id_type getCLID() const
Class ID of object.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:208
HLT::TrigNavStructure::isTerminalNode
static bool isTerminalNode(const TriggerElement *te)
queries if node is terminal (no more TriggerElement are seeded by it)
Definition: TrigNavStructure.cxx:517
HLT::TriggerElement::getActiveState
bool getActiveState() const
get state of the TriggerElement
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:48
HLT::TrigNavStructure::m_holderstorage
SG::SlotSpecificObj< TrigHolderStructure > m_holderstorage
structure for feature holders (one per processing slot)
Definition: TrigNavStructure.h:383
HLT::TrigNavStructure::getFeatureAccessorsSingleTE
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
Definition: TrigNavStructure.cxx:810
HLT::TrigNavStructure::reset
virtual void reset(bool inFinalize=false)
resets all the navigation, goes to the factory and asks to withdraw all produced objects
Definition: TrigNavStructure.cxx:756
HLT::TriggerElement::getErrorState
bool getErrorState() const
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:65
HLT::TrigNavStructure::haveDistinctRoI
static bool haveDistinctRoI(const TriggerElement *te1, const TriggerElement *te2)
inversion of haveCommonRoI
Definition: TrigNavStructure.cxx:444
HLT::TrigNavStructure::getTopologicallySpannedBy
bool getTopologicallySpannedBy(const TriggerElement *te, const std::vector< unsigned int > &types, std::vector< const TriggerElement * > &children, const bool activeOnly=true) const
gets the TEs whose predecessors were used to built a given topological TE
Definition: TrigNavStructure.cxx:714
HLT::TrigNavStructure::~TrigNavStructure
virtual ~TrigNavStructure()
Definition: TrigNavStructure.cxx:30
HLT::TrigNavStructure
Definition: TrigNavStructure.h:40
HLT::TrigNavStructure::getFeatureAccessors
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
Definition: TrigNavStructure.cxx:842
std::sort
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:554
HLT::TriggerElement::seededByRelation
@ seededByRelation
what TEs are seeding me
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:119
HLT::TrigNavStructure::getInitialNode
TriggerElement * getInitialNode()
gets initial node, if node is not there then it is created on fly
Definition: TrigNavStructure.cxx:39
HLT::TrigNavStructure::haveCommonSeed
static bool haveCommonSeed(const TriggerElement *te1, const TriggerElement *te2)
checks that there is any common predecessor of two TriggerElements
Definition: TrigNavStructure.cxx:461
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
HLT::TriggerElement::getRelated
const std::vector< TriggerElement * > & getRelated(Relation rel) const
returns reference to the likns to other TriggerElements related by relation r
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:127
HLT::TrigHolderStructure::reset
void reset()
Definition: TrigHolderStructure.cxx:10
HLT::TrigNavStructure::haveCommonRoI
static bool haveCommonRoI(const TriggerElement *te1, const TriggerElement *te2)
does this 2 share RoI
Definition: TrigNavStructure.cxx:416
HLT::operator<<
MsgStream & operator<<(MsgStream &m, const Navigation &nav)
Definition: Navigation.cxx:168
HLT::TrigNavStructure::getFactory
TriggerElementFactory & getFactory()
Definition: TrigNavStructure.h:369
HLT::TrigNavStructure::getDirectSuccessors
static const std::vector< TriggerElement * > & getDirectSuccessors(const TriggerElement *te)
returns list of direct predecessors (nodes I seed)
Definition: TrigNavStructure.cxx:124
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
HLT::TrigNavStructure::m_factory
SG::SlotSpecificObj< TriggerElementFactory > m_factory
factory of trigger elements (one per processing slot)
Definition: TrigNavStructure.h:382
HLT::TriggerElement::ObjectIndex::subTypeIndex
sub_index_type subTypeIndex() const
to get collection index
Definition: TrigNavStructure/Root/TriggerElement.cxx:247
HLT::TrigNavStructure::deserializeTEs
bool deserializeTEs(std::vector< uint32_t >::const_iterator &start, unsigned int totalSize)
Definition: TrigNavStructure.cxx:264
HLTNavDetails::FillSize
Definition: TrigNavStructure.h:26
HLT::TrigNavStructure::serializeTEs
bool serializeTEs(std::vector< uint32_t > &output) const
method serizlizes the navigation structure
Definition: TrigNavStructure.cxx:217
HLT::TriggerElement::sameRoIRelation
@ sameRoIRelation
equilateral relation of all TEs rooted in one RoI
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:117
HLT::TrigNavStructure::getDirectPredecessors
static const std::vector< TriggerElement * > & getDirectPredecessors(const TriggerElement *te)
returns list of direct predecessors (nodes seeding me)
Definition: TrigNavStructure.cxx:120
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
HLT::index_or_label_type
std::variant< sub_index_type, std::string > index_or_label_type
Definition: Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/Types.h:16
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
HLT::TrigHolderStructure::getHolderForFeature
HolderType * getHolderForFeature(const TriggerElement::FeatureAccessHelper &fea) const
Definition: TrigHolderStructure.h:35
lumiFormat.i
int i
Definition: lumiFormat.py:85
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
HLT::TriggerElement::relate
void relate(TriggerElement *te, Relation r)
reates given TE to other TE
Definition: TrigNavStructure/Root/TriggerElement.cxx:86
HLT::TrigNavStructure::subType
sub_index_type subType(class_id_type clid, const index_or_label_type &sti_or_label) const
Definition: TrigNavStructure.cxx:768
HLT::TrigNavStructure::copyAllFeatures
unsigned int copyAllFeatures(const TriggerElement *sourceTE, TriggerElement *destTE)
gets all features from the sourceTE and copies a reference (FeatureAccessHelper) to the destTE
Definition: TrigNavStructure.cxx:736
HLT::TrigNavStructure::getHolderStorage
TrigHolderStructure & getHolderStorage()
Definition: TrigNavStructure.h:370
HLT::BaseHolder
Definition: BaseHolder.h:14
HLT::class_id_type
uint32_t class_id_type
Definition: Trigger/TrigEvent/TrigNavStructure/Root/Types.h:11
HLT::TriggerElement::enquireId
static unsigned int enquireId(std::vector< uint32_t >::const_iterator &inputIt)
Definition: TrigNavStructure/Root/TriggerElement.cxx:111
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
HLT::sub_index_type
uint16_t sub_index_type
Definition: Trigger/TrigEvent/TrigNavStructure/Root/Types.h:9
HLT::TrigNavStructure::getFeature
TriggerElement::FeatureAccessHelper getFeature(const TriggerElement *te, class_id_type clid, const index_or_label_type &index_or_label) const
typeless feature access metod
Definition: TrigNavStructure.cxx:783
merge.output
output
Definition: merge.py:17
HLT::TrigNavStructure::getSuccessor
static const TriggerElement * getSuccessor(const TriggerElement *te, unsigned int id)
returns successor of given type beeing seeded from this TE
Definition: TrigNavStructure.cxx:129
HLT::TriggerElementFactory
The factory of TriggerElements Creation in controlled way.
Definition: TriggerElementFactory.h:28
HLT::TrigNavStructure::getAllRoIThresholdTEs
void getAllRoIThresholdTEs(std::vector< TriggerElement * > &output) const
The query returns a vector of all TriggerElements that represent a LVL1 RoI threshold.
Definition: TrigNavStructure.cxx:328
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
HLT::TrigNavStructure::addRoINode
TriggerElement * addRoINode(TriggerElement *initial)
gets RoI node (attached to initial)
Definition: TrigNavStructure.cxx:58
HLT::TrigNavStructure::decreasingOrderByTEId
static bool decreasingOrderByTEId(const TriggerElement *te1, const TriggerElement *te2)
Definition: TrigNavStructure.cxx:489
HLT::TrigNavStructure::overlaps
bool overlaps(const TriggerElement *t1, const TriggerElement *t2) const
Check overlap between trigger elements (pointer equality or RoI overlap)
Definition: TrigNavStructure.cxx:707
HLT::TriggerElementFactory::reset
void reset()
Definition: TriggerElementFactory.cxx:28
HLT::TrigNavStructure::isCompatibleTree
static bool isCompatibleTree(const TriggerElement *te1, const TriggerElement *te2)
check compatibility of 2 navigation structures
Definition: TrigNavStructure.cxx:526
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
TypelessHolder.h
HLT::TrigNavStructure::getRoINodes
static const std::vector< TriggerElement * > & getRoINodes(const TriggerElement *somenode)
gets all RoI type nodes seeding indirectly this TriggerElement
Definition: TrigNavStructure.cxx:73
HLT::TrigNavStructure::getFeatureRecursively
TriggerElement::FeatureAccessHelper getFeatureRecursively(const TriggerElement *startTE, class_id_type clid, const index_or_label_type &index_or_label, const TriggerElement *&sourceTE) const
recursive search for features the function is similar to the above butif th features is not found at ...
Definition: TrigNavStructure.cxx:797
python.PyAthena.v
v
Definition: PyAthena.py:154
HLT::TrigNavStructure::getAllTEs
std::vector< TriggerElement * > & getAllTEs()
access needed by slimming tools.
Definition: TrigNavStructure.cxx:376
HLT::TrigNavStructure::isInitialNode
static bool isInitialNode(const TriggerElement *te)
queries if node is an initial one
Definition: TrigNavStructure.cxx:501
HLT::TriggerElement::FeatureAccessHelper::getIndex
const ObjectIndex & getIndex() const
index in the external ojects array
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:209
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
HLT::TrigNavStructure::fillSameRoIRelation
void fillSameRoIRelation(TriggerElement *roi, TriggerElement *te)
rebuilds the sameRoIRelation between trigger elements (used internally by deserialize)
Definition: TrigNavStructure.cxx:307
CSV_InDetExporter.old
old
Definition: CSV_InDetExporter.py:145
HLT::TriggerElement::FeatureAccessHelper
the FeatureAccessHelper is a class used to keep track of features attached to this TE.
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:192
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DeMoScan.first
bool first
Definition: DeMoScan.py:536
TriggerTest.rois
rois
Definition: TriggerTest.py:23
HLT::TrigHolderStructure::getSubTypeIndex
sub_index_type getSubTypeIndex(class_id_type clid, const index_or_label_type &stiOrLabel) const
Definition: TrigHolderStructure.h:63
HLT::TrigNavStructure::hasIdFromTheSet
static bool hasIdFromTheSet(const TriggerElement *te, std::vector< unsigned int > ids)
simple helper
Definition: TrigNavStructure.cxx:493
Herwig7_QED_EvtGen_ll.fs
dictionary fs
Definition: Herwig7_QED_EvtGen_ll.py:17
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
python.DecayParser.children
children
Definition: DecayParser.py:32
HLT::TrigNavStructure::countAllOfType
unsigned int countAllOfType(const te_id_type id, const bool activeOnly=true) const
The query counting a collection of all TriggerElement of a given type.
Definition: TrigNavStructure.cxx:390
HLT::TriggerElement::getFeatureAccessHelpers
const std::vector< FeatureAccessHelper > & getFeatureAccessHelpers() const
returns all features which ara attached to this TE
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:238
copySelective.source
string source
Definition: copySelective.py:32
str
Definition: BTagTrackIpAccessor.cxx:11
python.copyTCTOutput.totalSize
totalSize
Definition: copyTCTOutput.py:93
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
merge.status
status
Definition: merge.py:17
HLT::TriggerElement::deserialize
void deserialize(std::vector< uint32_t >::const_iterator &inputIt, const std::map< uint16_t, TriggerElement * > &keys, const TriggerElement *previous)
deserialization
Definition: TrigNavStructure/Root/TriggerElement.cxx:182
calibdata.copy
bool copy
Definition: calibdata.py:27
HLT::TrigNavStructure::addNode
TriggerElement * addNode(TriggerElement *seed, unsigned int id)
adds nodes seeded form the one given as an argument,
Definition: TrigNavStructure.cxx:79
HLT::TrigNavStructure::increasingOrderByTEId
static bool increasingOrderByTEId(const TriggerElement *te1, const TriggerElement *te2)
for sorting TriggerElements according to their id
Definition: TrigNavStructure.cxx:485
HLT::TriggerElementFactory::empty
bool empty() const
Definition: TriggerElementFactory.cxx:24
HLT::TrigNavStructure::addOneLevel
bool addOneLevel(std::vector< std::vector< TriggerElement * > > &currentCombs, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &currentIdxs, unsigned int type, std::vector< std::vector< TriggerElement * > > &newCombs, std::vector< std::vector< std::pair< unsigned int, unsigned int > > > &newIdxs, unsigned int maxResults=1000, bool onlyActive=1)
Helper method for "combine": add one "level" of multiplicity to the results.
Definition: TrigNavStructure.cxx:610
HLT::TrigNavStructure::isNotActive
static bool isNotActive(const TriggerElement *te)
helper for the STL
Definition: TrigNavStructure.h:257
HLT::TrigNavStructure::propagateDeactivation
bool propagateDeactivation(const TrigNavStructure *nav)
propagates deactivation of TE state This finction should be used after Trigger is rerurn on L2 and th...
Definition: TrigNavStructure.cxx:557
HLT::TrigNavStructure::matchFeature
bool matchFeature(const TriggerElement::FeatureAccessHelper &fea, class_id_type clid, const index_or_label_type &index_or_label) const
Definition: TrigNavStructure.cxx:898
HLT::TriggerElementFactory::produce
TriggerElement * produce(unsigned int id, bool ghost=false, bool nofwd=false)
Definition: TriggerElementFactory.cxx:16
HLT::TrigNavStructure::getHolder
const BaseHolder * getHolder(const TriggerElement::FeatureAccessHelper &fea) const
Definition: TrigNavStructure.cxx:923
HLT::TriggerElement::getPreviousFeatures
const std::vector< FeatureAccessHelper > & getPreviousFeatures() const
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:251
HLT::TrigHolderStructure::getLabel
std::string getLabel(class_id_type clid, const index_or_label_type &stiOrLabel) const
Definition: TrigHolderStructure.h:78
Trk::previous
@ previous
Definition: BinningData.h:32
HLT::te_id_type
uint32_t te_id_type
Definition: Trigger/TrigEvent/TrigNavStructure/TrigNavStructure/Types.h:11