ATLAS Offline Software
Loading...
Searching...
No Matches
ROBDataMonitor.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7
8#ifndef ROBDATAMONITOR_H
9#define ROBDATAMONITOR_H
10
11#include "eformat/SourceIdentifier.h"
12#include <iostream>
13#include <string>
14#include <map>
15
18
19namespace robmonitor {
20
24 enum ROBHistory {
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 };
33
38 public:
39
41 ROBDataStruct() = default;
42
46 ROBDataStruct(const uint32_t);
47
48 // data variables
49 uint32_t rob_id{0}; // rob source id
50 uint32_t rob_size{0}; // size of rob in words
52 uint32_t rob_status_word{0}; // last status word in the ROB header
53
54
55 // Accessor functions
57 bool isUnclassified() const;
59 bool isHLTCached() const;
61 bool isDCMCached() const;
63 bool isRetrieved() const;
65 bool isIgnored() const;
67 bool isUndefined() const;
69 bool isStatusOk() const;
70
71 // Extraction operator
72 friend std::ostream& operator<<(std::ostream& os, const ROBDataStruct& rhs);
73 };
74
80 public:
81
84
89 ROBDataMonitorStruct(const uint32_t, const std::string&);
90
96 ROBDataMonitorStruct(const uint32_t, const std::vector<uint32_t>&, const std::string&);
97
99
101
103
104 ROBDataMonitorStruct& operator=(ROBDataMonitorStruct&&) noexcept = default;
105
106 // data variables
107 uint32_t lvl1ID{0};
108 std::string requestor_name{"UNKNOWN"};
109 std::map<const uint32_t,robmonitor::ROBDataStruct> requested_ROBs;
110
111 // Run3 TrigTimeStamp
112 uint64_t start_time{};
113 uint64_t end_time{};
114
115 // Accessor functions to ROB history summaries
117 unsigned allROBs() const;
119 unsigned unclassifiedROBs() const;
121 unsigned HLTcachedROBs() const;
123 unsigned DCMcachedROBs() const;
125 unsigned retrievedROBs() const;
127 unsigned ignoredROBs() const;
129 unsigned undefinedROBs() const;
131 unsigned statusOkROBs() const;
132
134 float elapsedTime() const;
135
136 // Extraction operator
137 friend std::ostream& operator<<(std::ostream& os, const ROBDataMonitorStruct& rhs);
138 };
139
140 // Extraction operators
141 std::ostream& operator<<(std::ostream& os, const ROBDataStruct& rhs);
142 std::ostream& operator<<(std::ostream& os, const ROBDataMonitorStruct& rhs);
143
144} // end namespace robmonitor
145
147
148CLASS_DEF( ROBDataMonitorCollection , 1303465505 , 1 )
149
150
151#endif /* ROBDATAMONITOR_H */
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
An STL vector of pointers that by default owns its pointed-to elements.
DataVector< robmonitor::ROBDataMonitorStruct > ROBDataMonitorCollection
Derived DataVector<T>.
Definition DataVector.h:795
The structure which is used to monitor the ROB data request in L2 It is created for every addROBData ...
uint64_t start_time
map of ROBs requested
unsigned retrievedROBs() const
number of retrieved ROBs in structure
ROBDataMonitorStruct(ROBDataMonitorStruct &&) noexcept=default
unsigned ignoredROBs() const
number of ignored ROBs in structure
float elapsedTime() const
elapsed time for ROB request in [ms]
friend std::ostream & operator<<(std::ostream &os, const ROBDataMonitorStruct &rhs)
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
ROBDataMonitorStruct()=default
default constructor
unsigned unclassifiedROBs() const
number of unclassified ROBs in structure
uint64_t end_time
start time of ROB request (microsec since epoch)
ROBDataMonitorStruct(const ROBDataMonitorStruct &)=default
unsigned DCMcachedROBs() const
number of DCM cached ROBs in structure
A structure with data about ROB properties.
ROBDataStruct()=default
default constructor
bool isUndefined() const
ROB was not enabled.
bool isIgnored() const
ROB was ignored.
bool isHLTCached() const
ROB was found in ROBDataProviderSvc cache.
bool isStatusOk() const
ROB has no status words set.
bool isUnclassified() const
ROB is unclassified.
bool isRetrieved() const
ROB was retrieved over network.
bool isDCMCached() const
ROB was found in DCM cache.
robmonitor::ROBHistory rob_history
friend std::ostream & operator<<(std::ostream &os, const ROBDataStruct &rhs)
std::ostream & operator<<(std::ostream &os, const ROBDataStruct &rhs)
ROBHistory
A structure with data about ROB properties.