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

Summary of one trigger element from navigation tree. More...

#include <TrigMonTE.h>

Collaboration diagram for TrigMonTE:

Public Types

enum  Type { kELEM = 0 , kINIT = 1 , kROI = 2 , kL1TH = 3 }
enum  State {
  activeState = 0x010000 , errorState = 0x020000 , terminalNode = 0x040000 , outputL2Node = 0x080000 ,
  outputEFNode = 0x100000 , topologicalTE = 0x200000
}

Public Member Functions

 TrigMonTE ()=default
 TrigMonTE (uint32_t id, uint16_t index)
void addChildIndex (uint16_t index)
void addParentIndex (uint16_t index)
void addRoiId (uint8_t roiid)
void addClid (uint32_t clid)
void addVar (const TrigMonVar &var)
void setType (Type type)
void addState (State state)
void clearIndexes ()
void clearClids ()
uint32_t getId () const
uint16_t getIndex () const
Type getType () const
bool getActiveState () const
bool getErrorState () const
bool isTerminalNode () const
bool isOutputL2Node () const
bool isOutputEFNode () const
bool isTopologicalTE () const
const std::vector< uint16_t > & getChildIndex () const
const std::vector< uint16_t > & getParentIndex () const
const std::vector< uint8_t > & getRoiId () const
const std::vector< uint32_t > & getClid () const
const std::vector< TrigMonVargetVar () const
const std::vector< uint16_t > & getVarKey () const
const std::vector< float > & getVarVal () const
void print (std::ostream &os)
void print ()

Private Attributes

uint32_t m_id {}
uint32_t m_encoded {}
std::vector< uint16_t > m_child
std::vector< uint16_t > m_parent
std::vector< uint8_t > m_roi
std::vector< uint32_t > m_clid
std::vector< uint16_t > m_var_key
std::vector< float > m_var_val

Friends

class TrigMonTECnv_p1

Detailed Description

Summary of one trigger element from navigation tree.

Author
Rustem Ospanov
Date
July 2009

Definition at line 27 of file TrigMonTE.h.

Member Enumeration Documentation

◆ State

Enumerator
activeState 
errorState 
terminalNode 
outputL2Node 
outputEFNode 
topologicalTE 

Definition at line 37 of file TrigMonTE.h.

37 {
38 activeState = 0x010000, // Active/inactive state of TE
39 errorState = 0x020000, // There was an error in algorithms dealing with this TE
40 terminalNode = 0x040000, // Node is terminal (no more TriggerElement are seeded by it)
41 outputL2Node = 0x080000, // This is output TE of passed or passedRaw L2 chain
42 outputEFNode = 0x100000, // This is output TE of passed or passedRaw EF chain
43 topologicalTE = 0x200000 // Topological TE (more than 1 parent)
44 };
@ terminalNode
Definition TrigMonTE.h:40
@ outputL2Node
Definition TrigMonTE.h:41
@ activeState
Definition TrigMonTE.h:38
@ topologicalTE
Definition TrigMonTE.h:43
@ outputEFNode
Definition TrigMonTE.h:42

◆ Type

Enumerator
kELEM 
kINIT 
kROI 
kL1TH 

Definition at line 31 of file TrigMonTE.h.

31 {
32 kELEM = 0, // Regular TE in navigation tree (default)
33 kINIT = 1, // Initial TE
34 kROI = 2, // RoI TE attached to initial TE
35 kL1TH = 3 // L1 threshold TE attached to ROI TE
36 };

Constructor & Destructor Documentation

◆ TrigMonTE() [1/2]

TrigMonTE::TrigMonTE ( )
default

◆ TrigMonTE() [2/2]

TrigMonTE::TrigMonTE ( uint32_t id,
uint16_t index )

Definition at line 27 of file TrigMonTE.cxx.

28 :m_id(id),
29 m_encoded(index)
30{
31}
uint32_t m_id
Definition TrigMonTE.h:89
uint32_t m_encoded
Definition TrigMonTE.h:90

Member Function Documentation

