ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConfSeq Class Reference

#include <TrigConfSeq.h>

Collaboration diagram for TrigConfSeq:

Public Member Functions

 TrigConfSeq ()=default
 TrigConfSeq (unsigned int id, unsigned int index, const std::string &name)
void clearStrings ()
void addAlg (const TrigConfAlg &alg)
void addInputTE (uint32_t te_id)
void setTopoTE (uint32_t te_id)
uint16_t getIndex () const
uint32_t getId () const
const std::string & getName () const
uint32_t getTopoTE () const
const std::vector< uint32_t > & getInputTEs () const
const TrigConfAlggetAlg (unsigned int pos) const
const std::vector< TrigConfAlg > & getAlg () const
unsigned int getNAlg () const
std::vector< TrigConfAlg >::const_iterator algBeg () const
std::vector< TrigConfAlg >::const_iterator algEnd () const
std::vector< TrigConfAlg >::const_iterator findName (const std::string &aname) const
std::vector< TrigConfAlg >::const_iterator findType (const std::string &atype) const
bool matchAlgName (const std::string &aname) const
bool matchAlgType (const std::string &atype) const
void print (std::ostream &os) const
void print () const

Private Attributes

std::string m_output_te_name
uint16_t m_output_te_index {}
uint32_t m_output_te_id {}
uint32_t m_topo_te {}
std::vector< TrigConfAlgm_alg
std::vector< uint32_t > m_input_te

Detailed Description

Definition at line 29 of file TrigConfSeq.h.

Constructor & Destructor Documentation

◆ TrigConfSeq() [1/2]

TrigConfSeq::TrigConfSeq ( )
default

◆ TrigConfSeq() [2/2]

TrigConfSeq::TrigConfSeq ( unsigned int id,
unsigned int index,
const std::string & name )

Definition at line 16 of file TrigConfSeq.cxx.

19 :m_output_te_name(name),
20 m_output_te_index(index),
22 m_topo_te(0)
23{
24}
uint32_t m_output_te_id
Definition TrigConfSeq.h:70
uint32_t m_topo_te
Definition TrigConfSeq.h:71
uint16_t m_output_te_index
Definition TrigConfSeq.h:69
std::string m_output_te_name
Definition TrigConfSeq.h:68

Member Function Documentation

◆ addAlg()

void TrigConfSeq::addAlg ( const TrigConfAlg & alg)
inline

Definition at line 38 of file TrigConfSeq.h.

38{ m_alg.push_back(alg); }
std::vector< TrigConfAlg > m_alg
Definition TrigConfSeq.h:72

◆ addInputTE()

void TrigConfSeq::addInputTE ( uint32_t te_id)
inline

Definition at line 39 of file TrigConfSeq.h.

39{ m_input_te.push_back(te_id); }
std::vector< uint32_t > m_input_te
Definition TrigConfSeq.h:73

◆ algBeg()

std::vector< TrigConfAlg >::const_iterator TrigConfSeq::algBeg ( ) const
inline

Definition at line 54 of file TrigConfSeq.h.

54{ return m_alg.begin(); }

◆ algEnd()

std::vector< TrigConfAlg >::const_iterator TrigConfSeq::algEnd ( ) const
inline

Definition at line 55 of file TrigConfSeq.h.

55{ return m_alg.end(); }

◆ clearStrings()

void TrigConfSeq::clearStrings ( )

Definition at line 27 of file TrigConfSeq.cxx.

28{
29 //
30 // Clear all string variables
31 //
32 m_output_te_name.clear();
33 for(unsigned int i = 0; i < m_alg.size(); ++i) m_alg[i].clearStrings();
34}
void clearStrings()

◆ findName()

std::vector< TrigConfAlg >::const_iterator TrigConfSeq::findName ( const std::string & aname) const

Definition at line 53 of file TrigConfSeq.cxx.

54{
55 // find first algorithm by name
56 std::vector<TrigConfAlg>::const_iterator it = m_alg.begin();
57
58 for(; it != m_alg.end(); ++it) {
59 if(it->getName() == aname) break;
60 }
61
62 return it;
63}

◆ findType()

std::vector< TrigConfAlg >::const_iterator TrigConfSeq::findType ( const std::string & atype) const

Definition at line 66 of file TrigConfSeq.cxx.

67{
68 // find first algorithm by type
69 std::vector<TrigConfAlg>::const_iterator it = m_alg.begin();
70
71 for(; it != m_alg.end(); ++it) {
72 if(it->getType() == atype) break;
73 }
74
75 return it;
76}

◆ getAlg() [1/2]

const std::vector< TrigConfAlg > & TrigConfSeq::getAlg ( ) const
inline

Definition at line 50 of file TrigConfSeq.h.

50{ return m_alg; }

◆ getAlg() [2/2]

const TrigConfAlg & TrigConfSeq::getAlg ( unsigned int pos) const

Definition at line 37 of file TrigConfSeq.cxx.

38{
39 if(pos >= m_alg.size()) {
40 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfSeq")
41 << "getAlg(" << pos << ") error! Index is greater than alg size=" << m_alg.size() << " for " << m_output_te_name;
42 return m_alg.front();
43 }
44 if(m_alg[pos].getPosition() != pos) {
45 REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "TrigConfSeq")
46 << "getAlg(" << pos << ") error! Index mismatch: " << m_alg[pos].getPosition() << "!=" << pos;
47 }
48
49 return m_alg[pos];
50}
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Eigen::Vector3d getPosition(const xAOD::TrackParticle &trk)

◆ getId()

uint32_t TrigConfSeq::getId ( ) const
inline

Definition at line 43 of file TrigConfSeq.h.

43{ return m_output_te_id; }

◆ getIndex()

uint16_t TrigConfSeq::getIndex ( ) const
inline

Definition at line 42 of file TrigConfSeq.h.

42{ return m_output_te_index; }

◆ getInputTEs()

const std::vector< uint32_t > & TrigConfSeq::getInputTEs ( ) const
inline

Definition at line 47 of file TrigConfSeq.h.

47{ return m_input_te; }

◆ getNAlg()

unsigned int TrigConfSeq::getNAlg ( ) const
inline

Definition at line 52 of file TrigConfSeq.h.

52{ return m_alg.size(); }

◆ getName()

const std::string & TrigConfSeq::getName ( ) const
inline

Definition at line 44 of file TrigConfSeq.h.

44{ return m_output_te_name; }

◆ getTopoTE()

uint32_t TrigConfSeq::getTopoTE ( ) const
inline

Definition at line 45 of file TrigConfSeq.h.

45{ return m_topo_te; }

◆ matchAlgName()

bool TrigConfSeq::matchAlgName ( const std::string & aname) const

Definition at line 79 of file TrigConfSeq.cxx.

80{
81 //
82 // Match algorithm name to a list of my configured algorithms
83 //
84 return (TrigConfSeq::findName(aname) != m_alg.end());
85}
std::vector< TrigConfAlg >::const_iterator findName(const std::string &aname) const

◆ matchAlgType()

bool TrigConfSeq::matchAlgType ( const std::string & atype) const

Definition at line 88 of file TrigConfSeq.cxx.

89{
90 //
91 // Match algorithm type to a list of my configured algorithms
92 //
93 return (TrigConfSeq::findType(atype) != m_alg.end());
94}
std::vector< TrigConfAlg >::const_iterator findType(const std::string &atype) const

◆ print() [1/2]

void TrigConfSeq::print ( ) const

Definition at line 101 of file TrigConfSeq.cxx.

102{
103 std::cout << str(*this) << std::endl;
104}

◆ print() [2/2]

void TrigConfSeq::print ( std::ostream & os) const

Definition at line 97 of file TrigConfSeq.cxx.

98{
99 os << str(*this) << std::endl;
100}

◆ setTopoTE()

void TrigConfSeq::setTopoTE ( uint32_t te_id)
inline

Definition at line 40 of file TrigConfSeq.h.

40{ m_topo_te = te_id; }

Member Data Documentation

◆ m_alg

std::vector<TrigConfAlg> TrigConfSeq::m_alg
private

Definition at line 72 of file TrigConfSeq.h.

◆ m_input_te

std::vector<uint32_t> TrigConfSeq::m_input_te
private

Definition at line 73 of file TrigConfSeq.h.

◆ m_output_te_id

uint32_t TrigConfSeq::m_output_te_id {}
private

Definition at line 70 of file TrigConfSeq.h.

70{}; // Id of output TE

◆ m_output_te_index

uint16_t TrigConfSeq::m_output_te_index {}
private

Definition at line 69 of file TrigConfSeq.h.

69{}; // Index of output TE (in current configuration)

◆ m_output_te_name

std::string TrigConfSeq::m_output_te_name
private

Definition at line 68 of file TrigConfSeq.h.

◆ m_topo_te

uint32_t TrigConfSeq::m_topo_te {}
private

Definition at line 71 of file TrigConfSeq.h.

71{}; // Id of topo start TE

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