CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

DQMEventInfo Class Reference

#include <DQMEventInfo.h>

Inheritance diagram for DQMEventInfo:
edm::EDAnalyzer edm::EDConsumerBase

List of all members.

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

MonitorElementcmsswVer_
 Current working directory of the job.
double currentTime_
DQMStoredbe_
MonitorElementdqmPatch_
 CMSSW version run for this job.
MonitorElementerrSummary_
 DQM patch version for this job.
MonitorElementerrSummaryEtaPhi_
 Subdetector-specific error summary (float)
MonitorElementerrSummarySegment_ [10]
 Subdetector-specific etaPhi summary (float)
MonitorElementeventId_
 UTC time of the run start.
std::string eventInfoFolder_
MonitorElementeventTimeStamp_
int64_t evtRateCount_
double evtRateWindow_
MonitorElementhostName_
 # of event processed so far
double lastAvgTime_
double lastUpdateTime_
MonitorElementlumisecId_
MonitorElementnUpdates_
edm::ParameterSet parameters_
int64_t pEvent_
MonitorElementprocessEventRate_
 Time elapsed since the last event.
MonitorElementprocessEvents_
 Avg # of events in programmable window (default: 5 min)
MonitorElementprocessId_
 Number of collector updates (TBD)
MonitorElementprocessLatency_
 The UTC time of the last event.
MonitorElementprocessName_
 Hostname of the local machine.
MonitorElementprocessStartTimeStamp_
 The PID associated with this job.
MonitorElementprocessTimeStamp_
 The UTC time of the first event processed.
MonitorElementrunId_
double runStartTime_
MonitorElementrunStartTimeStamp_
MonitorElementworkingDir_
 DQM "name" of the job (eg, Hcal or DT)

Detailed Description

Definition at line 33 of file DQMEventInfo.h.


Constructor & Destructor Documentation

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(), AlCaHLTBitMon_QueryRunRegistry::string, 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]

Destructor.

Definition at line 90 of file DQMEventInfo.cc.

                           {
}

Member Function Documentation

void DQMEventInfo::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]
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(), stampToReal(), and AlCaHLTBitMon_QueryRunRegistry::string.

{
    
  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);
  }
  
} 

Member Data Documentation

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().

Definition at line 54 of file DQMEventInfo.h.

Referenced by beginRun(), and DQMEventInfo().

CMSSW version run for this job.

Definition at line 92 of file DQMEventInfo.h.

DQM patch version for this job.

Definition at line 93 of file DQMEventInfo.h.

Subdetector-specific error summary (float)

Definition at line 94 of file DQMEventInfo.h.

Subdetector-specific etaPhi summary (float)

Definition at line 95 of file DQMEventInfo.h.

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().

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().

# 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().

Definition at line 62 of file DQMEventInfo.h.

Referenced by analyze().

Definition at line 75 of file DQMEventInfo.h.

Referenced by beginLuminosityBlock(), and DQMEventInfo().

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

Definition at line 81 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

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().

Time elapsed since the last event.

Definition at line 86 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

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

Definition at line 87 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

Number of collector updates (TBD)

Definition at line 82 of file DQMEventInfo.h.

Referenced by DQMEventInfo().

The UTC time of the last event.

Definition at line 85 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

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().

The UTC time of the first event processed.

Definition at line 84 of file DQMEventInfo.h.

Referenced by analyze(), and DQMEventInfo().

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.

Definition at line 73 of file DQMEventInfo.h.

Referenced by beginRun(), and DQMEventInfo().

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

Definition at line 90 of file DQMEventInfo.h.

Referenced by DQMEventInfo().