ATLAS Offline Software
Public Member Functions | Public Attributes | Friends | List of all members
robmonitor::ROBDataMonitorStruct Class Reference

The structure which is used to monitor the ROB data request in L2 It is created for every addROBData call. More...

#include <ROBDataMonitor.h>

Collaboration diagram for robmonitor::ROBDataMonitorStruct:

Public Member Functions

 ROBDataMonitorStruct ()
 default constructor More...
 
 ROBDataMonitorStruct (const uint32_t, const std::string &)
 constructor More...
 
 ROBDataMonitorStruct (const uint32_t, const std::vector< uint32_t > &, const std::string &)
 constructor More...
 
 ROBDataMonitorStruct (const ROBDataMonitorStruct &)=default
 
 ROBDataMonitorStruct (ROBDataMonitorStruct &&) noexcept=default
 
ROBDataMonitorStructoperator= (const ROBDataMonitorStruct &)=default
 
ROBDataMonitorStructoperator= (ROBDataMonitorStruct &&) noexcept=default
 
unsigned allROBs () const
 number of ROBs in structure More...
 
unsigned unclassifiedROBs () const
 number of unclassified ROBs in structure More...
 
unsigned HLTcachedROBs () const
 number of ROBDataProviderSvc cached ROBs in structure More...
 
unsigned DCMcachedROBs () const
 number of DCM cached ROBs in structure More...
 
unsigned retrievedROBs () const
 number of retrieved ROBs in structure More...
 
unsigned ignoredROBs () const
 number of ignored ROBs in structure More...
 
unsigned undefinedROBs () const
 number of undefined ROBs in structure More...
 
unsigned statusOkROBs () const
 number of ROBs with no status words set in structure More...
 
float elapsedTime () const
 elapsed time for ROB request in [ms] More...
 

Public Attributes

uint32_t lvl1ID
 
std::string requestor_name
 
std::map< const uint32_t, robmonitor::ROBDataStructrequested_ROBs
 
struct timeval start_time_of_ROB_request
 
struct timeval end_time_of_ROB_request
 
uint64_t start_time
 
uint64_t end_time
 

Friends

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

Detailed Description

The structure which is used to monitor the ROB data request in L2 It is created for every addROBData call.

Definition at line 81 of file ROBDataMonitor.h.

Constructor & Destructor Documentation

◆ ROBDataMonitorStruct() [1/5]

ROBDataMonitorStruct::ROBDataMonitorStruct ( )

default constructor

Definition at line 60 of file ROBDataMonitor.cxx.

61  :lvl1ID(0),
62  requestor_name("UNKNOWN"),
66 {}

◆ ROBDataMonitorStruct() [2/5]

ROBDataMonitorStruct::ROBDataMonitorStruct ( const uint32_t  l1_id,
const std::string &  req_nam = "UNKNOWN" 
)

constructor

Parameters
L1ID
requestorname

Definition at line 68 of file ROBDataMonitor.cxx.

69  :lvl1ID(l1_id),
70  requestor_name(req_nam),
74 {}

◆ ROBDataMonitorStruct() [3/5]

ROBDataMonitorStruct::ROBDataMonitorStruct ( const uint32_t  l1_id,
const std::vector< uint32_t > &  req_robs,
const std::string &  req_nam = "UNKNOWN" 
)

constructor

Parameters
L1ID
vectorof ROB Ids
requestorname

Definition at line 76 of file ROBDataMonitor.cxx.

79  :lvl1ID(l1_id),
80  requestor_name(req_nam),
83 {
84  for (uint32_t rob : req_robs) {
86  }
87 }

◆ ROBDataMonitorStruct() [4/5]

robmonitor::ROBDataMonitorStruct::ROBDataMonitorStruct ( const ROBDataMonitorStruct )
default

◆ ROBDataMonitorStruct() [5/5]

robmonitor::ROBDataMonitorStruct::ROBDataMonitorStruct ( ROBDataMonitorStruct &&  )
defaultnoexcept

Member Function Documentation

◆ allROBs()

unsigned ROBDataMonitorStruct::allROBs ( ) const

number of ROBs in structure

Definition at line 89 of file ROBDataMonitor.cxx.

89  {
90  return requested_ROBs.size();
91 }

◆ DCMcachedROBs()

unsigned ROBDataMonitorStruct::DCMcachedROBs ( ) const

number of DCM cached ROBs in structure

Definition at line 109 of file ROBDataMonitor.cxx.

109  {
110  ptrdiff_t ret=0;
111  for (const auto& p : requested_ROBs) {
112  if (p.second.isDCMCached()) ++ret;
113  }
114  return ret;
115 }

◆ elapsedTime()

float ROBDataMonitorStruct::elapsedTime ( ) const

elapsed time for ROB request in [ms]

Definition at line 149 of file ROBDataMonitor.cxx.