◆ addChildIndex()

void TrigMonTE::addChildIndex ( uint16_t index)
inline

Definition at line 49 of file TrigMonTE.h.

49{ m_child.push_back(index); }
std::vector< uint16_t > m_child
Definition TrigMonTE.h:92

◆ addClid()

void TrigMonTE::addClid ( uint32_t clid)
inline

Definition at line 53 of file TrigMonTE.h.

53{ m_clid.push_back(clid); }
std::vector< uint32_t > m_clid
Definition TrigMonTE.h:95

◆ addParentIndex()

void TrigMonTE::addParentIndex ( uint16_t index)
inline

Definition at line 50 of file TrigMonTE.h.

50{ m_parent.push_back(index); }
std::vector< uint16_t > m_parent
Definition TrigMonTE.h:93

◆ addRoiId()

void TrigMonTE::addRoiId ( uint8_t roiid)
inline

Definition at line 52 of file TrigMonTE.h.

52{ m_roi.push_back(roiid); }
std::vector< uint8_t > m_roi
Definition TrigMonTE.h:94

◆ addState()

void TrigMonTE::addState ( State state)

Definition at line 55 of file TrigMonTE.cxx.

56{
57 //
58 // Set state bits directly
59 //
60 m_encoded |= state;
61}

◆ addVar()

void TrigMonTE::addVar ( const TrigMonVar & var)

Definition at line 34 of file TrigMonTE.cxx.

35{
36 //
37 // Store variable as int and float, reserve 0-9 keys
38 //
39 if(var.getKey() > 9) {
40 m_var_key.push_back(var.getKey());
41 m_var_val.push_back(var.getData());
42 }
43}
std::vector< float > m_var_val
Definition TrigMonTE.h:98
std::vector< uint16_t > m_var_key
Definition TrigMonTE.h:97

◆ clearClids()

void TrigMonTE::clearClids ( )
inline

Definition at line 61 of file TrigMonTE.h.

61{ m_clid.clear(); }

◆ clearIndexes()

void TrigMonTE::clearIndexes ( )
inline

Definition at line 60 of file TrigMonTE.h.

60{ m_child.clear(); m_parent.clear(); }

◆ getActiveState()

bool TrigMonTE::getActiveState ( ) const
inline

Definition at line 67 of file TrigMonTE.h.

67{ return m_encoded & activeState; }

◆ getChildIndex()

const std::vector< uint16_t > & TrigMonTE::getChildIndex ( ) const
inline

Definition at line 74 of file TrigMonTE.h.

74{ return m_child; }

◆ getClid()

const std::vector< uint32_t > & TrigMonTE::getClid ( ) const
inline

Definition at line 78 of file TrigMonTE.h.

78{ return m_clid; }

◆ getErrorState()

bool TrigMonTE::getErrorState ( ) const
inline

Definition at line 68 of file TrigMonTE.h.

68{ return m_encoded & errorState; }

◆ getId()

uint32_t TrigMonTE::getId ( ) const
inline

Definition at line 63 of file TrigMonTE.h.

63{ return m_id; }

◆ getIndex()

uint16_t TrigMonTE::getIndex ( ) const

Definition at line 75 of file TrigMonTE.cxx.

76{
77 //
78 // Return index - mask low 16 bits
79 //
81}
const uint32_t maskLow16

◆ getParentIndex()

const std::vector< uint16_t > & TrigMonTE::getParentIndex ( ) const
inline

Definition at line 75 of file TrigMonTE.h.

75{ return m_parent; }

◆ getRoiId()

const std::vector< uint8_t > & TrigMonTE::getRoiId ( ) const
inline

Definition at line 77 of file TrigMonTE.h.

77{ return m_roi; }

◆ getType()

TrigMonTE::Type TrigMonTE::getType ( ) const

Definition at line 64 of file TrigMonTE.cxx.

