CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
perftools::EdmEventSize Class Reference

#include <EdmEventSize.h>

Classes

struct  BranchRecord
 the information for each branch More...
 
struct  Error
 generic exception More...
 

Public Types

typedef std::vector< BranchRecordBranches
 

Public Member Functions

void dump (std::ostream &co, bool header=true) const
 dump the ascii table on "co" More...
 
 EdmEventSize ()
 Constructor. More...
 
 EdmEventSize (std::string const &fileName, std::string const &treeName="Events")
 Constructor and parse. More...
 
void formatNames ()
 transform Branch names in "formatted" prodcut identifiers More...
 
void parseFile (std::string const &fileName, std::string const &treeName="Events")
 read file, compute branch size, sort by size More...
 
void produceHistos (std::string const &plot, std::string const &file, int top=0) const
 produce histograms and optionally write them in "file" or as "plot" More...
 
void sortAlpha ()
 sort by name More...
 

Private Attributes

Branches m_branches
 
std::string m_fileName
 
int m_nEvents
 

Detailed Description

Measure the size of each product in an edm::event Provides the output as an ascii table or root histograms

Based on the original implementation by Luca Lista

Algorithm: Measure the size of each branch in a tree as the sum of the sizes of all its baskets Estimate the "size in memory" multipling the actual branch size by its compression factor

Author
Vincenzo Innocente

Definition at line 24 of file EdmEventSize.h.

Member Typedef Documentation

Definition at line 50 of file EdmEventSize.h.

Constructor & Destructor Documentation

perftools::EdmEventSize::EdmEventSize ( )

Constructor.

Definition at line 72 of file EdmEventSize.cc.

perftools::EdmEventSize::EdmEventSize ( std::string const &  fileName,
std::string const &  treeName = "Events" 
)
explicit

Constructor and parse.

Definition at line 75 of file EdmEventSize.cc.

Member Function Documentation

void perftools::EdmEventSize::dump ( std::ostream &  co,
bool  header = true 
) const

dump the ascii table on "co"

Definition at line 166 of file EdmEventSize.cc.

void perftools::EdmEventSize::formatNames ( )

transform Branch names in "formatted" prodcut identifiers

Definition at line 151 of file EdmEventSize.cc.

void perftools::EdmEventSize::parseFile ( std::string const &  fileName,
std::string const &  treeName = "Events" 
)

read file, compute branch size, sort by size

Definition at line 80 of file EdmEventSize.cc.

void perftools::EdmEventSize::produceHistos ( std::string const &  plot,
std::string const &  file,
int  top = 0 
) const

produce histograms and optionally write them in "file" or as "plot"

Definition at line 237 of file EdmEventSize.cc.

void perftools::EdmEventSize::sortAlpha ( )

sort by name

Definition at line 123 of file EdmEventSize.cc.

Member Data Documentation

Branches perftools::EdmEventSize::m_branches
private

Definition at line 75 of file EdmEventSize.h.

std::string perftools::EdmEventSize::m_fileName
private

Definition at line 73 of file EdmEventSize.h.

int perftools::EdmEventSize::m_nEvents
private

Definition at line 74 of file EdmEventSize.h.