#include <EdmEventSize.h>
Classes | |
struct | BranchRecord |
the information for each branch More... | |
struct | Error |
generic exception More... | |
Public Types | |
typedef std::vector< BranchRecord > | Branches |
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 |
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
Definition at line 24 of file EdmEventSize.h.
typedef std::vector<BranchRecord> perftools::EdmEventSize::Branches |
Definition at line 50 of file EdmEventSize.h.
perftools::EdmEventSize::EdmEventSize | ( | ) |
|
explicit |
Constructor and parse.
Definition at line 76 of file EdmEventSize.cc.
References parseFile().
void perftools::EdmEventSize::dump | ( | std::ostream & | co, |
bool | header = true |
||
) | const |
dump the ascii table on "co"
Definition at line 167 of file EdmEventSize.cc.
References perftools::detail::dump(), m_branches, m_fileName, and m_nEvents.
void perftools::EdmEventSize::formatNames | ( | ) |
transform Branch names in "formatted" prodcut identifiers
Definition at line 152 of file EdmEventSize.cc.
References m_branches, and perftools::detail::shorterName().
void perftools::EdmEventSize::parseFile | ( | std::string const & | fileName, |
std::string const & | treeName = "Events" |
||
) |
read file, compute branch size, sort by size
Definition at line 81 of file EdmEventSize.cc.
References perftools::EdmEventSize::BranchRecord::compr_size, patZpeak::events, mergeVDriftHistosByStation::file, MillePedeFileConverter_cfg::fileName, i, m_branches, m_fileName, m_nEvents, gen::n, mergeVDriftHistosByStation::name, python.connectstrParser::o, alignCSCRings::s, python.multivaluedict::sort(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by EdmEventSize().
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 238 of file EdmEventSize.cc.
References EnergyCorrector::c, perftools::detail::Hist::compressed, f, perftools::detail::Hist::fill(), perftools::detail::Hist::finalize(), h, m_branches, and perftools::detail::Hist::uncompressed.
void perftools::EdmEventSize::sortAlpha | ( | ) |
sort by name
Definition at line 124 of file EdmEventSize.cc.
References m_branches, perftools::EdmEventSize::BranchRecord::name, and python.multivaluedict::sort().
|
private |
Definition at line 75 of file EdmEventSize.h.
Referenced by dump(), formatNames(), parseFile(), produceHistos(), and sortAlpha().
|
private |
Definition at line 73 of file EdmEventSize.h.
Referenced by dump(), and parseFile().
|
private |
Definition at line 74 of file EdmEventSize.h.
Referenced by dump(), and parseFile().