CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/RecoLuminosity/ROOTSchema/interface/ROOTFileReader.h

Go to the documentation of this file.
00001 #ifndef _ROOTFILEREADER_H_
00002 #define _ROOTFILEREADER_H_
00003 
00004 #include "RecoLuminosity/ROOTSchema/interface/ROOTFileBase.h"
00005 
00006 // STL Headers
00007 #include <string>
00008 #include <sstream>
00009 #include <iomanip>
00010 #include <vector>
00011 
00012 class TChain;
00013 class TBranch;
00014 
00015 
00016 
00017 namespace HCAL_HLX{
00018 
00019   struct LUMI_SECTION;
00020  
00021   class ROOTFileReader: public ROOTFileBase {
00022     
00023   public:
00024     ROOTFileReader();
00025    ~ROOTFileReader();
00026    
00027     // For manual replacment of files.
00028     int SetFileName(const std::string &fileName);
00029     int CreateFileNameList(); // Call after SetDir.
00030 
00031     int GetEntry(int entry);
00032     int GetLumiSection(HCAL_HLX::LUMI_SECTION& section);
00033 
00034     unsigned int GetEntries();
00035     
00036   private:    
00037 
00038     int ReplaceFile(const std::vector< std::string > &fileNames);
00039     void CreateTree();
00040 
00041     TChain *mChain_;
00042 
00043     // Branches
00044     // LUMI_SECTION
00045     TBranch *b_Header;
00046     TBranch *b_Summary;
00047     TBranch *b_Detail;
00048     
00049     static const unsigned int NUM_HLXS = 36;
00050 
00051     TBranch *b_ETSum[NUM_HLXS];
00052     TBranch *b_Occupancy[NUM_HLXS];
00053     TBranch *b_LHC[NUM_HLXS];
00054 
00055   };
00056 }
00057 
00058 #endif