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

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

Inheritance diagram for om::HitCounts:
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

 HitCounts ()
 
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 GetMicroSliceSummary (const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mss)
 Interface to the microslice 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

TH2F * fNhitVsHour
 
TH2F * fNfebsVsHour
 
TH2F * fNdcmsVsHour
 
TH2F * fAveNmicroSlVsHour
 
TH2F * fTotNmicroSlVsHour
 

Detailed Description

Definition at line 8 of file HitCounts.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

HitCounts::HitCounts ( )

Definition at line 11 of file HitCounts.cxx.

References fAveNmicroSlVsHour, fNdcmsVsHour, fNfebsVsHour, fNhitVsHour, fTotNmicroSlVsHour, om::HistoSet::GetTH2F(), make_syst_table_plots::h, and om::HistoSet::Instance().

11  :
13 {
15 
16  fNhitVsHour = h.GetTH2F("NhitVsHour");
17  fNfebsVsHour = h.GetTH2F("NfebsVsHour");
18  fNdcmsVsHour = h.GetTH2F("NdcmsVsHour");
19  fAveNmicroSlVsHour = h.GetTH2F("AveNmicroSlVsHour");
20  fTotNmicroSlVsHour = h.GetTH2F("TotNmicroSlVsHour");
21 }
TH2F * fTotNmicroSlVsHour
Definition: HitCounts.h:17
TH2F * fNfebsVsHour
Definition: HitCounts.h:14
TH2F * GetTH2F(const char *nm)
Definition: HistoSet.cxx:89
TH2F * fNdcmsVsHour
Definition: HitCounts.h:15
TH2F * fNhitVsHour
Definition: HitCounts.h:13
TH2F * fAveNmicroSlVsHour
Definition: HitCounts.h:16
static HistoSet & Instance()
Definition: HistoSet.cxx:24

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(); }
virtual void om::SummarySubscriber::GetMicroSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mss 
)
inlinevirtualinherited

Interface to the microslice summary.

Reimplemented in om::MicroErrors.

Definition at line 39 of file SummarySubscriber.h.

41  { abort(); }
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(); }
void HitCounts::GetRawEventSummary ( const RawEventSummary res)
virtual

Interface to the event summary.

Reimplemented from om::SummarySubscriber.

Definition at line 25 of file HitCounts.cxx.

References den, fAveNmicroSlVsHour, om::RawEventSummary::fDCMs, om::RawEventSummary::fFEBs, om::RawEventSummary::fHour, Fill(), fNdcmsVsHour, fNfebsVsHour, om::RawEventSummary::fNhit, fNhitVsHour, om::RawEventSummary::fNmicroSl, fTotNmicroSlVsHour, num, and ratio().

26 {
27 
28  fNdcmsVsHour->Fill(r.fHour, r.fDCMs.size());
29  fNfebsVsHour->Fill(r.fHour, r.fFEBs.size());
30  fNhitVsHour-> Fill(r.fHour, r.fNhit);
31  if(r.fDCMs.size() != 0) {
32  unsigned int num = r.fNmicroSl;
33  unsigned int den = r.fDCMs.size();
34  double ratio = (double)num/(double)den;
35  fAveNmicroSlVsHour->Fill(r.fHour, ratio);
36  }
37  else
38  fAveNmicroSlVsHour->Fill(r.fHour, 0);
39  fTotNmicroSlVsHour->Fill(r.fHour, r.fNmicroSl);
40 
41  // This filling is done so that when the histogram is displayed, if the
42  // current time is between 0 and 1, one can still see the information from
43  // between 23 and 24 on the "previous day."
44  if(r.fHour >= 23.0) {
45  fNdcmsVsHour->Fill(r.fHour - 24.0, r.fDCMs.size());
46  fNfebsVsHour->Fill(r.fHour - 24.0, r.fFEBs.size());
47  fNhitVsHour-> Fill(r.fHour - 24.0, r.fNhit);
48  if(r.fDCMs.size() != 0) {
49  unsigned int num = r.fNmicroSl;
50  unsigned int den = r.fDCMs.size();
51  double ratio = (double)num/(double)den;
52  fAveNmicroSlVsHour->Fill(r.fHour - 24.0, ratio);
53  }
54  else
55  fAveNmicroSlVsHour->Fill(r.fHour - 24.0, 0);
56  fTotNmicroSlVsHour->Fill(r.fHour - 24.0, r.fNmicroSl);
57  }
58 }
Float_t den
Definition: plot.C:36
TH1 * ratio(TH1 *h1, TH1 *h2)
TH2F * fTotNmicroSlVsHour
Definition: HitCounts.h:17
TH2F * fNfebsVsHour
Definition: HitCounts.h:14
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
TH2F * fNdcmsVsHour
Definition: HitCounts.h:15
TH2F * fNhitVsHour
Definition: HitCounts.h:13
int num
Definition: f2_nu.C:119
TRandom3 r(0)
TH2F * fAveNmicroSlVsHour
Definition: HitCounts.h:16

Member Data Documentation

TH2F* om::HitCounts::fAveNmicroSlVsHour
private

Definition at line 16 of file HitCounts.h.

Referenced by GetRawEventSummary(), and HitCounts().

TH2F* om::HitCounts::fNdcmsVsHour
private

Definition at line 15 of file HitCounts.h.

Referenced by GetRawEventSummary(), and HitCounts().

TH2F* om::HitCounts::fNfebsVsHour
private

Definition at line 14 of file HitCounts.h.

Referenced by GetRawEventSummary(), and HitCounts().

TH2F* om::HitCounts::fNhitVsHour
private

Definition at line 13 of file HitCounts.h.

Referenced by GetRawEventSummary(), and HitCounts().

TH2F* om::HitCounts::fTotNmicroSlVsHour
private

Definition at line 17 of file HitCounts.h.

Referenced by GetRawEventSummary(), and HitCounts().


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