CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FastTimerService::PlotsPerElement Class Reference

Public Member Functions

void book (DQMStore::IBooker &, std::string const &name, std::string const &title, double range, double resolution, unsigned int lumisections, bool byls)
 
void fill (Resources const &, unsigned int lumisection)
 
void fill_fraction (Resources const &, Resources const &, unsigned int lumisection)
 
 PlotsPerElement ()
 
void reset ()
 

Private Attributes

TH1F * time_real_
 
TProfile * time_real_byls_
 
TH1F * time_thread_
 
TProfile * time_thread_byls_
 

Detailed Description

Definition at line 313 of file FastTimerService.h.

Constructor & Destructor Documentation

FastTimerService::PlotsPerElement::PlotsPerElement ( )

Definition at line 268 of file FastTimerService.cc.

268  :
269  time_thread_(nullptr),
270  time_thread_byls_(nullptr),
271  time_real_(nullptr),
272  time_real_byls_(nullptr)
273 {
274 }

Member Function Documentation

void FastTimerService::PlotsPerElement::book ( DQMStore::IBooker booker,
std::string const &  name,
std::string const &  title,
double  range,
double  resolution,
unsigned int  lumisections,
bool  byls 
)

Definition at line 287 of file FastTimerService.cc.

References create_public_pileup_plots::bins, DQMStore::IBooker::book1D(), DQMStore::IBooker::bookProfile(), cmsPerfStripChart::format, MonitorElement::getTH1F(), MonitorElement::getTProfile(), infinity, createfilelist::int, ctppsDiamondLocalTracks_cfi::resolution, harvestTrackValidationPlots::str, AlCaHLTBitMon_QueryRunRegistry::string, time_real_, time_real_byls_, time_thread_, and time_thread_byls_.

Referenced by FastTimerService::PlotsPerPath::book(), FastTimerService::PlotsPerProcess::book(), and FastTimerService::PlotsPerJob::book().

295 {
296  int bins = (int) std::ceil(range / resolution);
297  std::string y_title = (boost::format("events / %.1f ms") % resolution).str();
298 
299  time_thread_ = booker.book1D(
300  name + " time_thread",
301  title + " processing time (cpu)",
302  bins, 0., range
303  )->getTH1F();
304  time_thread_->StatOverflows(true);
305  time_thread_->SetXTitle("processing time [ms]");
306  time_thread_->SetYTitle(y_title.c_str());
307 
308  time_real_ = booker.book1D(
309  name + " time_real",
310  title + " processing time (real)",
311  bins, 0., range
312  )->getTH1F();
313  time_real_->StatOverflows(true);
314  time_real_->SetXTitle("processing time [ms]");
315  time_real_->SetYTitle(y_title.c_str());
316 
317  if (not byls)
318  return;
319 
321  name + " time_thread_byls",
322  title + " processing time (cpu) vs. lumisection",
323  lumisections, 0.5, lumisections + 0.5,
325  " ")->getTProfile();
326  time_thread_byls_->StatOverflows(true);
327  time_thread_byls_->SetXTitle("lumisection");
328  time_thread_byls_->SetYTitle("processing time [ms]");
329 
330  time_real_byls_ = booker.bookProfile(
331  name + " time_real_byls",
332  title + " processing time (real) vs. lumisection",
333  lumisections, 0.5, lumisections + 0.5,
335  " ")->getTProfile();
336  time_real_byls_->StatOverflows(true);
337  time_real_byls_->SetXTitle("lumisection");
338  time_real_byls_->SetYTitle("processing time [ms]");
339 }
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
const double infinity
format
Some error handling for the usage.
TH1F * getTH1F(void) const
TProfile * getTProfile(void) const
void FastTimerService::PlotsPerElement::fill ( Resources const &  data,
unsigned int  lumisection 
)
void FastTimerService::PlotsPerElement::fill_fraction ( Resources const &  data,
Resources const &  part,
unsigned int  lumisection 
)

Definition at line 358 of file FastTimerService.cc.

References dedxEstimators_cff::fraction, AnalysisDataFormats_SUSYBSMObjects::ms, FastTimerService::Resources::time_real, time_real_, time_real_byls_, FastTimerService::Resources::time_thread, time_thread_, time_thread_byls_, and pileupDistInMC::total.

359 {
360  float total;
361  float fraction;
362 
363  total = ms(data.time_thread);
364  fraction = (total > 0.) ? (ms(part.time_thread) / total) : 0.;
365  if (time_thread_)
366  time_thread_->Fill(total, fraction);
367 
368  if (time_thread_byls_)
369  time_thread_byls_->Fill(lumisection, total, fraction);
370 
371  total = ms(data.time_real);
372  fraction = (total > 0.) ? (ms(part.time_real) / total) : 0.;
373  if (time_real_)
374  time_real_->Fill(total, fraction);
375 
376  if (time_real_byls_)
377  time_real_byls_->Fill(lumisection, total, fraction);
378 }
part
Definition: HCALResponse.h:20
susybsm::MuonSegment ms
Definition: classes.h:31
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
void FastTimerService::PlotsPerElement::reset ( void  )

Member Data Documentation

TH1F* FastTimerService::PlotsPerElement::time_real_
private

Definition at line 325 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TProfile* FastTimerService::PlotsPerElement::time_real_byls_
private

Definition at line 326 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TH1F* FastTimerService::PlotsPerElement::time_thread_
private

Definition at line 323 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().

TProfile* FastTimerService::PlotsPerElement::time_thread_byls_
private

Definition at line 324 of file FastTimerService.h.

Referenced by book(), fill(), fill_fraction(), and reset().