#include <DQMEventInfo.h>
Public Member Functions | |
DQMEventInfo (const edm::ParameterSet &ps) | |
Constructor. | |
virtual | ~DQMEventInfo () |
Destructor. | |
Protected Member Functions | |
void | analyze (const edm::Event &e, const edm::EventSetup &c) |
Analyze. | |
void | beginLuminosityBlock (const edm::LuminosityBlock &l, const edm::EventSetup &c) |
void | beginRun (const edm::Run &r, const edm::EventSetup &c) |
Private Attributes | |
MonitorElement * | cmsswVer_ |
Current working directory of the job. | |
double | currentTime_ |
DQMStore * | dbe_ |
MonitorElement * | dqmPatch_ |
CMSSW version run for this job. | |
MonitorElement * | errSummary_ |
DQM patch version for this job. | |
MonitorElement * | errSummaryEtaPhi_ |
Subdetector-specific error summary (float) | |
MonitorElement * | errSummarySegment_ [10] |
Subdetector-specific etaPhi summary (float) | |
MonitorElement * | eventId_ |
UTC time of the run start. | |
std::string | eventInfoFolder_ |
MonitorElement * | eventTimeStamp_ |
int64_t | evtRateCount_ |
double | evtRateWindow_ |
MonitorElement * | hostName_ |
# of event processed so far | |
double | lastAvgTime_ |
double | lastUpdateTime_ |
MonitorElement * | lumisecId_ |
MonitorElement * | nUpdates_ |
edm::ParameterSet | parameters_ |
int64_t | pEvent_ |
MonitorElement * | processEventRate_ |
Time elapsed since the last event. | |
MonitorElement * | processEvents_ |
Avg # of events in programmable window (default: 5 min) | |
MonitorElement * | processId_ |
Number of collector updates (TBD) | |
MonitorElement * | processLatency_ |
The UTC time of the last event. | |
MonitorElement * | processName_ |
Hostname of the local machine. | |
MonitorElement * | processStartTimeStamp_ |
The PID associated with this job. | |
MonitorElement * | processTimeStamp_ |
The UTC time of the first event processed. | |
MonitorElement * | runId_ |
double | runStartTime_ |
MonitorElement * | runStartTimeStamp_ |
MonitorElement * | workingDir_ |
DQM "name" of the job (eg, Hcal or DT) |
Definition at line 33 of file DQMEventInfo.h.
DQMEventInfo::DQMEventInfo | ( | const edm::ParameterSet & | ps | ) |
Constructor.
Definition at line 28 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_, cppFunctionSkipper::operator, parameters_, pEvent_, processEventRate_, processEvents_, processId_, processLatency_, processName_, processStartTimeStamp_, processTimeStamp_, runId_, runStartTimeStamp_, DQMStore::setCurrentFolder(), stampToReal(), and workingDir_.
{ struct timeval now; gettimeofday(&now, 0); parameters_ = ps; pEvent_ = 0; evtRateCount_ = 0; lastAvgTime_ = currentTime_ = stampToReal(now); // read config parms std::string folder = parameters_.getUntrackedParameter<std::string>("eventInfoFolder", "EventInfo") ; std::string subsystemname = parameters_.getUntrackedParameter<std::string>("subSystemFolder", "YourSubsystem") ; eventInfoFolder_ = subsystemname + "/" + folder ; evtRateWindow_ = parameters_.getUntrackedParameter<double>("eventRateWindow", 0.5); if(evtRateWindow_<=0.15) evtRateWindow_=0.15; // dbe_ = edm::Service<DQMStore>().operator->(); dbe_->setCurrentFolder(eventInfoFolder_) ; //Event specific contents runId_ = dbe_->bookInt("iRun"); runId_->Fill(-1); lumisecId_ = dbe_->bookInt("iLumiSection"); lumisecId_->Fill(-1); eventId_ = dbe_->bookInt("iEvent"); eventId_->Fill(-1); eventTimeStamp_ = dbe_->bookFloat("eventTimeStamp"); dbe_->setCurrentFolder(eventInfoFolder_) ; //Process specific contents processTimeStamp_ = dbe_->bookFloat("processTimeStamp"); processTimeStamp_->Fill(currentTime_); processLatency_ = dbe_->bookFloat("processLatency"); processTimeStamp_->Fill(-1); processEvents_ = dbe_->bookInt("processedEvents"); processEvents_->Fill(pEvent_); processEventRate_ = dbe_->bookFloat("processEventRate"); processEventRate_->Fill(-1); nUpdates_= dbe_->bookInt("processUpdates"); nUpdates_->Fill(-1); //Static Contents processId_= dbe_->bookInt("processID"); processId_->Fill(gSystem->GetPid()); processStartTimeStamp_ = dbe_->bookFloat("processStartTimeStamp"); processStartTimeStamp_->Fill(currentTime_); runStartTimeStamp_ = dbe_->bookFloat("runStartTimeStamp"); hostName_= dbe_->bookString("hostName",gSystem->HostName()); processName_= dbe_->bookString("processName",subsystemname); workingDir_= dbe_->bookString("workingDir",gSystem->pwd()); cmsswVer_= dbe_->bookString("CMSSW_Version",edm::getReleaseVersion()); // Folder to be populated by sub-systems' code std::string subfolder = eventInfoFolder_ + "/reportSummaryContents" ; dbe_->setCurrentFolder(subfolder); }
DQMEventInfo::~DQMEventInfo | ( | ) | [virtual] |
void DQMEventInfo::analyze | ( | const edm::Event & | e, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Analyze.
Implements edm::EDAnalyzer.
Definition at line 122 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().
{ eventId_->Fill(int64_t(e.id().event())); eventTimeStamp_->Fill(stampToReal(e.time())); pEvent_++; evtRateCount_++; processEvents_->Fill(pEvent_); struct timeval now; gettimeofday(&now, 0); lastUpdateTime_ = currentTime_; currentTime_ = stampToReal(now); processTimeStamp_->Fill(currentTime_); processLatency_->Fill(currentTime_ - lastUpdateTime_); double delta = currentTime_ - lastAvgTime_; if (delta >= (evtRateWindow_*60.0)) { processEventRate_->Fill(evtRateCount_/delta); evtRateCount_ = 0; lastAvgTime_ = currentTime_; } return; }
void DQMEventInfo::beginLuminosityBlock | ( | const edm::LuminosityBlock & | l, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 116 of file DQMEventInfo.cc.
References MonitorElement::Fill(), edm::LuminosityBlockBase::id(), and lumisecId_.
{ lumisecId_->Fill(l.id().luminosityBlock()); }
void DQMEventInfo::beginRun | ( | const edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 93 of file DQMEventInfo.cc.
References edm::RunBase::beginTime(), DQMStore::bookString(), dbe_, eventInfoFolder_, MonitorElement::Fill(), edm::ParameterSet::getParameter(), edm::getProcessParameterSet(), edm::ParameterSet::getUntrackedParameterSet(), edm::RunBase::id(), runId_, runStartTimeStamp_, DQMStore::setCurrentFolder(), and stampToReal().
{ runId_->Fill(r.id().run()); runStartTimeStamp_->Fill(stampToReal(r.beginTime())); //Online static histograms const edm::ParameterSet &sourcePSet = edm::getProcessParameterSet().getParameterSet("@main_input"); if (sourcePSet.getParameter<std::string>("@module_type") == "EventStreamHttpReader" ){ std::string evSelection; std::vector<std::string> evSelectionList; const edm::ParameterSet &evSelectionPSet = sourcePSet.getUntrackedParameterSet("SelectEvents"); evSelectionList = evSelectionPSet.getParameter<std::vector<std::string> >("SelectEvents"); for ( std::vector<std::string>::iterator it = evSelectionList.begin(); it < evSelectionList.end(); it++ ) evSelection += "'"+ *it + "', "; evSelection.resize(evSelection.length()-2); dbe_->setCurrentFolder(eventInfoFolder_); dbe_->bookString("eventSelection",evSelection); } }
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 beginRun(), and 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 beginRun(), and 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] |
Definition at line 56 of file DQMEventInfo.h.
Referenced by DQMEventInfo().
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().
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().