Public Types | Public Member Functions | Private Attributes | List of all members
om::MicroErrors Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/OnlineMonitoring/producer/MicroErrors.h"

Inheritance diagram for om::MicroErrors:
om::SummarySubscriber

Public Types

enum  _which { kEvent = 0x01, kDataBlock = 0x02, kMicroSlice = 0x04, kNanoSlice = 0x08 }
 Which summaries does a class want to subscribe to? More...
 

Public Member Functions

 MicroErrors ()
 
 ~MicroErrors ()
 
virtual void GetMicroSliceSummary (const RawEventSummary &r, const DataBlockSummary &dbs, const MicroSliceSummary &mss)
 Interface to the microslice summary. More...
 
virtual void GetRawEventSummary (const RawEventSummary &res)
 Interface to the event summary. More...
 
virtual void GetDataBlockSummary (const RawEventSummary &res, const DataBlockSummary &dbs)
 Interface to the data block summary. More...
 
virtual void GetNanoSliceSummary (const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mss, const NanoSliceSummary &nss)
 Interface to the nanoslice summary. More...
 

Private Attributes

daqchannelmap::HardwareDisplayfHwMap
 
TH2F * fDPEbyDCM
 
TH2F * fMCbyDCM
 
TH2F * fBCbyDCM
 
TH1F * fBCperDCM [DCM_size_micro][DCM_size_micro]
 
TH2F * fAEVsHour
 
TH2F * fAAVsHour
 

Detailed Description

Definition at line 18 of file MicroErrors.h.

Member Enumeration Documentation

Which summaries does a class want to subscribe to?

Enumerator
kEvent 
kDataBlock 
kMicroSlice 
kNanoSlice 

Definition at line 20 of file SummarySubscriber.h.

Constructor & Destructor Documentation

MicroErrors::MicroErrors ( )

Definition at line 16 of file MicroErrors.cxx.

References DCM_size_micro, fAAVsHour, fAEVsHour, fBCbyDCM, fBCperDCM, fDPEbyDCM, fHwMap, fMCbyDCM, om::HistoSet::GetTH2F(), make_syst_table_plots::h, MECModelEnuComparisons::i, om::Settings::Instance(), om::HistoSet::Instance(), calib::j, and daqchannelmap::HardwareDisplay::SetupDet().

16  :
19 {
21 
22  // initalize the arrays of histograms to zero
23  for(unsigned int i = 0; i < DCM_size_micro; ++i) {
24  for(unsigned int j = 0; j < DCM_size_micro; ++j) {
25  fBCperDCM[i][j] = 0;
26  } // end for j
27  } // end for i
28 
29  // create the initial Error Plots
31 
32  fDPEbyDCM = h.GetTH2F("DPEbyDCM");
33  fMCbyDCM = h.GetTH2F("MCbyDCM");
34  fBCbyDCM = h.GetTH2F("BCbyDCM");
35  fAEVsHour = h.GetTH2F("AEVsHour");
36  fAAVsHour = h.GetTH2F("AAVsHour");
37 
38 
39 }
TH2F * fAEVsHour
Definition: MicroErrors.h:45
TH1F * fBCperDCM[DCM_size_micro][DCM_size_micro]
Definition: MicroErrors.h:43
TH2F * fDPEbyDCM
Definition: MicroErrors.h:38
TH2F * GetTH2F(const char *nm)
Definition: HistoSet.cxx:89
static const unsigned int DCM_size_micro
Definition: MicroErrors.h:8
const double j
Definition: BetheBloch.cxx:29
TH2F * fAAVsHour
Definition: MicroErrors.h:46
daqchannelmap::HardwareDisplay * fHwMap
Definition: MicroErrors.h:26
static HistoSet & Instance()
Definition: HistoSet.cxx:24
static Settings & Instance()
Definition: Settings.cxx:12
MicroErrors::~MicroErrors ( )

Definition at line 43 of file MicroErrors.cxx.

References fHwMap.

43  {
44  if(fHwMap) {delete fHwMap; fHwMap = 0;}
45 }
daqchannelmap::HardwareDisplay * fHwMap
Definition: MicroErrors.h:26

Member Function Documentation

virtual void om::SummarySubscriber::GetDataBlockSummary ( const RawEventSummary res,
const DataBlockSummary dbs 
)
inlinevirtualinherited

Interface to the data block summary.

Reimplemented in om::DataBlockErrors.

Definition at line 35 of file SummarySubscriber.h.

36  { abort(); }
void MicroErrors::GetMicroSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mss 
)
virtual

Interface to the microslice summary.

Reimplemented from om::SummarySubscriber.

Definition at line 49 of file MicroErrors.cxx.

References daqchannelmap::HardwareDisplay::DCMXY(), daqchannelmap::HardwareDisplay::DiblockXY(), fAAVsHour, fAEVsHour, fBCbyDCM, fBCperDCM, om::MicroSliceSummary::fByteCount, om::MicroSliceSummary::fDataPresent, om::MicroSliceSummary::fDCM, om::MicroSliceSummary::fDiblock, fDPEbyDCM, om::RawEventSummary::fHour, fHwMap, fMCbyDCM, om::MicroSliceSummary::fMCflag, om::HistoSet::GetTH1F(), make_syst_table_plots::h, om::HistoSet::Instance(), X, x1, submit_syst::x2, Y, y1, and submit_syst::y2.

