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
ESTrendTask Class Reference

#include <ESTrendTask.h>

Inheritance diagram for ESTrendTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 ESTrendTask (const edm::ParameterSet &ps)
 
virtual ~ESTrendTask ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob (void)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void cleanup (void)
 
void endJob (void)
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 
void reset (void)
 
void setup (void)
 
void shift2Left (TProfile *p, int bins=1)
 
void shift2Right (TProfile *p, int bins=1)
 
void updateTime (const edm::Event &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Attributes

long int current_time_
 
edm::InputTag dccCollections_
 
DQMStoredqmStore_
 
bool enableCleanup_
 
MonitorElementhESFiberErrTrend_
 
MonitorElementhESFiberErrTrendHr_
 
MonitorElementhESRecHitTrend_ [2][2]
 
MonitorElementhESRecHitTrendHr_ [2][2]
 
MonitorElementhESSLinkErrTrend_
 
MonitorElementhESSLinkErrTrendHr_
 
int ievt_
 
bool init_
 
long int last_time_
 
bool mergeRuns_
 
std::string prefixME_
 
edm::InputTag rechitlabel_
 
long int start_time_
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 13 of file ESTrendTask.h.

Constructor & Destructor Documentation

ESTrendTask::ESTrendTask ( const edm::ParameterSet ps)

Definition at line 25 of file ESTrendTask.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, j, and cppFunctionSkipper::operator.

25  {
26 
27  init_ = false;
28 
30 
31  prefixME_ = ps.getUntrackedParameter<string>("prefixME", "EcalPreshower");
32  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
33  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns", false);
34  rechitlabel_ = ps.getParameter<InputTag>("RecHitLabel");
35  dccCollections_ = ps.getParameter<InputTag>("ESDCCCollections");
36 
37  for (int i=0; i<2; ++i)
38  for (int j=0; j<2; ++j) {
39  hESRecHitTrend_[i][j] = 0;
40  hESRecHitTrendHr_[i][j] = 0;
41  }
42 
47 
48  start_time_ = 0;
49  current_time_ = 0;
50  last_time_ = 0;
51 
52 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
MonitorElement * hESRecHitTrendHr_[2][2]
Definition: ESTrendTask.h:77
std::string prefixME_
Definition: ESTrendTask.h:64
MonitorElement * hESSLinkErrTrendHr_
Definition: ESTrendTask.h:78
long int current_time_
Definition: ESTrendTask.h:84
long int start_time_
Definition: ESTrendTask.h:83
MonitorElement * hESRecHitTrend_[2][2]
Definition: ESTrendTask.h:73
bool mergeRuns_
Definition: ESTrendTask.h:68
MonitorElement * hESFiberErrTrend_
Definition: ESTrendTask.h:75
int j
Definition: DBlmapReader.cc:9
long int last_time_
Definition: ESTrendTask.h:85
DQMStore * dqmStore_
Definition: ESTrendTask.h:62
MonitorElement * hESFiberErrTrendHr_
Definition: ESTrendTask.h:79
bool enableCleanup_
Definition: ESTrendTask.h:66
edm::InputTag rechitlabel_
Definition: ESTrendTask.h:70
MonitorElement * hESSLinkErrTrend_
Definition: ESTrendTask.h:74
edm::InputTag dccCollections_
Definition: ESTrendTask.h:71
ESTrendTask::~ESTrendTask ( )
virtual

Definition at line 54 of file ESTrendTask.cc.

54  {
55 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 180 of file ESTrendTask.cc.

References edm::Event::getByLabel(), ESDCCHeaderBlock::getDCCErrors(), ESDCCHeaderBlock::getFEChannelStatus(), getTProfile(), i, j, HcalObjRepresent::setup(), ecaldqm::shift2Right(), and ESDetId::zside().

180  {
181 
182  if ( ! init_ ) this->setup();
183 
184  ievt_++;
185 
186  // Collect time information
187  updateTime(e);
188 
189  long int diff_current_start = current_time_ - start_time_;
190  long int diff_last_start = last_time_ - start_time_;
191  //LogInfo("ESTrendTask") << "time difference is negative in " << ievt_ << " events\n"
192  //<< "\tcurrent - start time = " << diff_current_start
193  //<< ", \tlast - start time = " << diff_last_start << endl;
194 
195  // std::cout << "current_time : " << current_time_ << ", diff : " << diff_current_start << std::endl;
196 
197  // Calculate time interval and bin width
198  // int minuteBinWidth = int(nBasicClusterMinutely_->getTProfile()->GetXaxis()->GetBinWidth(1));
199  int minuteBinWidth = 5;
200  long int minuteBinDiff = diff_current_start/60/minuteBinWidth - diff_last_start/60/minuteBinWidth;
201  long int minuteDiff = (current_time_ - last_time_)/60;
202 
203  // int hourBinWidth = int(nBasicClusterHourly_->getTProfile()->GetXaxis()->GetBinWidth(1));
204  int hourBinWidth = 1;
205  long int hourBinDiff = diff_current_start/3600/hourBinWidth - diff_last_start/3600/hourBinWidth;
206  long int hourDiff = (current_time_ - last_time_)/3600;
207 
208  if (minuteDiff >= minuteBinWidth) {
209  while (minuteDiff >= minuteBinWidth) minuteDiff -= minuteBinWidth;
210  }
211  if (hourDiff >= hourBinWidth) {
212  while (hourDiff >= hourBinWidth) hourDiff -= hourBinWidth;
213  }
214 
215  // ES DCC
216  Int_t slinkCRCErr = 0;
217  Int_t fiberErr = 0;
218  vector<int> fiberStatus;
220  if ( e.getByLabel(dccCollections_, dccs) ) {
221  for (ESRawDataCollection::const_iterator dccItr = dccs->begin(); dccItr != dccs->end(); ++dccItr) {
222  ESDCCHeaderBlock dcc = (*dccItr);
223 
224  if (dcc.getDCCErrors() == 101) slinkCRCErr++;
225 
226  fiberStatus = dcc.getFEChannelStatus();
227  for (unsigned int i=0; i<fiberStatus.size(); ++i) {
228  if (fiberStatus[i]==4 || fiberStatus[i]==8 || fiberStatus[i]==10 || fiberStatus[i]==11 || fiberStatus[i]==12)
229  fiberErr++;
230  }
231 
232  }
233  }
234 
235  shift2Right(hESSLinkErrTrend_->getTProfile(), minuteBinDiff);
236  hESSLinkErrTrend_->Fill(minuteDiff, slinkCRCErr);
237 
238  shift2Right(hESFiberErrTrend_->getTProfile(), minuteBinDiff);
239  hESFiberErrTrend_->Fill(minuteDiff, fiberErr);
240 
242  hESSLinkErrTrendHr_->Fill(hourDiff, slinkCRCErr);
243 
245  hESFiberErrTrendHr_->Fill(hourDiff, fiberErr);
246 
247  // ES RecHits
248  int zside, plane;
249  int nrh[2][2];
250  for (int i = 0; i < 2; i++ )
251  for( int j = 0; j < 2; j++) {
252  nrh[i][j] = 0;
253  }
254 
256  if ( e.getByLabel(rechitlabel_, ESRecHit) ) {
257 
258  for (ESRecHitCollection::const_iterator hitItr = ESRecHit->begin(); hitItr != ESRecHit->end(); ++hitItr) {
259 
260  ESDetId id = ESDetId(hitItr->id());
261 
262  zside = id.zside();
263  plane = id.plane();
264 
265  int i = (zside==1)? 0:1;
266  int j = plane-1;
267 
268  nrh[i][j]++;
269  }
270  } else {
271  LogWarning("ESTrendTask") << rechitlabel_ << " not available";
272  }
273 
274  for (int i=0; i<2; ++i)
275  for (int j=0; j<2; ++j) {
276  shift2Right(hESRecHitTrend_[i][j]->getTProfile(), minuteBinDiff);
277  hESRecHitTrend_[i][j]->Fill(minuteDiff, nrh[i][j]/(1072*32.));
278 
279  shift2Right(hESRecHitTrendHr_[i][j]->getTProfile(), hourBinDiff);
280  hESRecHitTrendHr_[i][j]->Fill(hourDiff, nrh[i][j]/(1072*32.));
281  }
282 
283 }
int i
Definition: DBlmapReader.cc:9
TProfile * getTProfile(std::string name, std::string process, std::string rootfolder, DQMStore *dbe_, bool verb, bool clone)
MonitorElement * hESRecHitTrendHr_[2][2]
Definition: ESTrendTask.h:77
std::vector< T >::const_iterator const_iterator
void shift2Right(TProfile *p, int bins=1)
Definition: ESTrendTask.cc:292
MonitorElement * hESSLinkErrTrendHr_
Definition: ESTrendTask.h:78
long int current_time_
Definition: ESTrendTask.h:84
const std::vector< int > & getFEChannelStatus() const
void Fill(long long x)
void setup(void)
Definition: ESTrendTask.cc:97
long int start_time_
Definition: ESTrendTask.h:83
MonitorElement * hESRecHitTrend_[2][2]
Definition: ESTrendTask.h:73
MonitorElement * hESFiberErrTrend_
Definition: ESTrendTask.h:75
int j
Definition: DBlmapReader.cc:9
long int last_time_
Definition: ESTrendTask.h:85
int zside() const
Definition: ESDetId.h:33
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
MonitorElement * hESFiberErrTrendHr_
Definition: ESTrendTask.h:79
TProfile * getTProfile(void) const
int getDCCErrors() const
void updateTime(const edm::Event &)
Definition: ESTrendTask.cc:285
edm::InputTag rechitlabel_
Definition: ESTrendTask.h:70
MonitorElement * hESSLinkErrTrend_
Definition: ESTrendTask.h:74
edm::InputTag dccCollections_
Definition: ESTrendTask.h:71
void ESTrendTask::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file ESTrendTask.cc.

57  {
58 
59  ievt_ = 0;
60 
61  if ( dqmStore_ ) {
62  dqmStore_->setCurrentFolder(prefixME_ + "/ESTrendTask");
63  dqmStore_->rmdir(prefixME_ + "/ESTrendTask");
64  }
65 
66 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
std::string prefixME_
Definition: ESTrendTask.h:64
DQMStore * dqmStore_
Definition: ESTrendTask.h:62
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void ESTrendTask::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 68 of file ESTrendTask.cc.

References edm::RunBase::beginTime(), and reset().

68  {
69 
70  if ( ! mergeRuns_ ) this->reset();
71 
72  start_time_ = (r.beginTime()).unixTime();
73 
74  //std::cout << "start time : " << start_time_ << std::endl;
75 
76 }
long int start_time_
Definition: ESTrendTask.h:83
bool mergeRuns_
Definition: ESTrendTask.h:68
void reset(void)
Definition: ESTrendTask.cc:82
Timestamp const & beginTime() const
Definition: RunBase.h:43
void ESTrendTask::cleanup ( void  )
protected

Definition at line 143 of file ESTrendTask.cc.

References i, and j.

143  {
144 
145  if ( ! init_ ) return;
146 
147  if ( dqmStore_ ) {
148  dqmStore_->setCurrentFolder(prefixME_ + "/ESTrendTask");
149 
150  for (int i=0 ; i<2; ++i)
151  for (int j=0 ; j<2; ++j) {
152  if (hESRecHitTrend_[i][j]) dqmStore_->removeElement(hESRecHitTrend_[i][j]->getName());
153  hESRecHitTrend_[i][j] = 0;
154  if (hESRecHitTrendHr_[i][j]) dqmStore_->removeElement(hESRecHitTrendHr_[i][j]->getName());
155  hESRecHitTrendHr_[i][j] = 0;
156  }
157 
159  hESSLinkErrTrend_ = 0;
161  hESFiberErrTrend_ = 0;
166  }
167 
168  init_ = false;
169 
170 }
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * hESRecHitTrendHr_[2][2]
Definition: ESTrendTask.h:77
std::string prefixME_
Definition: ESTrendTask.h:64
MonitorElement * hESSLinkErrTrendHr_
Definition: ESTrendTask.h:78
MonitorElement * hESRecHitTrend_[2][2]
Definition: ESTrendTask.h:73
void removeElement(const std::string &name)
Definition: DQMStore.cc:2577
MonitorElement * hESFiberErrTrend_
Definition: ESTrendTask.h:75
int j
Definition: DBlmapReader.cc:9
DQMStore * dqmStore_
Definition: ESTrendTask.h:62
MonitorElement * hESFiberErrTrendHr_
Definition: ESTrendTask.h:79
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * hESSLinkErrTrend_
Definition: ESTrendTask.h:74
void ESTrendTask::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 172 of file ESTrendTask.cc.

References edm::cleanup().

172  {
173 
174  LogInfo("ESTrendTask") << "analyzed " << ievt_ << " events";
175 
176  if ( enableCleanup_ ) this->cleanup();
177 
178 }
bool enableCleanup_
Definition: ESTrendTask.h:66
void cleanup(void)
Definition: ESTrendTask.cc:143
void ESTrendTask::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 78 of file ESTrendTask.cc.

78  {
79 
80 }
void ESTrendTask::reset ( void  )
protected

Definition at line 82 of file ESTrendTask.cc.

References i, and j.

82  {
83 
84  for (int i=0 ; i<2; ++i)
85  for (int j=0 ; j<2; ++j) {
88  }
89 
94 
95 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * hESRecHitTrendHr_[2][2]
Definition: ESTrendTask.h:77
MonitorElement * hESSLinkErrTrendHr_
Definition: ESTrendTask.h:78
MonitorElement * hESRecHitTrend_[2][2]
Definition: ESTrendTask.h:73
MonitorElement * hESFiberErrTrend_
Definition: ESTrendTask.h:75
int j
Definition: DBlmapReader.cc:9
MonitorElement * hESFiberErrTrendHr_
Definition: ESTrendTask.h:79
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * hESSLinkErrTrend_
Definition: ESTrendTask.h:74
void ESTrendTask::setup ( void  )
protected

Definition at line 97 of file ESTrendTask.cc.

References timingPdfMaker::histo, i, and j.

97  {
98 
99  init_ = true;
100 
101  char histo[200];
102 
103  if ( dqmStore_ ) {
104  dqmStore_->setCurrentFolder(prefixME_ + "/ESTrendTask");
105 
106  for (int i=0 ; i<2; ++i)
107  for (int j=0 ; j<2; ++j) {
108  int iz = (i==0)? 1:-1;
109  sprintf(histo, "ES Trending RH Occ per 5 mins Z %d P %d", iz, j+1);
110  hESRecHitTrend_[i][j] = dqmStore_->bookProfile(histo, histo, 36, 0.0, 180.0, 100, 0.0, 1.0e6, "s");
111  hESRecHitTrend_[i][j]->setAxisTitle("Elapse time (Minutes)", 1);
112  hESRecHitTrend_[i][j]->setAxisTitle("ES RecHit Occupancy / 5 minutes", 2);
113 
114  sprintf(histo, "ES Trending RH Occ per hour Z %d P %d", iz, j+1);
115  hESRecHitTrendHr_[i][j] = dqmStore_->bookProfile(histo, histo, 24, 0.0, 24.0, 100, 0.0, 1.0e6, "s");
116  hESRecHitTrendHr_[i][j]->setAxisTitle("Elapse time (Hours)", 1);
117  hESRecHitTrendHr_[i][j]->setAxisTitle("ES RecHit Occupancy / hour", 2);
118  }
119 
120  sprintf(histo, "ES Trending SLink CRC Error per 5 mins");
121  hESSLinkErrTrend_ = dqmStore_->bookProfile(histo, histo, 36, 0.0, 180.0, 100, 0.0, 1.0e6, "s");
122  hESSLinkErrTrend_->setAxisTitle("Elapse time (Minutes)", 1);
123  hESSLinkErrTrend_->setAxisTitle("ES SLink CRC Err / 5 minutes", 2);
124 
125  sprintf(histo, "ES Trending Fiber Error per 5 mins");
126  hESFiberErrTrend_ = dqmStore_->bookProfile(histo, histo, 36, 0.0, 180.0, 100, 0.0, 1.0e6, "s");
127  hESFiberErrTrend_->setAxisTitle("Elapse time (Minutes)", 1);
128  hESFiberErrTrend_->setAxisTitle("ES Fiber Err / 5 minutes", 2);
129 
130  sprintf(histo, "ES Trending SLink CRC Error per hour");
131  hESSLinkErrTrendHr_ = dqmStore_->bookProfile(histo, histo, 24, 0.0, 24.0, 100, 0.0, 1.0e6, "s");
132  hESSLinkErrTrendHr_->setAxisTitle("Elapse time (Hours)", 1);
133  hESSLinkErrTrendHr_->setAxisTitle("ES SLink CRC Err / hour", 2);
134 
135  sprintf(histo, "ES Trending Fiber Error per hour");
136  hESFiberErrTrendHr_ = dqmStore_->bookProfile(histo, histo, 24, 0.0, 24.0, 100, 0.0, 1.0e6, "s");
137  hESFiberErrTrendHr_->setAxisTitle("Elapse time (Hours)", 1);
138  hESFiberErrTrendHr_->setAxisTitle("ES Fiber Err / hour", 2);
139  }
140 
141 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * hESRecHitTrendHr_[2][2]
Definition: ESTrendTask.h:77
std::string prefixME_
Definition: ESTrendTask.h:64
MonitorElement * hESSLinkErrTrendHr_
Definition: ESTrendTask.h:78
MonitorElement * hESRecHitTrend_[2][2]
Definition: ESTrendTask.h:73
MonitorElement * hESFiberErrTrend_
Definition: ESTrendTask.h:75
int j
Definition: DBlmapReader.cc:9
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1036
DQMStore * dqmStore_
Definition: ESTrendTask.h:62
MonitorElement * hESFiberErrTrendHr_
Definition: ESTrendTask.h:79
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * hESSLinkErrTrend_
Definition: ESTrendTask.h:74
void ESTrendTask::shift2Left ( TProfile *  p,
int  bins = 1 
)
protected

Definition at line 319 of file ESTrendTask.cc.

References i.

319  {
320 
321  if(bins <= 0) return;
322 
323  if(!p->GetSumw2()) p->Sumw2();
324  int nBins = p->GetXaxis()->GetNbins();
325 
326  // by shifting n bin to the left, the number of entries are
327  // reduced by the number in n bins including the underflow bin.
328  double nentries = p->GetEntries();
329  for(int i=0; i<bins; i++) nentries -= p->GetBinEntries(i);
330  p->SetEntries(nentries);
331 
332  // the first bin goes to underflow
333  // each bin moves to the right
334 
335  TArrayD* sumw2 = p->GetSumw2();
336 
337  for(int i=0; i<=nBins+1-bins; i++) {
338  // GetBinContent return binContent/binEntries
339  p->SetBinContent(i, p->GetBinContent(i+bins)*p->GetBinEntries(i+bins));
340  p->SetBinEntries(i,p->GetBinEntries(i+bins));
341  sumw2->SetAt(sumw2->GetAt(i+bins),i);
342  }
343 
344 }
int i
Definition: DBlmapReader.cc:9
void ESTrendTask::shift2Right ( TProfile *  p,
int  bins = 1 
)
protected

Definition at line 292 of file ESTrendTask.cc.

References i.

292  {
293 
294  if(bins <= 0) return;
295 
296  if(!p->GetSumw2()) p->Sumw2();
297  int nBins = p->GetXaxis()->GetNbins();
298 
299  // by shifting n bin to the right, the number of entries are
300  // reduced by the number in n bins including the overflow bin.
301  double nentries = p->GetEntries();
302  for(int i=0; i<bins; i++) nentries -= p->GetBinEntries(nBins+1-bins);
303  p->SetEntries(nentries);
304 
305  // the last bin goes to overflow
306  // each bin moves to the right
307 
308  TArrayD* sumw2 = p->GetSumw2();
309 
310  for(int i=nBins+1; i>bins; i--) {
311  // GetBinContent return binContent/binEntries
312  p->SetBinContent(i, p->GetBinContent(i-bins)*p->GetBinEntries(i-bins));
313  p->SetBinEntries(i,p->GetBinEntries(i-bins));
314  sumw2->SetAt(sumw2->GetAt(i-bins),i);
315  }
316 
317 }
int i
Definition: DBlmapReader.cc:9
void ESTrendTask::updateTime ( const edm::Event e)
protected

Definition at line 285 of file ESTrendTask.cc.

References edm::EventBase::time(), and edm::Timestamp::unixTime().

285  {
286 
288  current_time_ = e.time().unixTime();
289 
290 }
long int current_time_
Definition: ESTrendTask.h:84
unsigned int unixTime() const
Time in seconds since January 1, 1970.
Definition: Timestamp.h:37
long int last_time_
Definition: ESTrendTask.h:85
edm::Timestamp time() const
Definition: EventBase.h:57

Member Data Documentation

long int ESTrendTask::current_time_
private

Definition at line 84 of file ESTrendTask.h.

edm::InputTag ESTrendTask::dccCollections_
private

Definition at line 71 of file ESTrendTask.h.

DQMStore* ESTrendTask::dqmStore_
private

Definition at line 62 of file ESTrendTask.h.

bool ESTrendTask::enableCleanup_
private

Definition at line 66 of file ESTrendTask.h.

MonitorElement* ESTrendTask::hESFiberErrTrend_
private

Definition at line 75 of file ESTrendTask.h.

MonitorElement* ESTrendTask::hESFiberErrTrendHr_
private

Definition at line 79 of file ESTrendTask.h.

MonitorElement* ESTrendTask::hESRecHitTrend_[2][2]
private

Definition at line 73 of file ESTrendTask.h.

MonitorElement* ESTrendTask::hESRecHitTrendHr_[2][2]
private

Definition at line 77 of file ESTrendTask.h.

MonitorElement* ESTrendTask::hESSLinkErrTrend_
private

Definition at line 74 of file ESTrendTask.h.

MonitorElement* ESTrendTask::hESSLinkErrTrendHr_
private

Definition at line 78 of file ESTrendTask.h.

int ESTrendTask::ievt_
private

Definition at line 60 of file ESTrendTask.h.

bool ESTrendTask::init_
private

Definition at line 81 of file ESTrendTask.h.

long int ESTrendTask::last_time_
private

Definition at line 85 of file ESTrendTask.h.

bool ESTrendTask::mergeRuns_
private

Definition at line 68 of file ESTrendTask.h.

std::string ESTrendTask::prefixME_
private

Definition at line 64 of file ESTrendTask.h.

edm::InputTag ESTrendTask::rechitlabel_
private

Definition at line 70 of file ESTrendTask.h.

long int ESTrendTask::start_time_
private

Definition at line 83 of file ESTrendTask.h.