ATLAS Offline Software
Namespaces | Functions | Variables
TrigMonTE.cxx File Reference
#include <cassert>
#include <iostream>
#include <sstream>
#include <set>
#include "TrigMonitoringEvent/TrigMonTE.h"
#include "AthenaKernel/errorcheck.h"
Include dependency graph for TrigMonTE.cxx:

Go to the source code of this file.

Namespaces

 SeqBits
 

Functions

std::string str (const TrigMonTE &o)
 
bool Equal (const TrigMonTE &lhs, const TrigMonTE &rhs)
 

Variables

const uint32_t SeqBits::maskType = 0x00c00000
 
const uint32_t SeqBits::shiftType = 22
 

Function Documentation

◆ Equal()

bool Equal ( const TrigMonTE lhs,
const TrigMonTE rhs 
)

Definition at line 152 of file TrigMonTE.cxx.

153 {
154  //
155  // Compare TriggerElements by id and roi parents
156  //
157 
158  // 1st: compare types
159  if(lhs.getType() != rhs.getType()) return false;
160 
161  // 2nd: initial node?
162  if(lhs.getType() == TrigMonTE::kINIT) return true;
163 
164  // 3rd: RoI or ELEM node?
165  if(lhs.getId() != rhs.getId()) return false;
166 
167  const std::set<uint8_t> lhs_set(lhs.getRoiId().begin(), lhs.getRoiId().end());
168  const std::set<uint8_t> rhs_set(rhs.getRoiId().begin(), rhs.getRoiId().end());
169 
170  return lhs_set == rhs_set;
171 }

◆ str()

std::string str ( const TrigMonTE o)

Definition at line 124 of file TrigMonTE.cxx.

125 {
126  std::stringstream s;
127 
128  s << "TrigMonTE id=" << o.getId() << " status=";
129  if (o.getType() == TrigMonTE::kINIT) s << "init";
130  else if(o.getType() == TrigMonTE::kROI) s << "roi ";
131  else if(o.getType() == TrigMonTE::kL1TH) s << "L1th";
132  else if(o.getType() == TrigMonTE::kELEM) s << "elem";
133  else s << "bad ";
134  s << " index=" << o.getIndex();
135 
136  s << std::endl << " children " << o.getChildIndex().size() << ": ";
137  for(unsigned int i = 0; i < o.getChildIndex().size(); ++i) s << o.getChildIndex()[i] << " ";
138  s << std::endl;
139 
140  s << std::endl << " parents " << o.getParentIndex().size() << ": ";
141  for(unsigned int i = 0; i < o.getParentIndex().size(); ++i) s << o.getParentIndex()[i] << " ";
142  s << std::endl;
143 
144  s << std::endl << " features " << o.getClid().size() << ": ";
145  for(unsigned int i = 0; i < o.getClid().size(); ++i) s << o.getClid()[i] << " ";
146  s << std::endl;
147 
148  return s.str();
149 }
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigMonTE::getParentIndex
const std::vector< uint16_t > & getParentIndex() const
Definition: TrigMonTE.h:76
TrigMonTE::kINIT
@ kINIT
Definition: TrigMonTE.h:33
TrigMonTE::getClid
const std::vector< uint32_t > & getClid() const
Definition: TrigMonTE.h:79
TrigMonTE::getType
Type getType() const
Definition: TrigMonTE.cxx:67
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigMonTE::getChildIndex
const std::vector< uint16_t > & getChildIndex() const
Definition: TrigMonTE.h:75
TrigMonTE::kELEM
@ kELEM
Definition: TrigMonTE.h:32
TrigMonTE::getIndex
uint16_t getIndex() const
Definition: TrigMonTE.cxx:87
TrigMonTE::getId
uint32_t getId() const
Definition: TrigMonTE.h:64
TrigMonTE::kROI
@ kROI
Definition: TrigMonTE.h:34
TrigMonTE::getRoiId
const std::vector< uint8_t > & getRoiId() const
Definition: TrigMonTE.h:78
TrigMonTE::kL1TH
@ kL1TH
Definition: TrigMonTE.h:35