52 {
54 
55  //
56  // Get the detector coordinates for this micro slice entry
57  //
58  unsigned int x1, x2, y1, y2;
59  fHwMap->DiblockXY(mss.fDiblock, &x1, &y1);
60  fHwMap->DCMXY(mss.fDCM, &x2, &y2);
61  unsigned int X = x1+x2, Y = y1+y2;
62 
63  float AlertFill = 0.0;
64 
65 
66 
67 
68 
69  //
70  // fill the Data Present histos
71  //
72  // NOTE: Unlike DataPresent reported at the nano level, this is NOT reported as an "error."
73  // It is reported as a "status" so if it is false, then the histo should be filled.
74  if(!mss.fDataPresent) {
75  fDPEbyDCM->Fill(X,Y);
76  fAEVsHour->Fill(r.fHour, 3);
77  if(r.fHour >= 23.0) fAEVsHour->Fill(r.fHour - 24.0, 3);
78  }
79 
80 
81 
82  //
83  // fill the Simulations Flag histos
84  // NOTE: This is an "alert" histo and should only be filled with a status
85  // indicating good (0) or bad (1).
86  // We fill the histo with the OR of the current and previous values
87  // so that once an alert gets set, the histo will continue to display
88  // the set status until the histo is reset.
89  //
90 
91  // record error in detailed all alerts histo
92  fAAVsHour->Fill(r.fHour, 0.0, mss.fMCflag);
93  if(r.fHour >= 23.0) fAAVsHour->Fill(r.fHour - 24.0, 0.0, mss.fMCflag);
94 
95  // fill DCM level histo of MC flag reported by DCM
96  //
97  // NOTE: We add 0.1 to distinguish bins that are empty from bins that have been filled
98  // with zero.
99  if(mss.fMCflag || fMCbyDCM->GetBinContent(fMCbyDCM->FindBin(X,Y)) > 1.0) AlertFill = 1.1;
100  else AlertFill = 0.1;
101  fMCbyDCM->SetBinContent(fMCbyDCM->FindBin(X,Y), AlertFill);
102 
103 
104 
105 
106 
107  //
108  // fill the Byte Count histos
109  //
110 
111  // fill the whole detector histo
112  fBCbyDCM->Fill(X,Y,mss.fByteCount);
113 
114  // fill the DCM specific histos
115  if(fBCperDCM[mss.fDiblock][mss.fDCM] == 0) {
116  // create and name the histogram by Diblock and DCM
117  char histoname[15];
118  sprintf(histoname, "BCperDCM_%.2u_%.2u", mss.fDiblock, mss.fDCM);
119  fBCperDCM[mss.fDiblock][mss.fDCM] = h.GetTH1F(histoname);
120  }
121 
122  fBCperDCM[mss.fDiblock][mss.fDCM]->Fill(mss.fByteCount);
123 
124 }
unsigned int fDCM
DCM ID.
Float_t y1[n_points_granero]
Definition: compare.C:5
unsigned int fDiblock
Diblock ID.
TH1F * GetTH1F(const char *nm)
Definition: HistoSet.cxx:68
Float_t x1[n_points_granero]
Definition: compare.C:5
TH2F * fAEVsHour
Definition: MicroErrors.h:45
TH1F * fBCperDCM[DCM_size_micro][DCM_size_micro]
Definition: MicroErrors.h:43
bool fMCflag
Monte Carlo flag.
TH2F * fDPEbyDCM
Definition: MicroErrors.h:38
void DiblockXY(unsigned int db, unsigned int *ix, unsigned int *iy)
Float_t Y
Definition: plot.C:38
unsigned int fByteCount
Number of bytes reported by DCM.
bool fDataPresent
Data Present flag by DCM.
TH2F * fAAVsHour
Definition: MicroErrors.h:46
daqchannelmap::HardwareDisplay * fHwMap
Definition: MicroErrors.h:26
void DCMXY(unsigned int dcm, unsigned int *ix, unsigned int *iy)
TRandom3 r(0)
static HistoSet & Instance()
Definition: HistoSet.cxx:24
Float_t X
Definition: plot.C:38
virtual void om::SummarySubscriber::GetNanoSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mss,
const NanoSliceSummary nss 
)
inlinevirtualinherited

Interface to the nanoslice summary.

Reimplemented in om::FEBRatesByDiblock, om::HitMaps, om::NanoErrors, om::TQPlots, and om::WLPlots.

Definition at line 44 of file SummarySubscriber.h.

47  { abort(); }
virtual void om::SummarySubscriber::GetRawEventSummary ( const RawEventSummary res)
inlinevirtualinherited

Interface to the event summary.

Reimplemented in om::TriggerPlots, om::RawEventErrors, and om::HitCounts.

Definition at line 32 of file SummarySubscriber.h.

32 { abort(); };

Member Data Documentation

TH2F* om::MicroErrors::fAAVsHour
private

Definition at line 46 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), and MicroErrors().

TH2F* om::MicroErrors::fAEVsHour
private

Definition at line 45 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), and MicroErrors().

TH2F* om::MicroErrors::fBCbyDCM
private

Definition at line 40 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), and MicroErrors().

TH1F* om::MicroErrors::fBCperDCM[DCM_size_micro][DCM_size_micro]
private

Definition at line 43 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), and MicroErrors().

TH2F* om::MicroErrors::fDPEbyDCM
private

Definition at line 38 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), and MicroErrors().

daqchannelmap::HardwareDisplay* om::MicroErrors::fHwMap
private

Definition at line 26 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), MicroErrors(), and ~MicroErrors().

TH2F* om::MicroErrors::fMCbyDCM
private

Definition at line 39 of file MicroErrors.h.

Referenced by GetMicroSliceSummary(), and MicroErrors().


The documentation for this class was generated from the following files: