CMS 3D CMS Logo

EdmEventSize.h
Go to the documentation of this file.
1 #ifndef PerfTools_EdmEventSize_H
2 #define PerfTools_EdmEventSize_H
3 
4 #include <string>
5 #include <vector>
6 #include <iosfwd>
7 
8 namespace perftools {
9 
24  class EdmEventSize {
25  public:
27  struct Error {
28  Error(std::string const& idescr, int icode) : descr(idescr), code(icode) {}
30  int code;
31  };
32 
34  struct BranchRecord {
36  BranchRecord(std::string const& iname, double compr, double uncompr)
37  : fullName(iname), name(iname), compr_size(compr), uncompr_size(uncompr) {}
40  double compr_size;
41  double uncompr_size;
42  };
43 
44  typedef std::vector<BranchRecord> Branches;
45 
47  EdmEventSize();
49  explicit EdmEventSize(std::string const& fileName, std::string const& treeName = "Events");
50 
52  void parseFile(std::string const& fileName, std::string const& treeName = "Events");
53 
55  void sortAlpha();
56 
58  void formatNames();
59 
61  void dump(std::ostream& co, bool header = true) const;
62 
64  void produceHistos(std::string const& plot, std::string const& file, int top = 0) const;
65 
66  private:
68  int m_nEvents;
70  };
71 
72 } // namespace perftools
73 
74 #endif // PerfTools_EdmEventSize_H
perftools::EdmEventSize::Error
generic exception
Definition: EdmEventSize.h:27
perftools::EdmEventSize::BranchRecord::BranchRecord
BranchRecord()
Definition: EdmEventSize.h:35
perftools::EdmEventSize
Definition: EdmEventSize.h:24
perftools::EdmEventSize::BranchRecord::compr_size
double compr_size
Definition: EdmEventSize.h:40
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
perftools::EdmEventSize::formatNames
void formatNames()
transform Branch names in "formatted" prodcut identifiers
Definition: EdmEventSize.cc:151
plotFactory.plot
plot
Definition: plotFactory.py:109
perftools::EdmEventSize::Error::Error
Error(std::string const &idescr, int icode)
Definition: EdmEventSize.h:28
perftools::EdmEventSize::parseFile
void parseFile(std::string const &fileName, std::string const &treeName="Events")
read file, compute branch size, sort by size
Definition: EdmEventSize.cc:78
perftools::EdmEventSize::EdmEventSize
EdmEventSize()
Constructor.
Definition: EdmEventSize.cc:72
perftools::EdmEventSize::Error::descr
std::string descr
Definition: EdmEventSize.h:29
cms::cuda::co
__host__ __device__ VT * co
Definition: prefixScan.h:47
perftools::EdmEventSize::sortAlpha
void sortAlpha()
sort by name
Definition: EdmEventSize.cc:122
perftools::EdmEventSize::Branches
std::vector< BranchRecord > Branches
Definition: EdmEventSize.h:44
perftools::EdmEventSize::BranchRecord::name
std::string name
Definition: EdmEventSize.h:39
perftools::EdmEventSize::m_nEvents
int m_nEvents
Definition: EdmEventSize.h:68
perftools::EdmEventSize::BranchRecord
the information for each branch
Definition: EdmEventSize.h:34
geometryDiff.file
file
Definition: geometryDiff.py:13
perftools::EdmEventSize::BranchRecord::BranchRecord
BranchRecord(std::string const &iname, double compr, double uncompr)
Definition: EdmEventSize.h:36
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
perftools::EdmEventSize::m_branches
Branches m_branches
Definition: EdmEventSize.h:69
perftools::EdmEventSize::BranchRecord::fullName
std::string fullName
Definition: EdmEventSize.h:38
perftools::EdmEventSize::dump
void dump(std::ostream &co, bool header=true) const
dump the ascii table on "co"
Definition: EdmEventSize.cc:160
perftools::EdmEventSize::m_fileName
std::string m_fileName
Definition: EdmEventSize.h:67
perftools
Definition: EdmEventSize.h:8
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:291
perftools::EdmEventSize::BranchRecord::uncompr_size
double uncompr_size
Definition: EdmEventSize.h:41
perftools::EdmEventSize::produceHistos
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"
Definition: EdmEventSize.cc:230
perftools::EdmEventSize::Error::code
int code
Definition: EdmEventSize.h:30