Public Member Functions | Protected Member Functions | List of all members
garana::FlatDisplayTree Class Reference

#include <FlatDisplayTree.h>

Inheritance diagram for garana::FlatDisplayTree:
garana::DisplayTree garana::TreeReader

Public Member Functions

 FlatDisplayTree ()
 
 FlatDisplayTree (TTree *tree)
 
 FlatDisplayTree (TTree *tree, char opt)
 
- Public Member Functions inherited from garana::DisplayTree
virtual ~DisplayTree ()
 
- Public Member Functions inherited from garana::TreeReader
virtual ~TreeReader ()
 
void SetupRead (TTree *tree)
 
TTree * GetInputTree ()
 
size_t NEntries () const
 
virtual void GetEntry (const UInt_t &ientry)
 
Int_t Event () const
 
const TObjArray * GetBranchList () const
 
void Fill ()
 
void Write ()
 
void CheckOpt (char opt)
 
bool BlockWrite () const
 

Protected Member Functions

bool SetBranchAddresses () override
 
void SetVecs ()
 
void ClearVecs ()
 

Additional Inherited Members

- Protected Attributes inherited from garana::TreeReader
const std::string treename
 
char fOpt = 'r'
 
TTree * fTreeIn = nullptr
 pointer to the analyzed TTree or TChain More...
 
UInt_t fCurrentEntry = UINT_MAX
 
TBranch * b_Event = nullptr
 
Int_t fEvent = -1
 event number for tree entry More...
 

Detailed Description

Definition at line 17 of file FlatDisplayTree.h.

Constructor & Destructor Documentation

garana::FlatDisplayTree::FlatDisplayTree ( )
FlatDisplayTree::FlatDisplayTree ( TTree *  tree)

Definition at line 12 of file FlatDisplayTree.cxx.

13 {
14  SetupRead(tree);
15 }
void SetupRead(TTree *tree)
Definition: TreeReader.cxx:6
FlatDisplayTree::FlatDisplayTree ( TTree *  tree,
char  opt 
)

Definition at line 17 of file FlatDisplayTree.cxx.

18 {
19  CheckOpt(opt);//sets TreeReader::fOpt
20 
21  if(fOpt=='r'){
22  std::cout << "constructed FlatDisplayTree object in read-only mode" << std::endl;
23  SetupRead(tree);
24  }
25  else {
26  std::cout << "constructed FlatDisplayTree object in write mode" << std::endl;
27  fTreeIn = tree;
29  }
30 
31 }
opt
Definition: train.py:196
TTree * fTreeIn
pointer to the analyzed TTree or TChain
Definition: TreeReader.h:51
void CheckOpt(char opt)
Definition: TreeReader.cxx:67
void SetupRead(TTree *tree)
Definition: TreeReader.cxx:6
bool SetBranchAddresses() override
QTextStream & endl(QTextStream &s)

Member Function Documentation

void FlatDisplayTree::ClearVecs ( )
protected

Definition at line 65 of file FlatDisplayTree.cxx.

65  {
66 
67 
68 
69  }
bool FlatDisplayTree::SetBranchAddresses ( )
overrideprotectedvirtual

Implements garana::TreeReader.

Definition at line 39 of file FlatDisplayTree.cxx.

39  {
40 
41 std::cout << "FlatDisplayTree SetBranchAddresses()" << std::endl;
42 
43  if(fOpt=='r'){
44  fTreeIn->SetBranchAddress("Event", &fEvent, &b_Event );
45 
46  }
47 
48 
49  if(fOpt=='w'){
50 
51  fTreeIn->Branch("Event", &fEvent, "Event/I");
52 
53  }
54 
55  return true;
56 }
TTree * fTreeIn
pointer to the analyzed TTree or TChain
Definition: TreeReader.h:51
TBranch * b_Event
Definition: TreeReader.h:54
Int_t fEvent
event number for tree entry
Definition: TreeReader.h:55
QTextStream & endl(QTextStream &s)
void FlatDisplayTree::SetVecs ( )
protected

Definition at line 60 of file FlatDisplayTree.cxx.

60  {
61 
62 
63  }

The documentation for this class was generated from the following files: