CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
perftools::detail::Hist Struct Reference

Public Member Functions

void fill (EdmEventSize::BranchRecord const &br)
 
void finalize ()
 
 Hist (int itop)
 

Public Attributes

TH1F compressed
 
TAxis * cxAxis
 
int top
 
TH1F uncompressed
 
TAxis * uxAxis
 
int x
 

Detailed Description

Definition at line 170 of file EdmEventSize.cc.

Constructor & Destructor Documentation

◆ Hist()

perftools::detail::Hist::Hist ( int  itop)
inlineexplicit

Definition at line 171 of file EdmEventSize.cc.

172  : top(itop),
173  uncompressed("uncompressed", "branch sizes", top, -0.5, -0.5 + top),
174  compressed("compressed", "branch sizes", top, -0.5, -0.5 + top),
175  cxAxis(compressed.GetXaxis()),
176  uxAxis(uncompressed.GetXaxis()),
177  x(0) {}

Member Function Documentation

◆ fill()

void perftools::detail::Hist::fill ( EdmEventSize::BranchRecord const &  br)
inline

Definition at line 179 of file EdmEventSize.cc.

179  {
180  if (x < top) {
181  cxAxis->SetBinLabel(x + 1, br.name.c_str());
182  uxAxis->SetBinLabel(x + 1, br.name.c_str());
183  compressed.Fill(x, br.compr_size);
184  uncompressed.Fill(x, br.uncompr_size);
185  x++;
186  }
187  }

References beamvalidation::br, compressed, cxAxis, top, uncompressed, uxAxis, and x.

Referenced by perftools::EdmEventSize::produceHistos().

◆ finalize()

void perftools::detail::Hist::finalize ( void  )
inline

Definition at line 189 of file EdmEventSize.cc.

189  {
190  double mn = std::numeric_limits<double>::max();
191  for (int i = 1; i <= top; ++i) {
192  double cm = compressed.GetMinimum(i), um = uncompressed.GetMinimum(i);
193  if (cm > 0 && cm < mn)
194  mn = cm;
195  if (um > 0 && um < mn)
196  mn = um;
197  }
198  mn *= 0.8;
199  double mx = std::max(compressed.GetMaximum(), uncompressed.GetMaximum());
200  mx *= 1.2;
201  uncompressed.SetMinimum(mn);
202  uncompressed.SetMaximum(mx);
203  compressed.SetMinimum(mn);
204  // compressed.SetMaximum( mx );
205  cxAxis->SetLabelOffset(-0.32);
206  cxAxis->LabelsOption("v");
207  cxAxis->SetLabelSize(0.03);
208  uxAxis->SetLabelOffset(-0.32);
209  uxAxis->LabelsOption("v");
210  uxAxis->SetLabelSize(0.03);
211  compressed.GetYaxis()->SetTitle("Bytes");
212  compressed.SetFillColor(kBlue);
213  compressed.SetLineWidth(2);
214  uncompressed.GetYaxis()->SetTitle("Bytes");
215  uncompressed.SetFillColor(kRed);
216  uncompressed.SetLineWidth(2);
217  }

References compressed, cxAxis, mps_fire::i, SiStripPI::max, top, uncompressed, and uxAxis.

Member Data Documentation

◆ compressed

TH1F perftools::detail::Hist::compressed

Definition at line 221 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

◆ cxAxis

TAxis* perftools::detail::Hist::cxAxis

Definition at line 222 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

◆ top

int perftools::detail::Hist::top

Definition at line 219 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

◆ uncompressed

TH1F perftools::detail::Hist::uncompressed

Definition at line 220 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

◆ uxAxis

TAxis* perftools::detail::Hist::uxAxis

Definition at line 223 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

◆ x

int perftools::detail::Hist::x
perftools::detail::Hist::uxAxis
TAxis * uxAxis
Definition: EdmEventSize.cc:223
mps_fire.i
i
Definition: mps_fire.py:428
perftools::detail::Hist::top
int top
Definition: EdmEventSize.cc:219
perftools::detail::Hist::compressed
TH1F compressed
Definition: EdmEventSize.cc:221
perftools::detail::Hist::cxAxis
TAxis * cxAxis
Definition: EdmEventSize.cc:222
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
beamvalidation.br
br
Definition: beamvalidation.py:398
perftools::detail::Hist::uncompressed
TH1F uncompressed
Definition: EdmEventSize.cc:220
perftools::detail::Hist::x
int x
Definition: EdmEventSize.cc:225