65{
66 //
67 // Return trigger element type
68 //
69 const unsigned int val = (m_encoded & SeqBits::maskType) >> SeqBits::shiftType;
70 static constexpr std::array<Type,4> types{kELEM, kINIT, kROI, kL1TH};
71 return types.at(val);
72}
static const std::vector< std::string > types
const uint32_t maskType
Definition TrigMonTE.cxx:20
const uint32_t shiftType
Definition TrigMonTE.cxx:22

◆ getVar()

const std::vector< TrigMonVar > TrigMonTE::getVar ( ) const

Definition at line 84 of file TrigMonTE.cxx.

85{
86 //
87 // Build variables on a fly and return vector by value
88 //
89 std::vector<TrigMonVar> var;
90
91 if(m_var_key.size() == m_var_val.size()) {
92 //
93 // Iterate over keys abd values
94 //
95 var.reserve(m_var_key.size());
96
97 for(unsigned int i = 0; i < m_var_key.size(); ++i) {
98 var.push_back(TrigMonVar(m_var_key[i], m_var_val[i]));
99 }
100 }
101
102 return var;
103}

◆ getVarKey()

const std::vector< uint16_t > & TrigMonTE::getVarKey ( ) const
inline

Definition at line 81 of file TrigMonTE.h.

81{ return m_var_key; }

◆ getVarVal()

const std::vector< float > & TrigMonTE::getVarVal ( ) const
inline

Definition at line 82 of file TrigMonTE.h.

82{ return m_var_val; }

◆ isOutputEFNode()

bool TrigMonTE::isOutputEFNode ( ) const
inline

Definition at line 71 of file TrigMonTE.h.

71{ return m_encoded & outputEFNode; }

◆ isOutputL2Node()

bool TrigMonTE::isOutputL2Node ( ) const
inline

Definition at line 70 of file TrigMonTE.h.

70{ return m_encoded & outputL2Node; }

◆ isTerminalNode()

bool TrigMonTE::isTerminalNode ( ) const
inline

Definition at line 69 of file TrigMonTE.h.

69{ return m_encoded & terminalNode; }

◆ isTopologicalTE()

bool TrigMonTE::isTopologicalTE ( ) const
inline

Definition at line 72 of file TrigMonTE.h.

72{ return m_encoded & topologicalTE; }

◆ print() [1/2]

void TrigMonTE::print ( )

Definition at line 111 of file TrigMonTE.cxx.

112{
113 std::cout << str(*this) << std::endl;
114}

◆ print() [2/2]

void TrigMonTE::print ( std::ostream & os)

Definition at line 106 of file TrigMonTE.cxx.

107{
108 os << str(*this) << std::endl;
109}

◆ setType()

void TrigMonTE::setType ( Type type)

Definition at line 46 of file TrigMonTE.cxx.

47{
48 //
49 // Set trigger element type: use 2 bits
50 //
52}

◆ TrigMonTECnv_p1

friend class TrigMonTECnv_p1
friend

Definition at line 87 of file TrigMonTE.h.

Member Data Documentation

◆ m_child

std::vector<uint16_t> TrigMonTE::m_child
private

Definition at line 92 of file TrigMonTE.h.

◆ m_clid

std::vector<uint32_t> TrigMonTE::m_clid
private

Definition at line 95 of file TrigMonTE.h.

◆ m_encoded

uint32_t TrigMonTE::m_encoded {}
private

Definition at line 90 of file TrigMonTE.h.

90{}; // Encoded word (see below)

◆ m_id

uint32_t TrigMonTE::m_id {}
private

Definition at line 89 of file TrigMonTE.h.

89{}; // Trigger element id

◆ m_parent

std::vector<uint16_t> TrigMonTE::m_parent
private

Definition at line 93 of file TrigMonTE.h.

◆ m_roi

std::vector<uint8_t> TrigMonTE::m_roi
private

Definition at line 94 of file TrigMonTE.h.

◆ m_var_key

std::vector<uint16_t> TrigMonTE::m_var_key
private

Definition at line 97 of file TrigMonTE.h.

◆ m_var_val

std::vector<float> TrigMonTE::m_var_val
private

Definition at line 98 of file TrigMonTE.h.


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