31 if (!dduTrailer.
check()) {
53 int trl_word_count = 0;
58 if (
getDDUHisto(h::DDU_WORD_COUNT, dduID, mo)) mo->
Fill(trl_word_count );
62 if (trl_word_count > 0) {
64 mo->
Fill(dduID, log10((
double)trl_word_count));
68 if (
getEMUHisto(h::EMU_ALL_DDUS_AVERAGE_EVENT_SIZE, mo)) {
69 mo->
Fill(dduID, trl_word_count);
84 int L1ANumber_previous_event =
L1ANumbers[dduID];
88 int L1A_inc =
L1ANumber - L1ANumber_previous_event;
91 if ( L1A_inc < 0 ) L1A_inc = 0xFFFFFF + L1A_inc;
96 if (
getEMUHisto(h::EMU_ALL_DDUS_L1A_INCREMENT, mo)) {
97 if (L1A_inc > 100000){ L1A_inc = 19;}
98 else if (L1A_inc > 30000) { L1A_inc = 18;}
99 else if (L1A_inc > 10000) { L1A_inc = 17;}
100 else if (L1A_inc > 3000) { L1A_inc = 16;}
101 else if (L1A_inc > 1000) { L1A_inc = 15;}
102 else if (L1A_inc > 300) { L1A_inc = 14;}
103 else if (L1A_inc > 100) { L1A_inc = 13;}
104 else if (L1A_inc > 30) { L1A_inc = 12;}
105 else if (L1A_inc > 10) { L1A_inc = 11;}
106 mo->
Fill(dduID, L1A_inc);
111 int dmb_dav_header = 0;
112 int dmb_dav_header_cnt = 0;
114 int ddu_connected_inputs= 0;
115 int ddu_connected_inputs_cnt = 0;
117 int csc_error_state = 0;
118 int csc_warning_state = 0;
121 int dmb_active_header = 0;
123 dmb_dav_header = dduHeader.
dmb_dav();
124 dmb_active_header = (int)(dduHeader.
ncsc() & 0xF);
125 csc_error_state = dduTrailer.
dmb_full() & 0x7FFF;
126 csc_warning_state = dduTrailer.
dmb_warn() & 0x7FFF;
127 ddu_connected_inputs = dduHeader.
live_cscs();
133 for (
int i = 0;
i < 15; ++
i) {
134 if ((dmb_dav_header >>
i) & 0x1) {
135 dmb_dav_header_cnt++;
136 if (
getDDUHisto(h::DDU_DMB_DAV_HEADER_OCCUPANCY_RATE, dduID, mo)) {
139 if (
getDDUHisto(h::DDU_DMB_DAV_HEADER_OCCUPANCY, dduID, mo))
142 if (
getEMUHisto(h::EMU_ALL_DDUS_INPUTS_WITH_DATA, mo)) {
147 if( (ddu_connected_inputs >>
i) & 0x1 ){
148 ddu_connected_inputs_cnt++;
149 if (
getDDUHisto(h::DDU_DMB_CONNECTED_INPUTS_RATE, dduID, mo)) {
152 if (
getDDUHisto(h::DDU_DMB_CONNECTED_INPUTS, dduID, mo))
155 if (
getEMUHisto(h::EMU_ALL_DDUS_LIVE_INPUTS, mo)) {
160 if( (csc_error_state >>
i) & 0x1 ){
161 if (
getDDUHisto(h::DDU_CSC_ERRORS_RATE, dduID, mo)) {
167 if (
getEMUHisto(h::EMU_ALL_DDUS_INPUTS_ERRORS, mo)) {
168 mo->
Fill(dduID,
i + 2);
172 if((csc_warning_state >>
i) & 0x1 ){
173 if (
getDDUHisto(h::DDU_CSC_WARNINGS_RATE, dduID, mo)) {
178 if (
getEMUHisto(h::EMU_ALL_DDUS_INPUTS_WARNINGS, mo)) {
179 mo->
Fill(dduID,
i + 2);
184 if (
getEMUHisto(h::EMU_ALL_DDUS_AVERAGE_LIVE_INPUTS, mo)) {
185 mo->
Fill(dduID, ddu_connected_inputs_cnt);
190 if (
getEMUHisto(h::EMU_ALL_DDUS_AVERAGE_INPUTS_WITH_DATA, mo)) {
191 mo->
Fill(dduID, dmb_dav_header_cnt);
195 if (
getEMUHisto(h::EMU_ALL_DDUS_INPUTS_ERRORS, mo)) {
196 if (csc_error_state > 0) {
203 if (
getEMUHisto(h::EMU_ALL_DDUS_INPUTS_WARNINGS, mo)) {
204 if (csc_warning_state > 0) {
215 if (
getDDUHisto(h::DDU_DMB_ACTIVE_HEADER_COUNT, dduID, mo)) mo->
Fill(dmb_active_header);
216 if (
getDDUHisto(h::DDU_DMB_DAV_HEADER_COUNT_VS_DMB_ACTIVE_HEADER_COUNT, dduID, mo))
217 mo->
Fill(dmb_active_header, dmb_dav_header_cnt);
220 uint32_t trl_errorstat = dduTrailer.
errorstat();
221 if (dmb_dav_header_cnt == 0) trl_errorstat &= ~0x20000000;
223 for (
int i = 0;
i < 32;
i++) {
224 if ((trl_errorstat >>
i) & 0x1) {
225 if (
getDDUHisto(h::DDU_TRAILER_ERRORSTAT_RATE, dduID, mo)) {
228 if (
getDDUHisto(h::DDU_TRAILER_ERRORSTAT_FREQUENCY, dduID, mo))
231 if (
getDDUHisto(h::DDU_TRAILER_ERRORSTAT_TABLE, dduID, mo))
235 if (
getEMUHisto(h::EMU_ALL_DDUS_TRAILER_ERRORS, mo)) {
238 for (
int i = 0;
i < 32;
i++) {
239 if ((trl_errorstat >>
i) & 0x1) {
240 mo->
Fill(dduID,
i + 2);
255 if (
config->getPROCESS_CSC()) {
257 std::vector<CSCEventData> chamberDatas;
258 chamberDatas.clear();
259 chamberDatas = dduData.
cscData();
261 nCSCs = chamberDatas.size();
263 for(uint32_t
i = 0;
i < nCSCs;
i++) {
269 if (
getDDUHisto(h::DDU_DMB_UNPACKED_VS_DAV, dduID, mo)) mo->
Fill(dmb_active_header, nCSCs);
CSCDDUHeader header() const
const unsigned long getNEvents() const
virtual void SetEntries(const double value)=0
const bool getDDUHisto(const HistoId &histo, const HwId &dduID, MonitorObject *&me)
Get DDU Level Monitoring Object.
virtual void Fill(float x)=0
Monitoring Object interface used to cover Root object and provide common interface to EventProcessor ...
unsigned errorstat() const
void processCSC(const CSCEventData &data, const int dduID, const CSCDCCExaminer &binChecker)
Process Chamber Data and fill MOs.
unsigned dmb_warn() const
std::map< uint32_t, uint32_t > L1ANumbers
virtual void SetBinContent(const int binX, const double value)=0
unsigned reserved() const
void processDDU(const CSCDDUEventData &data, const CSCDCCExaminer &binChecker)
Process DDU output and fill MOs.
const std::vector< CSCEventData > & cscData() const
accessor to data
const std::string getPath() const
Get path part of the histogram (used only for DDUs and CSCs)
unsigned dmb_full() const
virtual double GetBinContent(const int binX)=0
CSCDDUTrailer trailer() const
bool fCloseL1As
Total Number of TMBs per event from DMB DAV.
unsigned wordcount() const
std::map< uint32_t, bool > fNotFirstEvent
const bool getEMUHisto(const HistoId &histo, MonitorObject *&me)
Get EMU (Top Level) Monitoring Object.