ATLAS Offline Software
Classes | Enumerations | Functions
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  localtime_r(&s_time, &buf);
170  os << "\n" << prefix << "Start time of ROB request = "
171  << std::put_time(&buf, "%c")
172  << " + " << (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  localtime_r(&e_time, &buf);
176  os << "\n" << prefix << "Stop time of ROB request = "
177  << std::put_time(&buf, "%c")
178  << " + " << (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 }

◆ 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::ROBDataMonitorStruct::retrievedROBs
unsigned retrievedROBs() const
number of retrieved ROBs in structure
Definition: ROBDataMonitor.cxx:120
robmonitor::UNDEFINED
@ UNDEFINED
Definition: ROBDataMonitor.h:30
robmonitor::ROBDataMonitorStruct::ignoredROBs
unsigned ignoredROBs() const
number of ignored ROBs in structure
Definition: ROBDataMonitor.cxx:128
robmonitor::DCM_CACHED
@ DCM_CACHED
Definition: ROBDataMonitor.h:28
robmonitor::ROBDataMonitorStruct::HLTcachedROBs
unsigned HLTcachedROBs() const
number of ROBDataProviderSvc cached ROBs in structure
Definition: ROBDataMonitor.cxx:104
robmonitor::NUM_ROBHIST_CODES
@ NUM_ROBHIST_CODES
Definition: ROBDataMonitor.h:31
robmonitor::ROBDataStruct::rob_size
uint32_t rob_size
Definition: ROBDataMonitor.h:50
robmonitor::ROBDataMonitorStruct::DCMcachedROBs
unsigned DCMcachedROBs() const
number of DCM cached ROBs in structure
Definition: ROBDataMonitor.cxx:112
robmonitor::ROBDataMonitorStruct::elapsedTime
float elapsedTime() const
elapsed time for ROB request in [ms]
Definition: ROBDataMonitor.cxx:152
robmonitor::ROBDataMonitorStruct::end_time
uint64_t end_time
start time of ROB request (microsec since epoch)
Definition: ROBDataMonitor.h:113
robmonitor::IGNORED
@ IGNORED
Definition: ROBDataMonitor.h:29
UNDEFINED
@ UNDEFINED
Definition: sTGCenumeration.h:18
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
robmonitor::ROBDataStruct::rob_id
uint32_t rob_id
Definition: ROBDataMonitor.h:49
robmonitor::ROBDataMonitorStruct::undefinedROBs
unsigned undefinedROBs() const
number of undefined ROBs in structure
Definition: ROBDataMonitor.cxx:136
robmonitor::ROBDataStruct::rob_status_word
uint32_t rob_status_word
Definition: ROBDataMonitor.h:52
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
robmonitor::ROBDataMonitorStruct::lvl1ID
uint32_t lvl1ID
Definition: ROBDataMonitor.h:107
robmonitor::ROBDataStruct::rob_history
robmonitor::ROBHistory rob_history
Definition: ROBDataMonitor.h:51
robmonitor::ROBDataMonitorStruct::statusOkROBs
unsigned statusOkROBs() const
number of ROBs with no status words set in structure
Definition: ROBDataMonitor.cxx:144
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
robmonitor::ROBDataMonitorStruct::start_time
uint64_t start_time
map of ROBs requested
Definition: ROBDataMonitor.h:112
robmonitor::ROBDataMonitorStruct::requestor_name
std::string requestor_name
current L1 ID from L1 ROBs
Definition: ROBDataMonitor.h:108
robmonitor::RETRIEVED
@ RETRIEVED
Definition: ROBDataMonitor.h:26
robmonitor::HLT_CACHED
@ HLT_CACHED
Definition: ROBDataMonitor.h:27
robmonitor::ROBDataMonitorStruct::requested_ROBs
std::map< const uint32_t, robmonitor::ROBDataStruct > requested_ROBs
name of requesting algorithm
Definition: ROBDataMonitor.h:109
robmonitor::ROBDataMonitorStruct::unclassifiedROBs
unsigned unclassifiedROBs() const
number of unclassified ROBs in structure
Definition: ROBDataMonitor.cxx:96
robmonitor::UNCLASSIFIED
@ UNCLASSIFIED
Definition: ROBDataMonitor.h:25
robmonitor::ROBDataMonitorStruct::allROBs
unsigned allROBs() const
stop time of ROB request (microsec since epoch)
Definition: ROBDataMonitor.cxx:92