ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
TrigMonChain Class Reference

Summary of chain decisions. More...

#include <TrigMonChain.h>

Collaboration diagram for TrigMonChain:

Public Types

enum  Decision {
  kReset = 0x0, kPassed = 0x010000, kPassedRaw = 0x020000, kPassedThrough = 0x040000,
  kResurrected = 0x080000, kPrescaled = 0x100000, kL1AfterVeto = 0x200000, kL1BeforePrescale = 0x400000,
  kL1AfterPrescale = 0x800000, kExpressStream = 0x1000000
}
 

Public Member Functions

 TrigMonChain (unsigned int encoded=0)
 
 TrigMonChain (unsigned int level, unsigned int counter)
 
 TrigMonChain (const std::string &level, unsigned int counter)
 
 ~TrigMonChain ()
 
void addDecision (Decision value)
 
void addTimer (float timer)
 
void addVar (const TrigMonVar &var)
 
uint16_t getCounter () const
 
uint16_t getLevel () const
 
uint16_t getEncodedId () const
 
uint32_t getEncoded () const
 
float getTimer () const
 
bool isPassed (Decision value=kPassed) const
 
const std::vector< TrigMonVargetVar () const
 
const std::vector< uint16_t > & getVarKey () const
 
const std::vector< float > & getVarVal () const
 
void print (std::ostream &os=std::cout) const
 

Private Attributes

uint32_t m_encoded
 
std::vector< uint16_t > m_var_key
 
std::vector< float > m_var_val
 

Detailed Description

Summary of chain decisions.

Author
Rustem Ospanov
Date
July 2009

Definition at line 25 of file TrigMonChain.h.

Member Enumeration Documentation

◆ Decision

Enumerator
kReset 
kPassed 
kPassedRaw 
kPassedThrough 
kResurrected 
kPrescaled 
kL1AfterVeto 
kL1BeforePrescale 
kL1AfterPrescale 
kExpressStream 

Definition at line 29 of file TrigMonChain.h.

29  {
30  kReset = 0x0,
31  kPassed = 0x010000,
32  kPassedRaw = 0x020000,
33  kPassedThrough = 0x040000,
34  kResurrected = 0x080000,
35  kPrescaled = 0x100000,
36  kL1AfterVeto = 0x200000,
37  kL1BeforePrescale = 0x400000,
38  kL1AfterPrescale = 0x800000,
39  kExpressStream = 0x1000000
40  };

Constructor & Destructor Documentation

◆ TrigMonChain() [1/3]

TrigMonChain::TrigMonChain ( unsigned int  encoded = 0)

Definition at line 18 of file TrigMonChain.cxx.

19  :m_encoded(encoded)
20 {
21 }

◆ TrigMonChain() [2/3]

TrigMonChain::TrigMonChain ( unsigned int  level,
unsigned int  counter 
)

Definition at line 24 of file TrigMonChain.cxx.

26 {
27 }

◆ TrigMonChain() [3/3]

TrigMonChain::TrigMonChain ( const std::string &  level,
unsigned int  counter 
)

Definition at line 30 of file TrigMonChain.cxx.

32 {
33 }

◆ ~TrigMonChain()

TrigMonChain::~TrigMonChain ( )
inline

Definition at line 45 of file TrigMonChain.h.

45 {}

Member Function Documentation

◆ addDecision()

void TrigMonChain::addDecision ( Decision  value)

Definition at line 48 of file TrigMonChain.cxx.

49 {
50  //
51  // set trigger decision bits
52  //
53  if(value == kReset) {
55  }
56  else {
57  m_encoded |= value;
58  }
59 }

◆ addTimer()

void TrigMonChain::addTimer ( float  timer)

Definition at line 83 of file TrigMonChain.cxx.

84 {
85  //
86  // Add sequence timer at key = 0
87  //
88  m_var_key.push_back(0);
89  m_var_val.push_back(timer);
90 }

◆ addVar()

void TrigMonChain::addVar ( const TrigMonVar var)

Definition at line 62 of file TrigMonChain.cxx.

63 {
64  //
65  // Store variable as int and float, reserve 0-9 keys
66  //
67  if(var.getKey() > 9) {
68  m_var_key.push_back(var.getKey());
69  m_var_val.push_back(var.getData());
70  }
71 }

◆ getCounter()

uint16_t TrigMonChain::getCounter ( ) const

Definition at line 36 of file TrigMonChain.cxx.

37 {
39 }

◆ getEncoded()

uint32_t TrigMonChain::getEncoded ( ) const
inline

Definition at line 54 of file TrigMonChain.h.

54 { return m_encoded; }

◆ getEncodedId()

uint16_t TrigMonChain::getEncodedId ( ) const

Definition at line 74 of file TrigMonChain.cxx.

75 {
76  //
77  // Return low 16 bits
78  //
80 }

◆ getLevel()

uint16_t TrigMonChain::getLevel ( ) const

Definition at line 42 of file TrigMonChain.cxx.

43 {
45 }

◆ getTimer()

float TrigMonChain::getTimer ( ) const

Definition at line 93 of file TrigMonChain.cxx.

94 {
95  //
96  // Get sequence timer which is stored at key=0
97  //
98 
99  if(m_var_key.size() == m_var_val.size()) {
100  //
101  // Look for key == 0
102  //
103  for(unsigned int i = 0; i < m_var_key.size(); ++i) {
104  if(m_var_key[i] == 0) return m_var_val[i];
105  }
106  }
107 
108  return 0.0;
109 }

◆ getVar()

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

Definition at line 121 of file TrigMonChain.cxx.

122 {
123  //
124  // Build variables on a fly and return vector by value
125  //
126  std::vector<TrigMonVar> var;
127 
128  if(m_var_key.size() == m_var_val.size()) {
129  //
130  // Iterate over keys abd values
131  //
132  var.reserve(m_var_key.size());
133 
134  for(unsigned int i = 0; i < m_var_key.size(); ++i) {
135  var.push_back(TrigMonVar(m_var_key[i], m_var_val[i]));
136  }
137  }
138 
139  return var;
140 }

◆ getVarKey()

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

Definition at line 61 of file TrigMonChain.h.

61 { return m_var_key; }

◆ getVarVal()

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

Definition at line 62 of file TrigMonChain.h.

62 { return m_var_val; }

◆ isPassed()

bool TrigMonChain::isPassed ( Decision  value = kPassed) const

Definition at line 112 of file TrigMonChain.cxx.

113 {
114  //
115  // Check trigger decision value
116  //
117  return m_encoded & value;
118 }

◆ print()

void TrigMonChain::print ( std::ostream &  os = std::cout) const

Definition at line 143 of file TrigMonChain.cxx.

144 {
145  os << str(*this) << "\n";
146 }

Member Data Documentation

◆ m_encoded

uint32_t TrigMonChain::m_encoded
private

Definition at line 68 of file TrigMonChain.h.

◆ m_var_key

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

Definition at line 69 of file TrigMonChain.h.

◆ m_var_val

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

Definition at line 70 of file TrigMonChain.h.


The documentation for this class was generated from the following files:
beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
TrigMonChain::kPassed
@ kPassed
Definition: TrigMonChain.h:31
TrigMonChain::m_var_key
std::vector< uint16_t > m_var_key
Definition: TrigMonChain.h:69
TrigMonChain::kL1AfterPrescale
@ kL1AfterPrescale
Definition: TrigMonChain.h:38
TrigMonChain::kPassedThrough
@ kPassedThrough
Definition: TrigMonChain.h:33
TrigMonChain::getEncodedId
uint16_t getEncodedId() const
Definition: TrigMonChain.cxx:74
athena.value
value
Definition: athena.py:124
TrigMonChain::kL1AfterVeto
@ kL1AfterVeto
Definition: TrigMonChain.h:36
TrigMonChain::kPrescaled
@ kPrescaled
Definition: TrigMonChain.h:35
python.utils.AtlRunQueryTimer.timer
def timer(name, disabled=False)
Definition: AtlRunQueryTimer.py:86
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
ChainBits::maskLow16
const uint32_t maskLow16
Definition: TrigMonChain.cxx:13
str
std::string str(const TrigMonChain &o)
Definition: TrigMonChain.cxx:149
TrigMonChain::kReset
@ kReset
Definition: TrigMonChain.h:30
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigMonChain::kL1BeforePrescale
@ kL1BeforePrescale
Definition: TrigMonChain.h:37
TrigMonVar
Definition: TrigMonVar.h:59
Trig::getCounterFromEncodedId
uint16_t getCounterFromEncodedId(uint16_t encoded)
Definition: TrigConfChain.h:158
TrigMonChain::kResurrected
@ kResurrected
Definition: TrigMonChain.h:34
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TrigMonChain::kExpressStream
@ kExpressStream
Definition: TrigMonChain.h:39
Trig::getLevelFromEncodedId
uint16_t getLevelFromEncodedId(uint16_t encoded)
Definition: TrigConfChain.h:161
TrigMonChain::kPassedRaw
@ kPassedRaw
Definition: TrigMonChain.h:32
test_pyathena.counter
counter
Definition: test_pyathena.py:15
Trig::getEncodedId
uint16_t getEncodedId(int level, int counter)
Definition: TrigConfChain.cxx:15
TrigMonChain::m_var_val
std::vector< float > m_var_val
Definition: TrigMonChain.h:70
TrigMonChain::m_encoded
uint32_t m_encoded
Definition: TrigMonChain.h:68