27 cout <<
"Constructor of XmasToDQMEventInfo called...." << endl;
32 gettimeofday(¤tTime_,
NULL);
33 lastAvgTime_ = currentTime_;
37 string eventinfofolder = parameters_.getUntrackedParameter<
string>(
"eventInfoFolder",
"EventInfo") ;
38 string subsystemname = parameters_.getUntrackedParameter<
string>(
"subSystemFolder",
"YourSubsystem") ;
39 string currentfolder = subsystemname +
"/" + eventinfofolder ;
40 cout <<
"currentfolder " << currentfolder << endl;
42 evtRateWindow_ = parameters_.getUntrackedParameter<
double>(
"eventRateWindow", 0.5);
43 if(evtRateWindow_<=0.15) evtRateWindow_=0.15;
44 cout <<
"Event Rate averaged over " << evtRateWindow_ <<
" minutes" << endl;
57 processTimeStamp_->
Fill(getUTCtime(¤tTime_));
59 processTimeStamp_->
Fill(-1);
61 processEvents_->
Fill(pEvent_);
63 processEventRate_->
Fill(-1);
69 processId_->
Fill(gSystem->GetPid());
70 processStartTimeStamp_ =
dbe_->
bookFloat(
"processStartTimeStamp");
71 processStartTimeStamp_->
Fill(getUTCtime(¤tTime_));
80 string subfolder = currentfolder +
"/reportSummaryContents" ;
87 cout<<
"[XmasToDQMEventInfo]: destructor"<<endl;
95 float sec = time.
value() >> 32;
96 float usec = 0xFFFFFFFF & time.
value() ;
102 runStartTimeStamp_->Fill(sec+usec/1000000.);
108 static int icalls = 1;
109 cout <<
"XmasToDQMEventInfo::analyze call = " << icalls << std::endl;
116 std::cout <<
"EventInfo runNumber ... = " << runNumber << std::endl;
119 std::istringstream istrfloat(runNumber);
120 float runNumber_value;
121 istrfloat >> runNumber_value;
122 runId_->Fill(runNumber_value);
125 eventId_->Fill(e.
id().
event());
126 eventTimeStamp_->Fill(e.
time().
value()/(double)0xffffffff);
130 processEvents_->Fill(pEvent_);
132 lastUpdateTime_=currentTime_;
133 gettimeofday(¤tTime_,
NULL);
134 processTimeStamp_->Fill(getUTCtime(¤tTime_));
135 processLatency_->Fill(getUTCtime(&lastUpdateTime_,¤tTime_));
137 float time = getUTCtime(&lastAvgTime_,¤tTime_);
138 if(time>=(evtRateWindow_*60.0)){
139 processEventRate_->Fill((
float)evtRateCount_/time);
141 lastAvgTime_ = currentTime_;
149 double deltaT=(*a).tv_sec*1000.0+(*a).tv_usec/1000.0;
150 if(b!=
NULL) deltaT=(*b).tv_sec*1000.0+(*b).tv_usec/1000.0 - deltaT;
151 return deltaT/1000.0;
EventNumber_t event() const
edm::LuminosityBlockNumber_t luminosityBlock() const
void beginRun(const edm::Run &r, const edm::EventSetup &c)
MonitorElement * bookFloat(const char *name)
Book float.
MonitorElement * bookString(const char *name, const char *value)
Book string.
static ToDqm * instance()
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
virtual ~XmasToDQMEventInfo()
Destructor.
std::string getReleaseVersion()
TimeValue_t value() const
double getUTCtime(timeval *a, timeval *b=NULL)
Timestamp const & beginTime() const
XmasToDQMEventInfo(const edm::ParameterSet &ps)
Constructor.
MonitorElement * bookInt(const char *name)
Book int.
edm::Timestamp time() const
void setCurrentFolder(const std::string &fullpath)