CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ROOTFileWriter.h
Go to the documentation of this file.
1 #ifndef __ROOTFILEWRITER_H__
2 #define __ROOTFILEWRITER_H__
3 
4 /*
5 
6 Adam Hunt - Princeton University
7 ahunt@princeton.edu
8 
9 */
10 
12 
13 #include <string>
14 
15 class TFile;
16 class TTree;
17 
18 namespace HCAL_HLX{
19 
20  struct LUMI_SECTION;
21 
23 
24  public:
25 
28 
29  bool OpenFile(const HCAL_HLX::LUMI_SECTION &lumiSection);
30  bool OpenFile(const unsigned int runNumber,
31  const unsigned int sectionNumber);
32 
33  void FillTree(const HCAL_HLX::LUMI_SECTION &localSection);
34  bool CloseFile();
35 
36  void SetMerge( const bool bMerge ){ bMerge_ = bMerge; }
37 
38  protected:
39 
40  void CreateTree();
41  template< class T >
42  void MakeBranch(const T &in, T **out, int HLXNum);
43 
44  void InsertInformation();
45 
46  TFile* m_file;
47  TTree* m_tree;
48 
49  bool bMerge_;
50 
51  };
52 }
53 #endif
bool OpenFile(const HCAL_HLX::LUMI_SECTION &lumiSection)
void SetMerge(const bool bMerge)
void FillTree(const HCAL_HLX::LUMI_SECTION &localSection)
tuple out
Definition: dbtoconf.py:99
void MakeBranch(const T &in, T **out, int HLXNum)