149  {
150  int secs = 0 ;
152  secs = end_time_of_ROB_request.tv_sec - start_time_of_ROB_request.tv_sec;
153 
154  int usecs = end_time_of_ROB_request.tv_usec - start_time_of_ROB_request.tv_usec;
155  return static_cast<float>(secs)*1000 + static_cast<float>(usecs)/1000;
156 }

◆ HLTcachedROBs()

unsigned ROBDataMonitorStruct::HLTcachedROBs ( ) const

number of ROBDataProviderSvc cached ROBs in structure

Definition at line 101 of file ROBDataMonitor.cxx.

101  {
102  ptrdiff_t ret=0;
103  for (const auto& p : requested_ROBs) {
104  if (p.second.isHLTCached()) ++ret;
105  }
106  return ret;
107 }

◆ ignoredROBs()

unsigned ROBDataMonitorStruct::ignoredROBs ( ) const

number of ignored ROBs in structure

Definition at line 125 of file ROBDataMonitor.cxx.

125  {
126  ptrdiff_t ret=0;
127  for (const auto& p : requested_ROBs) {
128  if (p.second.isIgnored()) ++ret;
129  }
130  return ret;
131 }

◆ operator=() [1/2]

ROBDataMonitorStruct& robmonitor::ROBDataMonitorStruct::operator= ( const ROBDataMonitorStruct )
default

◆ operator=() [2/2]

ROBDataMonitorStruct& robmonitor::ROBDataMonitorStruct::operator= ( ROBDataMonitorStruct &&  )
defaultnoexcept

◆ retrievedROBs()

unsigned ROBDataMonitorStruct::retrievedROBs ( ) const

number of retrieved ROBs in structure

Definition at line 117 of file ROBDataMonitor.cxx.

117  {
118  ptrdiff_t ret=0;
119  for (const auto& p : requested_ROBs) {
120  if (p.second.isRetrieved()) ++ret;
121  }
122  return ret;
123 }

◆ statusOkROBs()

unsigned ROBDataMonitorStruct::statusOkROBs ( ) const

number of ROBs with no status words set in structure

Definition at line 141 of file ROBDataMonitor.cxx.

141  {
142  ptrdiff_t ret=0;
143  for (const auto& p : requested_ROBs) {
144  if (p.second.isStatusOk()) ++ret;
145  }
146  return ret;
147 }

◆ unclassifiedROBs()

unsigned ROBDataMonitorStruct::unclassifiedROBs ( ) const

number of unclassified ROBs in structure

Definition at line 93 of file ROBDataMonitor.cxx.

93  {
94  ptrdiff_t ret=0;
95  for (const auto& p : requested_ROBs) {
96  if (p.second.isUnclassified()) ++ret;
97  }
98  return ret;
99 }

◆ undefinedROBs()

unsigned ROBDataMonitorStruct::undefinedROBs ( ) const

number of undefined ROBs in structure

Definition at line 133 of file ROBDataMonitor.cxx.

133  {
134  ptrdiff_t ret=0;
135  for (const auto& p : requested_ROBs) {
136  if (p.second.isUndefined()) ++ret;
137  }
138  return ret;
139 }

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 175 of file ROBDataMonitor.h.

175  {
176  std::string prefix(" ");
177  std::string prefix2("-> ");
178  os << "ROB Request for L1 ID = " << std::dec << rhs.lvl1ID << " (decimal), L1 ID = 0x"
179  << std::hex << rhs.lvl1ID << " (hex)" << std::dec;
180  os << "\n" << prefix << "Requestor name = " << rhs.requestor_name;
181 
182  const std::time_t s_time(rhs.start_time_of_ROB_request.tv_sec);
183  struct tm buf;
184  localtime_r(&s_time, &buf);
185  os << "\n" << prefix << "Start time of ROB request = "
186  << std::put_time(&buf, "%c")
187  << " + " << static_cast<float>(rhs.start_time_of_ROB_request.tv_usec)/1000 << " [ms]";
188 
189  const std::time_t e_time(rhs.end_time_of_ROB_request.tv_sec);
190  localtime_r(&e_time, &buf);
191  os << "\n" << prefix << "Stop time of ROB request = "
192  << std::put_time(&buf, "%c")
193  << " + " << static_cast<float>(rhs.end_time_of_ROB_request.tv_usec)/1000 << " [ms]";
194  os << "\n" << prefix << "Elapsed time for ROB request [ms] = " << rhs.elapsedTime();
195  os << "\n" << prefix << "Requested ROBs:";
196  os << "\n" << prefix << prefix2 << "All " << rhs.allROBs() ;
197  os << "\n" << prefix << prefix2 << "Unclassified " << rhs.unclassifiedROBs() ;
198  os << "\n" << prefix << prefix2 << "HLT Cached " << rhs.HLTcachedROBs() ;
199  os << "\n" << prefix << prefix2 << "DCM Cached " << rhs.DCMcachedROBs() ;
200  os << "\n" << prefix << prefix2 << "Retrieved " << rhs.retrievedROBs() ;
201  os << "\n" << prefix << prefix2 << "Ignored " << rhs.ignoredROBs() ;
202  os << "\n" << prefix << prefix2 << "Undefined " << rhs.undefinedROBs() ;
203  os << "\n" << prefix << prefix2 << "Status OK " << rhs.statusOkROBs() ;
204  for (std::map<const uint32_t,robmonitor::ROBDataStruct>::const_iterator it=rhs.requested_ROBs.begin();
205  it != rhs.requested_ROBs.end(); ++it) {
206  os << "\n" << prefix << prefix2 << (*it).second;
207  }
208  return os;
209  }

