CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Error(std::string const &idescr, int icode)
Definition: EdmEventSize.h:28
void dump(std::ostream &co, bool header=true) const
dump the ascii table on &quot;co&quot;
BranchRecord(std::string const &iname, double compr, double uncompr)
Definition: EdmEventSize.h:36
void parseFile(std::string const &fileName, std::string const &treeName="Events")
read file, compute branch size, sort by size
Definition: EdmEventSize.cc:78
__host__ __device__ VT * co
Definition: prefixScan.h:47
EdmEventSize()
Constructor.
Definition: EdmEventSize.cc:72
def plot
Definition: bigModule.py:18
the information for each branch
Definition: EdmEventSize.h:34
void formatNames()
transform Branch names in &quot;formatted&quot; prodcut identifiers
void sortAlpha()
sort by name
std::vector< BranchRecord > Branches
Definition: EdmEventSize.h:44
void produceHistos(std::string const &plot, std::string const &file, int top=0) const
produce histograms and optionally write them in &quot;file&quot; or as &quot;plot&quot;