ATLAS Offline Software
Public Member Functions | Friends | List of all members
TrigConf::HLTSequenceList Class Reference

list of HLT sequences More...

#include <HLTSequenceList.h>

Inheritance diagram for TrigConf::HLTSequenceList:
Collaboration diagram for TrigConf::HLTSequenceList:

Public Member Functions

 HLTSequenceList ()
 default constructor More...
 
 HLTSequenceList (std::vector< HLTSequence * > &HLTSequenceList)
 constructor with configuration data More...
 
 ~HLTSequenceList ()
 destructor More...
 
void addHLTSequence (HLTSequence *sequence)
 adds an HLTSequence to the menu More...
 
void clear ()
 
void print (const std::string &indent="", unsigned int detail=1) const
 print the sequence list More...
 
bool hasTE (const std::string &name)
 
HLTSequencegetSequence (unsigned int id) const
 counts the number of sequences in the menu More...
 
HLTSequencegetSequence (const std::string &tename) const
 
bool getLabel (unsigned int hashId, std::string &label)
 find name from ID in the map m_IdToLabel More...
 
bool getHashIdFromLabel (const char *label, unsigned int &hashId)
 find ID from name in the map m_IdToLabel More...
 
DiffStructcompareTo (const HLTSequenceList *o) const
 

Friends

std::ostream & operator<< (std::ostream &, const HLTSequenceList &)
 

Detailed Description

list of HLT sequences

Definition at line 40 of file HLTSequenceList.h.

Constructor & Destructor Documentation

◆ HLTSequenceList() [1/2]

TrigConf::HLTSequenceList::HLTSequenceList ( )

default constructor

Definition at line 15 of file HLTSequenceList.cxx.

15 {}

◆ HLTSequenceList() [2/2]

TrigConf::HLTSequenceList::HLTSequenceList ( std::vector< HLTSequence * > &  HLTSequenceList)

constructor with configuration data

Parameters
HLTSequenceListlist of HLT sequences

Definition at line 17 of file HLTSequenceList.cxx.

17  {
18  copy( sequenceList.begin(), sequenceList.end(), std::inserter(*this, begin()));
19 }

◆ ~HLTSequenceList()

TrigConf::HLTSequenceList::~HLTSequenceList ( )

destructor

Definition at line 21 of file HLTSequenceList.cxx.

21  {
22  clear();
23 }

Member Function Documentation

◆ addHLTSequence()

void TrigConf::HLTSequenceList::addHLTSequence ( HLTSequence sequence)

adds an HLTSequence to the menu

Parameters
sequencesequence to be added

Definition at line 30 of file HLTSequenceList.cxx.

30  {
31  if(sequence==0) return;
32  pair<iterator, bool> ins = insert(sequence);
33  if(!ins.second) {
34  throw runtime_error("Can't insert sequence '" + sequence->name() + "', because a uniqueness constraint is violated");
35  }
36 }

◆ clear()

void TrigConf::HLTSequenceList::clear ( )

Definition at line 25 of file HLTSequenceList.cxx.

25  {
26  for(HLTSequence* seq : *this) delete seq;
28 }

◆ compareTo()

TrigConf::DiffStruct * TrigConf::HLTSequenceList::compareTo ( const HLTSequenceList o) const

Definition at line 89 of file HLTSequenceList.cxx.

89  {
90  DiffStruct * ds = new DiffStruct("SEQUENCE_LIST");
91  for(HLTSequence* seq : *this) {
92  const HLTSequence *o_seq = o->getSequence(seq->name());
93  if(o_seq) {
94  ds->addSub( seq->compareTo(o_seq) );
95  } else {
96  ds->addLeftOnlySub( "SEQUENCE", seq->name() );
97  }
98  }
99  for(HLTSequence* o_seq : *o) {
100  const HLTSequence *seq = getSequence(o_seq->name());
101  if(!seq)
102  ds->addRightOnlySub( "SEQUENCE", o_seq->name() );
103  }
104  if(ds->empty()) {
105  delete ds; ds=0;
106  }
107  return ds;
108 }

◆ getHashIdFromLabel()

bool TrigConf::HLTSequenceList::getHashIdFromLabel ( const char *  label,
unsigned int &  hashId 
)

find ID from name in the map m_IdToLabel

Parameters
labelthe trigger element name that has been found
idreference to the trigger element ID that has been found
Returns
true if name has been found

Definition at line 76 of file HLTSequenceList.cxx.

76  {
77  const index<seq_name_hash>::type& byname = get<seq_name_hash>();
78  index<seq_name_hash>::type::const_iterator seq = byname.find(label);
79  if(seq != byname.end()) {
80  id = (*seq)->hashId();
81  return true;
82  } else {
83  id = 0;
84  return false;
85  }
86 }

◆ getLabel()

bool TrigConf::HLTSequenceList::getLabel ( unsigned int  hashId,
std::string &  label 
)

find name from ID in the map m_IdToLabel

Parameters
idtrigger element ID
labelreference to be set with the trigger element name that has been found
Returns
true if ID has been found

Definition at line 62 of file HLTSequenceList.cxx.

62  {
63  const index<seq_hash_id>::type& byid = get<seq_hash_id>();
64  index<seq_hash_id>::type::const_iterator seq = byid.find(id);
65  if(seq != byid.end()) {
66  label = (*seq)->name();
67  return true;
68  } else {
69  label = "";
70  return false;
71  }
72 }

◆ getSequence() [1/2]

TrigConf::HLTSequence * TrigConf::HLTSequenceList::getSequence ( const std::string &  tename) const

Definition at line 53 of file HLTSequenceList.cxx.

53  {
54  const index<seq_name_hash>::type& byname = get<seq_name_hash>();
55  index<seq_name_hash>::type::const_iterator seq = byname.find(name);
56  if(seq == byname.end()) return 0;
57  return *seq;
58 }

◆ getSequence() [2/2]

TrigConf::HLTSequence * TrigConf::HLTSequenceList::getSequence ( unsigned int  id) const

counts the number of sequences in the menu

Returns
the sequences with given output TE (0 if not found)

Definition at line 45 of file HLTSequenceList.cxx.

45  {
46  const index<seq_hash_id>::type& byid = get<seq_hash_id>();
47  index<seq_hash_id>::type::const_iterator seq = byid.find(id);
48  if(seq == byid.end()) return 0;
49  return *seq;
50 }

◆ hasTE()

bool TrigConf::HLTSequenceList::hasTE ( const std::string &  name)

Definition at line 39 of file HLTSequenceList.cxx.

39  {
40  return getSequence(name)!=0;
41 }

◆ print()

void TrigConf::HLTSequenceList::print ( const std::string &  indent = "",
unsigned int  detail = 1 
) const

print the sequence list

Definition at line 112 of file HLTSequenceList.cxx.

112  {
113  if(detail>=1) {
114  cout << indent << "HLTSequenceList has " << size() << " sequences" << endl;
115  if(detail>=4) {
116  cout << indent << "--------------------------------------------------------------------------------" << endl;
117  for(HLTSequence* seq : *this)
118  seq->print(indent + " ", detail);
119  cout << indent << "================================================================================" << endl;
120  }
121  }
122 }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  ,
const HLTSequenceList  
)
friend

The documentation for this class was generated from the following files:
test_athena_ntuple_filter.seq
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...
Definition: test_athena_ntuple_filter.py:18
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
TrigConf::HLTSequenceList::getSequence
HLTSequence * getSequence(unsigned int id) const
counts the number of sequences in the menu
Definition: HLTSequenceList.cxx:45
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
detail
Definition: extract_histogram_tag.cxx:14
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:18
TrigConf::HLTSequenceList::clear
void clear()
Definition: HLTSequenceList.cxx:25
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
calibdata.copy
bool copy
Definition: calibdata.py:27