CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 178 of file EdmEventSize.cc.

Constructor & Destructor Documentation

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

Definition at line 180 of file EdmEventSize.cc.

180  :
181  top(itop),
182  uncompressed( "uncompressed", "branch sizes", top, -0.5, - 0.5 + top ),
183  compressed( "compressed", "branch sizes", top, -0.5, - 0.5 + top ),
184  cxAxis(compressed.GetXaxis()),
185  uxAxis(uncompressed.GetXaxis()),
186  x(0) {}

Member Function Documentation

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

Definition at line 188 of file EdmEventSize.cc.

References perftools::EdmEventSize::BranchRecord::compr_size, compressed, cxAxis, perftools::EdmEventSize::BranchRecord::name, top, perftools::EdmEventSize::BranchRecord::uncompr_size, uncompressed, uxAxis, and x.

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

188  {
189  if ( x < top ) {
190  cxAxis->SetBinLabel( x + 1, br.name.c_str() );
191  uxAxis->SetBinLabel( x + 1, br.name.c_str() );
192  compressed.Fill( x, br.compr_size );
193  uncompressed.Fill( x, br.uncompr_size );
194  x++;
195  }
196  }
void perftools::detail::Hist::finalize ( void  )
inline

Definition at line 198 of file EdmEventSize.cc.

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

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

198  {
199  double mn = std::numeric_limits<double>::max();
200  for( int i = 1; i <= top; ++i ) {
201  double cm = compressed.GetMinimum( i ), um = uncompressed.GetMinimum( i );
202  if ( cm > 0 && cm < mn ) mn = cm;
203  if ( um > 0 && um < mn ) mn = um;
204  }
205  mn *= 0.8;
206  double mx = std::max( compressed.GetMaximum(), uncompressed.GetMaximum() );
207  mx *= 1.2;
208  uncompressed.SetMinimum( mn );
209  uncompressed.SetMaximum( mx );
210  compressed.SetMinimum( mn );
211  // compressed.SetMaximum( mx );
212  cxAxis->SetLabelOffset( -0.32 );
213  cxAxis->LabelsOption( "v" );
214  cxAxis->SetLabelSize( 0.03 );
215  uxAxis->SetLabelOffset( -0.32 );
216  uxAxis->LabelsOption( "v" );
217  uxAxis->SetLabelSize( 0.03 );
218  compressed.GetYaxis()->SetTitle( "Bytes" );
219  compressed.SetFillColor( kBlue );
220  compressed.SetLineWidth( 2 );
221  uncompressed.GetYaxis()->SetTitle( "Bytes" );
222  uncompressed.SetFillColor( kRed );
223  uncompressed.SetLineWidth( 2 );
224 
225  }
int i
Definition: DBlmapReader.cc:9

Member Data Documentation

TH1F perftools::detail::Hist::compressed

Definition at line 229 of file EdmEventSize.cc.

Referenced by fill(), finalize(), and perftools::EdmEventSize::produceHistos().

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

Definition at line 230 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

int perftools::detail::Hist::top

Definition at line 227 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

TH1F perftools::detail::Hist::uncompressed

Definition at line 228 of file EdmEventSize.cc.

Referenced by fill(), finalize(), and perftools::EdmEventSize::produceHistos().

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

Definition at line 231 of file EdmEventSize.cc.

Referenced by fill(), and finalize().

int perftools::detail::Hist::x