CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ROOTFileBase.h
Go to the documentation of this file.
1 #ifndef __ROOTFILEBASE_H__
2 #define __ROOTFILEBASE_H__
3 
4 /*
5 
6 Adam Hunt - Princeton University
7 ahunt@princeton.edu
8 
9 */
10 
11 #include <string>
12 #include <sstream>
13 
14 namespace HCAL_HLX{
15 
16  struct LUMI_SECTION;
17 
18  struct LUMI_SECTION_HEADER;
19  struct LUMI_SUMMARY;
20  struct LUMI_DETAIL;
21 
22  struct ET_SUM_SECTION;
23  struct OCCUPANCY_SECTION;
24  struct LHC_SECTION;
25 
26  class ROOTFileBase{
27 
28  public:
29 
30  ROOTFileBase();
31  virtual ~ROOTFileBase();
32 
33  void SetDir( const std::string &dir );
34 
35  void SetFileType( const std::string &type );
36  void SetDate( const std::string &date);
37 
38  void SetFileName(const HCAL_HLX::LUMI_SECTION &lumiSection);
39 
40  void SetFileName(unsigned int runNumber,
41  unsigned int sectionNumber);
42 
43  std::string GetDir(){ return dirName_; }
44  std::string GetFileName(){ return fileName_; }
45 
46  void SetEtSumOnly( bool bEtSumOnly );
47 
48  protected:
49 
50  void Init();
51  void CleanUp();
52 
53  virtual void CreateTree() = 0;
54 
56 
60 
64 
65  std::string filePrefix_;
66  std::string fileName_;
67  std::string dirName_;
68 
70  std::string date_;
71  std::string fileType_;
72  };
73 }
74 #endif
std::string GetFileName()
Definition: ROOTFileBase.h:44
HCAL_HLX::LUMI_SECTION * lumiSection_
Definition: ROOTFileBase.h:55
type
Definition: HCALResponse.h:22
HCAL_HLX::LUMI_DETAIL * Detail_
Definition: ROOTFileBase.h:59
void SetFileName(const HCAL_HLX::LUMI_SECTION &lumiSection)
Definition: ROOTFileBase.cc:70
HCAL_HLX::LUMI_SUMMARY * Summary_
Definition: ROOTFileBase.h:58
void SetFileType(const std::string &type)
Definition: ROOTFileBase.cc:45
virtual void CreateTree()=0
HCAL_HLX::LHC_SECTION * LHCPtr_[36]
Definition: ROOTFileBase.h:63
HCAL_HLX::OCCUPANCY_SECTION * OccupancyPtr_[36]
Definition: ROOTFileBase.h:62
void SetDir(const std::string &dir)
Definition: ROOTFileBase.cc:40
HCAL_HLX::LUMI_SECTION_HEADER * Header_
Definition: ROOTFileBase.h:57
HCAL_HLX::ET_SUM_SECTION * EtSumPtr_[36]
Definition: ROOTFileBase.h:61
std::string GetDir()
Definition: ROOTFileBase.h:43
void SetEtSumOnly(bool bEtSumOnly)
Definition: ROOTFileBase.cc:76
std::string filePrefix_
Definition: ROOTFileBase.h:65
dbl *** dir
Definition: mlp_gen.cc:35
void SetDate(const std::string &date)
Definition: ROOTFileBase.cc:50