ATLAS Offline Software
Loading...
Searching...
No Matches
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
 HLTSequenceList (std::vector< HLTSequence * > &HLTSequenceList)
 constructor with configuration data
 ~HLTSequenceList ()
 destructor
void addHLTSequence (HLTSequence *sequence)
 adds an HLTSequence to the menu
void clear ()
void print (const std::string &indent="", unsigned int detail=1) const
 print the sequence list
bool hasTE (const std::string &name)
HLTSequencegetSequence (unsigned int id) const
 counts the number of sequences in the menu
HLTSequencegetSequence (const std::string &tename) const
bool getLabel (unsigned int hashId, std::string &label)
 find name from ID in the map m_IdToLabel
bool getHashIdFromLabel (const char *label, unsigned int &hashId)
 find ID from name in the map m_IdToLabel
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}
bool copy
Definition calibdata.py:26

◆ ~HLTSequenceList()

TrigConf::HLTSequenceList::~HLTSequenceList ( void )

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;
27 HLTSequenceContainer::clear();
28}
seq
filter configuration ## -> we use the special sequence 'AthMasterSeq' which is run before any other a...

◆ 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}
HLTSequence * getSequence(unsigned int id) const
counts the number of sequences in the menu

◆ 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}
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
std::string label(const std::string &format, int i)
Definition label.h:19

◆ 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}

◆ operator<<

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

The documentation for this class was generated from the following files: