ATLAS Offline Software
Loading...
Searching...
No Matches
TrigMonROBData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGMON_ROBDATA_H
6#define TRIGMON_ROBDATA_H
7
8/*
9 @author Rustem Ospanov
10 @date July 2009
11
12 @brief Summary of ROB data unit.
13 This is class can have two versions:
14 a) summary of multiple ROBDataStruct structures,
15 where rob ids with same status and history are added together;
16 b) rob ids are erased to reduce memory footprint.
17*/
18
19// Framework
21
22// C/C++
23#include <stdint.h>
24#include <iostream>
25
27{
28 public:
29
30 enum History {
31 kUNCLASSIFIED = 0, // ROB was requested but never arrived at processor. History unknown.
32 kRETRIEVED = 1, // ROB was retrieved from ROS by DataCollector
33 kCACHED = 2, // ROB was found already in the internal cache of the ROBDataProviderSvc
34 kIGNORED = 4, // ROB was on the "ignore" list and therefore not retrieved
35 kDISABLED = 8 // ROB was disabled in OKS and therefore not retrieved
36 };
37 enum Status {
38 kUNKNOWN = 0x0, // ROB status was unknown (default)
39 kPREFETCH = 0x40, // ROB was prefetched
40 kOK = 0x80 // ROB is StatusOk
41 };
42
44 TrigMonROBData(uint32_t rob_id, uint32_t rob_size);
46
47 void setHistory(History hist);
48 void setStatusOK();
49 void setStatusPREFETCH();
50
51 bool isUnclassified() const { return getHistory() == kUNCLASSIFIED; }
52 bool isCached() const { return getHistory() == kCACHED; }
53 bool isRetrieved() const { return getHistory() == kRETRIEVED; }
54 bool isIgnored() const { return getHistory() == kIGNORED; }
55 bool isDisabled() const { return getHistory() == kDISABLED; }
56 bool isStatusOk() const;
57 bool isStatusPrefetched() const;
58
59 uint32_t getROBId() const { return m_rob_id; }
60 uint32_t getROBSize() const;
61 uint32_t getEncodedState() const;
62 History getHistory() const;
63 Status getStatus() const;
64
65 void print(std::ostream &os = std::cout) const;
66
67 private:
70
71 uint32_t m_rob_id; // ROB source id
72 uint32_t m_word; // Size, history enum and status enum
73};
74
75std::string str(const TrigMonROBData &);
76
77//
78// m_word stores history and state enums
79//
80// 8 low bits: sssshhhh
81// history [h] 4 low bits
82// state [s] 4 top bits
83// 24 top bits: rob data size
84//
85
86namespace Trig
87{
88 TrigMonROBData::History getROBHistory(unsigned int val);
89 TrigMonROBData::Status getROBStatus (unsigned int val);
90
93}
94
95CLASS_DEF( TrigMonROBData , 174340367 , 1 )
96
97#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
bool isStatusOk() const
bool isRetrieved() const
bool isUnclassified() const
friend class TrigMonROBDataCnv_p2
bool isDisabled() const
void print(std::ostream &os=std::cout) const
bool isStatusPrefetched() const
uint32_t getROBSize() const
bool isIgnored() const
void setHistory(History hist)
friend class TrigMonROBDataCnv_p1
Status getStatus() const
bool isCached() const
uint32_t getEncodedState() const
uint32_t getROBId() const
History getHistory() const
The common trigger namespace for trigger analysis tools.
TrigMonROBData::Status getROBStatus(unsigned int val)
TrigMonROBData::History getROBHistory(unsigned int val)
std::string AsStringROBStatus(TrigMonROBData::Status stat)
std::string AsStringROBHistory(TrigMonROBData::History hist)