Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:08:57

0001 #ifndef CommonAnalyzer_h
0002 #define CommonAnalyzer_h
0003 
0004 #include <string>
0005 #include <vector>
0006 
0007 class TFile;
0008 class TObject;
0009 class TNamed;
0010 class TH1F;
0011 
0012 class CommonAnalyzer {
0013 public:
0014   CommonAnalyzer(TFile* file, const char* run, const char* mod, const char* path = "", const char* prefix = "");
0015   CommonAnalyzer(const CommonAnalyzer& dtca);
0016 
0017   CommonAnalyzer& operator=(const CommonAnalyzer& dtca);
0018 
0019   void setRunNumber(const char* run);
0020   void setFile(TFile* file);
0021   void setModule(const char* mod);
0022   void setPath(const char* path);
0023   void setPrefix(const char* prefix);
0024 
0025   const std::string& getRunNumber() const;
0026   const std::string& getModule() const;
0027   const std::string& getPath() const;
0028   const std::string& getPrefix() const;
0029 
0030   const std::vector<unsigned int> getRunList() const;
0031   const std::vector<unsigned int> getFillList() const;
0032 
0033   TObject* getObject(const char* name) const;
0034   TNamed* getObjectWithSuffix(const char* name, const char* suffix = "") const;
0035 
0036   TH1F* getBinomialRatio(const CommonAnalyzer& denom, const char* name, const int rebin = -1) const;
0037 
0038 private:
0039   const std::vector<unsigned int> getList(const char* what) const;
0040 
0041   TFile* _file;
0042   std::string _runnumber;
0043   std::string _module;
0044   std::string _path;
0045   std::string _prefix;
0046 };
0047 
0048 #endif  // CommonAnalyzer_h