ATLAS Offline Software
Loading...
Searching...
No Matches
robmonitor Namespace Reference

Classes

class  ROBDataMonitorStruct
 The structure which is used to monitor the ROB data request in L2 It is created for every addROBData call. More...
class  ROBDataStruct
 A structure with data about ROB properties. More...

Enumerations

enum  ROBHistory {
  UNCLASSIFIED = 0 , RETRIEVED = 1 , HLT_CACHED = 2 , DCM_CACHED = 4 ,
  IGNORED = 8 , UNDEFINED = 16 , NUM_ROBHIST_CODES = 6
}
 A structure with data about ROB properties. More...

Functions

std::ostream & operator<< (std::ostream &os, const ROBDataStruct &rhs)
std::ostream & operator<< (std::ostream &os, const ROBDataMonitorStruct &rhs)

Enumeration Type Documentation

◆ ROBHistory

A structure with data about ROB properties.

Enumerator
UNCLASSIFIED 
RETRIEVED 
HLT_CACHED 
DCM_CACHED 
IGNORED 
UNDEFINED 
NUM_ROBHIST_CODES 

Definition at line 24 of file ROBDataMonitor.h.

24 {
25 UNCLASSIFIED = 0, // ROB was requested but never arrived at processor. History unknown.
26 RETRIEVED = 1, // ROB was retrieved from ROS by DataCollector
27 HLT_CACHED = 2, // ROB was found already in the internal cache of the ROBDataProviderSvc
28 DCM_CACHED = 4, // ROB was found already in the internal cache of the DCM
29 IGNORED = 8, // ROB was on the "ignore" list and therefore not retrieved
30 UNDEFINED = 16, // ROB was not on the "enabled" list, should not happen
31 NUM_ROBHIST_CODES = 6 // number of different history codes
32 };

Function Documentation

◆ operator<<() [1/2]

std::ostream & robmonitor::operator<< ( std::ostream & os,
const ROBDataMonitorStruct & rhs )

Definition at line 160 of file ROBDataMonitor.cxx.

160 {
161 const std::string prefix(" ");
162 const std::string prefix2("-> ");
163 os << "ROB Request for L1 ID = " << std::dec << rhs.lvl1ID << " (decimal), L1 ID = 0x"
164 << std::hex << rhs.lvl1ID << " (hex)" << std::dec;
165 os << "\n" << prefix << "Requestor name = " << rhs.requestor_name;
166
167 const std::time_t s_time(rhs.start_time / static_cast<int>(1e6));
168 struct tm buf;
169 gmtime_r(&s_time, &buf);
170 os << "\n" << prefix << "Start time of ROB request = "
171 << std::put_time(&buf, "%c")
172 << " UTC + " << (rhs.start_time % static_cast<int>(1e6)) / 1000.0f << " [ms]";
173
174 const std::time_t e_time(rhs.end_time / static_cast<int>(1e6));
175 gmtime_r(&e_time, &buf);
176 os << "\n" << prefix << "Stop time of ROB request = "
177 << std::put_time(&buf, "%c")
178 << " UTC + " << (rhs.end_time % static_cast<int>(1e6)) / 1000.0f << " [ms]";
179 os << "\n" << prefix << "Elapsed time for ROB request [ms] = " << rhs.elapsedTime();
180 os << "\n" << prefix << "Requested ROBs:";
181 os << "\n" << prefix << prefix2 << "All " << rhs.allROBs() ;
182 os << "\n" << prefix << prefix2 << "Unclassified " << rhs.unclassifiedROBs() ;
183 os << "\n" << prefix << prefix2 << "HLT Cached " << rhs.HLTcachedROBs() ;
184 os << "\n" << prefix << prefix2 << "DCM Cached " << rhs.DCMcachedROBs() ;
185 os << "\n" << prefix << prefix2 << "Retrieved " << rhs.retrievedROBs() ;
186 os << "\n" << prefix << prefix2 << "Ignored " << rhs.ignoredROBs() ;
187 os << "\n" << prefix << prefix2 << "Undefined " << rhs.undefinedROBs() ;
188 os << "\n" << prefix << prefix2 << "Status OK " << rhs.statusOkROBs() ;
189 for (const auto& [id, rob] : rhs.requested_ROBs ) {
190 os << "\n" << prefix << prefix2 << rob;
191 }
192 return os;
193}
uint64_t start_time
map of ROBs requested
unsigned retrievedROBs() const
number of retrieved ROBs in structure
unsigned ignoredROBs() const
number of ignored ROBs in structure
float elapsedTime() const
elapsed time for ROB request in [ms]
unsigned HLTcachedROBs() const
number of ROBDataProviderSvc cached ROBs in structure
unsigned undefinedROBs() const
number of undefined ROBs in structure
std::map< const uint32_t, robmonitor::ROBDataStruct > requested_ROBs
name of requesting algorithm
unsigned statusOkROBs() const
number of ROBs with no status words set in structure
unsigned allROBs() const
stop time of ROB request (microsec since epoch)
std::string requestor_name
current L1 ID from L1 ROBs
unsigned unclassifiedROBs() const
number of unclassified ROBs in structure
uint64_t end_time
start time of ROB request (microsec since epoch)
unsigned DCMcachedROBs() const
number of DCM cached ROBs in structure

◆ operator<<() [2/2]

std::ostream & robmonitor::operator<< ( std::ostream & os,
const ROBDataStruct & rhs )

Definition at line 46 of file ROBDataMonitor.cxx.

46 {
47 os << "[SourceID,Size(words),History,(Status words)]=["
48 << std::hex << std::setfill( '0' ) << "0x" << std::setw(6) << rhs.rob_id
49 << std::dec << std::setfill(' ')
50 << "," << std::setw(8) << rhs.rob_size;
51 os << "," << std::setw(12);
53 os << "UNCLASSIFIED";
54 } else if (rhs.rob_history == robmonitor::RETRIEVED) {
55 os << "RETRIEVED";
56 } else if (rhs.rob_history == robmonitor::HLT_CACHED) {
57 os << "HLT_CACHED";
58 } else if (rhs.rob_history == robmonitor::DCM_CACHED) {
59 os << "DCM_CACHED";
60 }else if (rhs.rob_history == robmonitor::IGNORED) {
61 os << "IGNORED";
62 } else if (rhs.rob_history == robmonitor::UNDEFINED) {
63 os << "UNDEFINED";
64 } else {
65 os << "invalid code";
66 }
67 os << ",(";
68 os << std::hex << std::setfill( '0' ) << "0x" << std::setw(8) << rhs.rob_status_word;
69 os << ")]";
70 return os;
71}
robmonitor::ROBHistory rob_history