HeaderTree.h
Go to the documentation of this file.
1 /*
2  * HeaderTree.h
3  *
4  * Created on: Feb 9, 2021
5  * Author: chilgenb
6  */
7 
8 #ifndef GARANA_HEADERTREE_H_
9 #define GARANA_HEADERTREE_H_
10 
11 #include "garana/Base/TreeReader.h"
12 #include <string>
13 
14 namespace garana{
15 
16  class HeaderTree : public TreeReader {
17 
18  public:
19 
20  HeaderTree();
21  HeaderTree(TTree* tree);
22  HeaderTree(TTree* tree, char opt);
23 
24  Int_t const& Run() const;
25  Int_t const& SubRun() const;
26  Int_t const& POT() const;
27  Int_t const& NSpills() const;
28  const std::string* const TreeType() const;
29  TLorentzVector* const& TpcCenter() const;
30  std::string const& Geometry() const;
31  void SetRun(const Int_t run);
32  void SetSubRun(const Int_t subrun);
34 
35  private:
36 
37  bool SetBranchAddresses() override;
38 
39  //leaf types
40  Int_t fRun = -1;
41  Int_t fSubRun = -1;
42  Int_t fPOT = -1;
43  Int_t fNSpills = -1;
44  TLorentzVector* fTpcCenter = nullptr;
49 
50  //branches
51  TBranch* b_Run = nullptr;
52  TBranch* b_SubRun = nullptr;
53  TBranch* b_TreeType = nullptr;
54  TBranch* b_TpcCenter = nullptr;
55  TBranch* b_POT = nullptr;
56  TBranch* b_NSpills = nullptr;
57  TBranch* b_Geometry = nullptr;
58 
59  };//class
60 }//namespace
61 #endif /* HEADERTREE_H_ */
std::string const & Geometry() const
Definition: HeaderTree.cxx:70
TLorentzVector *const & TpcCenter() const
Definition: HeaderTree.cxx:75
Int_t const & SubRun() const
Definition: HeaderTree.cxx:55
TBranch * b_TreeType
Definition: HeaderTree.h:53
std::string string
Definition: nybbler.cc:12
opt
Definition: train.py:196
void SetSubRun(const Int_t subrun)
Definition: HeaderTree.cxx:114
TBranch * b_Run
Definition: HeaderTree.h:51
Int_t const & POT() const
Definition: HeaderTree.cxx:60
std::string fGeometry
Definition: HeaderTree.h:45
bool SetBranchAddresses() override
Definition: HeaderTree.cxx:80
TLorentzVector * fTpcCenter
Definition: HeaderTree.h:44
Int_t const & NSpills() const
Definition: HeaderTree.cxx:65
const std::string *const TreeType() const
Definition: HeaderTree.cxx:32
TBranch * b_NSpills
Definition: HeaderTree.h:56
TBranch * b_Geometry
Definition: HeaderTree.h:57
std::string * fGeometryPtr
Definition: HeaderTree.h:48
TBranch * b_POT
Definition: HeaderTree.h:55
std::string * fTreeTypePtr
Definition: HeaderTree.h:47
std::string fTreeType
Definition: HeaderTree.h:46
Int_t const & Run() const
Definition: HeaderTree.cxx:50
void SetRun(const Int_t run)
Definition: HeaderTree.cxx:105
void SetTreeType(std::string type)
Definition: HeaderTree.cxx:120
TBranch * b_SubRun
Definition: HeaderTree.h:52
TBranch * b_TpcCenter
Definition: HeaderTree.h:54