Member Data Documentation

◆ end_time

uint64_t robmonitor::ROBDataMonitorStruct::end_time

Definition at line 119 of file ROBDataMonitor.h.

◆ end_time_of_ROB_request

struct timeval robmonitor::ROBDataMonitorStruct::end_time_of_ROB_request

Definition at line 111 of file ROBDataMonitor.h.

◆ lvl1ID

uint32_t robmonitor::ROBDataMonitorStruct::lvl1ID

Definition at line 109 of file ROBDataMonitor.h.

◆ requested_ROBs

std::map<const uint32_t,robmonitor::ROBDataStruct> robmonitor::ROBDataMonitorStruct::requested_ROBs

Definition at line 111 of file ROBDataMonitor.h.

◆ requestor_name

std::string robmonitor::ROBDataMonitorStruct::requestor_name

Definition at line 110 of file ROBDataMonitor.h.

◆ start_time

uint64_t robmonitor::ROBDataMonitorStruct::start_time

Definition at line 118 of file ROBDataMonitor.h.

◆ start_time_of_ROB_request

struct timeval robmonitor::ROBDataMonitorStruct::start_time_of_ROB_request

Definition at line 111 of file ROBDataMonitor.h.


The documentation for this class was generated from the following files:
robmonitor::ROBDataMonitorStruct::retrievedROBs
unsigned retrievedROBs() const
number of retrieved ROBs in structure
Definition: ROBDataMonitor.cxx:117
robmonitor::ROBDataMonitorStruct::start_time_of_ROB_request
struct timeval start_time_of_ROB_request
Definition: ROBDataMonitor.h:114
robmonitor::ROBDataMonitorStruct::ignoredROBs
unsigned ignoredROBs() const
number of ignored ROBs in structure
Definition: ROBDataMonitor.cxx:125
robmonitor::ROBDataStruct
A structure with data about ROB properties.
Definition: ROBDataMonitor.h:39
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
skel.it
it
Definition: skel.GENtoEVGEN.py:396
robmonitor::ROBDataMonitorStruct::HLTcachedROBs
unsigned HLTcachedROBs() const
number of ROBDataProviderSvc cached ROBs in structure
Definition: ROBDataMonitor.cxx:101
robmonitor::ROBDataMonitorStruct::DCMcachedROBs
unsigned DCMcachedROBs() const
number of DCM cached ROBs in structure
Definition: ROBDataMonitor.cxx:109
robmonitor::ROBDataMonitorStruct::elapsedTime
float elapsedTime() const
elapsed time for ROB request in [ms]
Definition: ROBDataMonitor.cxx:149
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
robmonitor::ROBDataMonitorStruct::undefinedROBs
unsigned undefinedROBs() const
number of undefined ROBs in structure
Definition: ROBDataMonitor.cxx:133
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
robmonitor::ROBDataMonitorStruct::lvl1ID
uint32_t lvl1ID
Definition: ROBDataMonitor.h:109
robmonitor::ROBDataMonitorStruct::statusOkROBs
unsigned statusOkROBs() const
number of ROBs with no status words set in structure
Definition: ROBDataMonitor.cxx:141
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
robmonitor::ROBDataMonitorStruct::requestor_name
std::string requestor_name
Definition: ROBDataMonitor.h:110
robmonitor::ROBDataMonitorStruct::requested_ROBs
std::map< const uint32_t, robmonitor::ROBDataStruct > requested_ROBs
Definition: ROBDataMonitor.h:111
robmonitor::ROBDataMonitorStruct::unclassifiedROBs
unsigned unclassifiedROBs() const
number of unclassified ROBs in structure
Definition: ROBDataMonitor.cxx:93
robmonitor::ROBDataMonitorStruct::end_time_of_ROB_request
struct timeval end_time_of_ROB_request
Definition: ROBDataMonitor.h:115
robmonitor::ROBDataMonitorStruct::allROBs
unsigned allROBs() const
number of ROBs in structure
Definition: ROBDataMonitor.cxx:89