CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
DQMEventInfo Class Reference

#include <DQMEventInfo.h>

Inheritance diagram for DQMEventInfo:
edm::EDAnalyzer

Public Member Functions

 DQMEventInfo (const edm::ParameterSet &ps)
 Constructor. More...
 
virtual ~DQMEventInfo ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 Analyze. More...
 
void beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

MonitorElementcmsswVer_
 Current working directory of the job. More...
 
double currentTime_
 
DQMStoredbe_
 
MonitorElementdqmPatch_
 CMSSW version run for this job. More...
 
MonitorElementerrSummary_
 DQM patch version for this job. More...
 
MonitorElementerrSummaryEtaPhi_
 Subdetector-specific error summary (float) More...
 
MonitorElementerrSummarySegment_ [10]
 Subdetector-specific etaPhi summary (float) More...
 
MonitorElementeventId_
 UTC time of the run start. More...
 
std::string eventInfoFolder_
 
MonitorElementeventTimeStamp_
 
int64_t evtRateCount_
 
double evtRateWindow_
 
MonitorElementhostName_
 

of event processed so far

More...
 
double lastAvgTime_
 
double lastUpdateTime_
 
MonitorElementlumisecId_
 
MonitorElementnUpdates_
 These MEs are either static or updated upon each analyze() call. More...
 
edm::ParameterSet parameters_
 
int64_t pEvent_
 
MonitorElementprocessEventRate_
 Time elapsed since the last event. More...
 
MonitorElementprocessEvents_
 Avg # of events in programmable window (default: 5 min) More...
 
MonitorElementprocessId_
 Number of collector updates (TBD) More...
 
MonitorElementprocessLatency_
 The UTC time of the last event. More...
 
MonitorElementprocessName_
 Hostname of the local machine. More...
 
MonitorElementprocessStartTimeStamp_
 The PID associated with this job. More...
 
MonitorElementprocessTimeStamp_
 The UTC time of the first event processed. More...
 
MonitorElementrunId_
 
double runStartTime_
 
MonitorElementrunStartTimeStamp_
 
MonitorElementworkingDir_
 DQM "name" of the job (eg, Hcal or DT) More...
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 33 of file DQMEventInfo.h.

Constructor & Destructor Documentation

DQMEventInfo::DQMEventInfo ( const edm::ParameterSet ps)

Constructor.

Definition at line 27 of file DQMEventInfo.cc.

References DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookString(), cmsswVer_, currentTime_, dbe_, eventId_, eventInfoFolder_, eventTimeStamp_, evtRateCount_, evtRateWindow_, MonitorElement::Fill(), edm::getReleaseVersion(), edm::ParameterSet::getUntrackedParameter(), hostName_, lastAvgTime_, lumisecId_, nUpdates_, cmsCodeRules.cppFunctionSkipper::operator, parameters_, pEvent_, processEventRate_, processEvents_, processId_, processLatency_, processName_, processStartTimeStamp_, processTimeStamp_, runId_, runStartTimeStamp_, DQMStore::setCurrentFolder(), stampToReal(), and workingDir_.

27  {
28 
29  struct timeval now;
30  gettimeofday(&now, 0);
31 
32  parameters_ = ps;
33  pEvent_ = 0;
34  evtRateCount_ = 0;
36 
37  // read config parms
38  std::string folder = parameters_.getUntrackedParameter<std::string>("eventInfoFolder", "EventInfo") ;
39  std::string subsystemname = parameters_.getUntrackedParameter<std::string>("subSystemFolder", "YourSubsystem") ;
40 
41  eventInfoFolder_ = subsystemname + "/" + folder ;
42  evtRateWindow_ = parameters_.getUntrackedParameter<double>("eventRateWindow", 0.5);
43  if(evtRateWindow_<=0.15) evtRateWindow_=0.15;
44 
45  //
47 
49 
50  //Event specific contents
51  runId_ = dbe_->bookInt("iRun");
52  runId_->Fill(-1);
53  lumisecId_ = dbe_->bookInt("iLumiSection");
54  lumisecId_->Fill(-1);
55  eventId_ = dbe_->bookInt("iEvent");
56  eventId_->Fill(-1);
57  eventTimeStamp_ = dbe_->bookFloat("eventTimeStamp");
58 
60  //Process specific contents
61  processTimeStamp_ = dbe_->bookFloat("processTimeStamp");
63  processLatency_ = dbe_->bookFloat("processLatency");
65  processEvents_ = dbe_->bookInt("processedEvents");
67  processEventRate_ = dbe_->bookFloat("processEventRate");
68  processEventRate_->Fill(-1);
69  nUpdates_= dbe_->bookInt("processUpdates");
70  nUpdates_->Fill(-1);
71 
72  //Static Contents
73  processId_= dbe_->bookInt("processID");
74  processId_->Fill(gSystem->GetPid());
75  processStartTimeStamp_ = dbe_->bookFloat("processStartTimeStamp");
77  runStartTimeStamp_ = dbe_->bookFloat("runStartTimeStamp");
78  hostName_= dbe_->bookString("hostName",gSystem->HostName());
79  processName_= dbe_->bookString("processName",subsystemname);
80  workingDir_= dbe_->bookString("workingDir",gSystem->pwd());
81  cmsswVer_= dbe_->bookString("CMSSW_Version",edm::getReleaseVersion());
82 
83  // Folder to be populated by sub-systems' code
84  std::string subfolder = eventInfoFolder_ + "/reportSummaryContents" ;
85  dbe_->setCurrentFolder(subfolder);
86 
87 }
double evtRateWindow_
Definition: DQMEventInfo.h:64
double currentTime_
Definition: DQMEventInfo.h:62
MonitorElement * hostName_
of event processed so far
Definition: DQMEventInfo.h:88
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * workingDir_
DQM &quot;name&quot; of the job (eg, Hcal or DT)
Definition: DQMEventInfo.h:90
MonitorElement * eventTimeStamp_
Definition: DQMEventInfo.h:76
DQMStore * dbe_
Definition: DQMEventInfo.h:54
edm::ParameterSet parameters_
Definition: DQMEventInfo.h:56
MonitorElement * processId_
Number of collector updates (TBD)
Definition: DQMEventInfo.h:82
MonitorElement * processStartTimeStamp_
The PID associated with this job.
Definition: DQMEventInfo.h:83
int64_t pEvent_
Definition: DQMEventInfo.h:66
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:456
void Fill(long long x)
MonitorElement * cmsswVer_
Current working directory of the job.
Definition: DQMEventInfo.h:91
MonitorElement * eventId_
UTC time of the run start.
Definition: DQMEventInfo.h:74
std::string eventInfoFolder_
Definition: DQMEventInfo.h:57
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:485
MonitorElement * lumisecId_
Definition: DQMEventInfo.h:75
MonitorElement * runStartTimeStamp_
Definition: DQMEventInfo.h:73
double lastAvgTime_
Definition: DQMEventInfo.h:62
MonitorElement * processEvents_
Avg # of events in programmable window (default: 5 min)
Definition: DQMEventInfo.h:87
MonitorElement * processLatency_
The UTC time of the last event.
Definition: DQMEventInfo.h:85
MonitorElement * processName_
Hostname of the local machine.
Definition: DQMEventInfo.h:89
std::string getReleaseVersion()
int64_t evtRateCount_
Definition: DQMEventInfo.h:65
MonitorElement * runId_
Definition: DQMEventInfo.h:72
MonitorElement * nUpdates_
These MEs are either static or updated upon each analyze() call.
Definition: DQMEventInfo.h:81
MonitorElement * processEventRate_
Time elapsed since the last event.
Definition: DQMEventInfo.h:86
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:426
MonitorElement * processTimeStamp_
The UTC time of the first event processed.
Definition: DQMEventInfo.h:84
static double stampToReal(edm::Timestamp time)
Definition: DQMEventInfo.cc:20
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
DQMEventInfo::~DQMEventInfo ( )
virtual

Destructor.

Definition at line 89 of file DQMEventInfo.cc.

89  {
90 }

Member Function Documentation

void DQMEventInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Analyze.

Implements edm::EDAnalyzer.

Definition at line 106 of file DQMEventInfo.cc.

References currentTime_, delta, edm::EventID::event(), eventId_, eventTimeStamp_, evtRateCount_, evtRateWindow_, MonitorElement::Fill(), edm::EventBase::id(), lastAvgTime_, lastUpdateTime_, pEvent_, processEventRate_, processEvents_, processLatency_, processTimeStamp_, stampToReal(), and edm::EventBase::time().

106  {
107 
108  eventId_->Fill(int64_t(e.id().event()));
110 
111  pEvent_++;
112  evtRateCount_++;
114 
115  struct timeval now;
116  gettimeofday(&now, 0);
119 
122 
123  double delta = currentTime_ - lastAvgTime_;
124  if (delta >= (evtRateWindow_*60.0))
125  {
127  evtRateCount_ = 0;
128  lastAvgTime_ = currentTime_;
129  }
130 
131  return;
132 }
dbl * delta
Definition: mlp_gen.cc:36
double evtRateWindow_
Definition: DQMEventInfo.h:64
EventNumber_t event() const
Definition: EventID.h:44
double currentTime_
Definition: DQMEventInfo.h:62
double lastUpdateTime_
Definition: DQMEventInfo.h:62
MonitorElement * eventTimeStamp_
Definition: DQMEventInfo.h:76
int64_t pEvent_
Definition: DQMEventInfo.h:66
void Fill(long long x)
MonitorElement * eventId_
UTC time of the run start.
Definition: DQMEventInfo.h:74
double lastAvgTime_
Definition: DQMEventInfo.h:62
MonitorElement * processEvents_
Avg # of events in programmable window (default: 5 min)
Definition: DQMEventInfo.h:87
MonitorElement * processLatency_
The UTC time of the last event.
Definition: DQMEventInfo.h:85
int64_t evtRateCount_
Definition: DQMEventInfo.h:65
MonitorElement * processEventRate_
Time elapsed since the last event.
Definition: DQMEventInfo.h:86
edm::EventID id() const
Definition: EventBase.h:56
MonitorElement * processTimeStamp_
The UTC time of the first event processed.
Definition: DQMEventInfo.h:84
static double stampToReal(edm::Timestamp time)
Definition: DQMEventInfo.cc:20
edm::Timestamp time() const
Definition: EventBase.h:57
void DQMEventInfo::beginLuminosityBlock ( const edm::LuminosityBlock l,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 100 of file DQMEventInfo.cc.

References MonitorElement::Fill(), edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), and lumisecId_.

100  {
101 
103 
104 }
LuminosityBlockID id() const
void Fill(long long x)
MonitorElement * lumisecId_
Definition: DQMEventInfo.h:75
LuminosityBlockNumber_t luminosityBlock() const
void DQMEventInfo::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 92 of file DQMEventInfo.cc.

References edm::RunBase::beginTime(), MonitorElement::Fill(), edm::RunBase::id(), edm::RunID::run(), runId_, runStartTimeStamp_, and stampToReal().

93 {
94 
95  runId_->Fill(r.id().run());
97 
98 }
RunID const & id() const
Definition: RunBase.h:43
RunNumber_t run() const
Definition: RunID.h:44
void Fill(long long x)
MonitorElement * runStartTimeStamp_
Definition: DQMEventInfo.h:73
MonitorElement * runId_
Definition: DQMEventInfo.h:72
Timestamp const & beginTime() const
Definition: RunBase.h:45
static double stampToReal(edm::Timestamp time)
Definition: DQMEventInfo.cc:20

Member Data Documentation

MonitorElement* DQMEventInfo::cmsswVer_
private

Current working directory of the job.

Definition at line 91 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

double DQMEventInfo::currentTime_
private

Definition at line 62 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

DQMStore* DQMEventInfo::dbe_
private

Definition at line 54 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

MonitorElement* DQMEventInfo::dqmPatch_
private

CMSSW version run for this job.

Definition at line 92 of file DQMEventInfo.h.

MonitorElement* DQMEventInfo::errSummary_
private

DQM patch version for this job.

Definition at line 93 of file DQMEventInfo.h.

MonitorElement* DQMEventInfo::errSummaryEtaPhi_
private

Subdetector-specific error summary (float)

Definition at line 94 of file DQMEventInfo.h.

MonitorElement* DQMEventInfo::errSummarySegment_[10]
private

Subdetector-specific etaPhi summary (float)

Definition at line 95 of file DQMEventInfo.h.

MonitorElement* DQMEventInfo::eventId_
private

UTC time of the run start.

Definition at line 74 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

std::string DQMEventInfo::eventInfoFolder_
private

Definition at line 57 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

MonitorElement* DQMEventInfo::eventTimeStamp_
private

Definition at line 76 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

int64_t DQMEventInfo::evtRateCount_
private

Definition at line 65 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

double DQMEventInfo::evtRateWindow_
private

Definition at line 64 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

MonitorElement* DQMEventInfo::hostName_
private

of event processed so far

Definition at line 88 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

double DQMEventInfo::lastAvgTime_
private

Definition at line 62 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

double DQMEventInfo::lastUpdateTime_
private

Definition at line 62 of file DQMEventInfo.h.

Referenced by analyze().

MonitorElement* DQMEventInfo::lumisecId_
private

Definition at line 75 of file DQMEventInfo.h.

Referenced by beginLuminosityBlock(), and DQMEventInfo().

MonitorElement* DQMEventInfo::nUpdates_
private

These MEs are either static or updated upon each analyze() call.

Definition at line 81 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

edm::ParameterSet DQMEventInfo::parameters_
private
int64_t DQMEventInfo::pEvent_
private

Definition at line 66 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

MonitorElement* DQMEventInfo::processEventRate_
private

Time elapsed since the last event.

Definition at line 86 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

MonitorElement* DQMEventInfo::processEvents_
private

Avg # of events in programmable window (default: 5 min)

Definition at line 87 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

MonitorElement* DQMEventInfo::processId_
private

Number of collector updates (TBD)

Definition at line 82 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

MonitorElement* DQMEventInfo::processLatency_
private

The UTC time of the last event.

Definition at line 85 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

MonitorElement* DQMEventInfo::processName_
private

Hostname of the local machine.

Definition at line 89 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

MonitorElement* DQMEventInfo::processStartTimeStamp_
private

The PID associated with this job.

Definition at line 83 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

MonitorElement* DQMEventInfo::processTimeStamp_
private

The UTC time of the first event processed.

Definition at line 84 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

MonitorElement* DQMEventInfo::runId_
private

These MEs are filled with the info from the most recent event by the module

Definition at line 72 of file DQMEventInfo.h.

Referenced by beginRun(), and DQMEventInfo().

double DQMEventInfo::runStartTime_
private

Definition at line 63 of file DQMEventInfo.h.

MonitorElement* DQMEventInfo::runStartTimeStamp_
private

Definition at line 73 of file DQMEventInfo.h.

Referenced by beginRun(), and DQMEventInfo().

MonitorElement* DQMEventInfo::workingDir_
private

DQM "name" of the job (eg, Hcal or DT)

Definition at line 90 of file DQMEventInfo.h.

Referenced by DQMEventInfo().