Go to the documentation of this file.00001 #ifndef PerfTools_EdmEventSize_H
00002 #define PerfTools_EdmEventSize_H
00003
00004 #include<string>
00005 #include<vector>
00006 #include<iosfwd>
00007
00008 namespace perftools {
00009
00024 class EdmEventSize {
00025 public:
00026
00028 struct Error {
00029 Error(std::string const & idescr, int icode) :
00030 descr(idescr), code(icode){}
00031 std::string descr;
00032 int code;
00033 };
00034
00036 struct BranchRecord {
00037 BranchRecord() :
00038 compr_size(0.),
00039 uncompr_size(0.) {}
00040 BranchRecord(std::string const & iname,
00041 double compr, double uncompr) :
00042 fullName(iname), name(iname),
00043 compr_size(compr), uncompr_size(uncompr){}
00044 std::string fullName;
00045 std::string name;
00046 double compr_size;
00047 double uncompr_size;
00048 };
00049
00050 typedef std::vector<BranchRecord> Branches;
00051
00053 EdmEventSize();
00055 explicit EdmEventSize(std::string const & fileName, std::string const & treeName="Events");
00056
00058 void parseFile(std::string const & fileName, std::string const & treeName="Events");
00059
00061 void sortAlpha();
00062
00064 void formatNames();
00065
00067 void dump(std::ostream & co, bool header=true) const;
00068
00070 void produceHistos(std::string const & plot, std::string const & file, int top=0) const;
00071
00072 private:
00073 std::string m_fileName;
00074 int m_nEvents;
00075 Branches m_branches;
00076
00077 };
00078
00079 }
00080
00081 #endif // PerfTools_EdmEventSize_H