Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
garana
garana
Accessors
FlatDetTree.cxx
Go to the documentation of this file.
1
/*
2
* FlatDetTree.cxx
3
*
4
* Created on: Feb 9, 2021
5
* Author: chilgenb
6
*/
7
8
#include "
garana/Accessors/FlatDetTree.h
"
9
10
using namespace
garana
;
11
12
FlatDetTree::FlatDetTree
(TTree*
tree
)
13
{
14
SetupRead
(tree);
15
}
16
17
FlatDetTree::FlatDetTree
(TTree*
tree
,
char
opt
)
18
{
19
CheckOpt
(opt);
//sets TreeReader::fOpt
20
21
if
(
fOpt
==
'r'
){
22
std::cout <<
"constructed FlatDetTree object in read-only mode"
<<
std::endl
;
23
SetupRead
(tree);
24
}
25
else
{
26
std::cout <<
"constructed FlatDetTree object in write mode"
<<
std::endl
;
27
fTreeIn
=
tree
;
28
SetBranchAddresses
();
29
}
30
31
}
32
33
/*void FlatDetTree::GetEntry(UInt_t entry) {
34
this->fDetToFSLimits.clear();
35
fTreeIn->GetEntry(entry);
36
this->FindFSLimits();
37
}*/
38
39
bool
FlatDetTree::SetBranchAddresses
(){
40
41
std::cout <<
"FlatDetTree 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
}
57
58
//implement accessors inherited from DetTree
59
void
FlatDetTree::SetVecs
() {
60
61
62
}
63
64
void
FlatDetTree::ClearVecs
() {
65
66
67
68
}
garana
Definition:
FlatDetTree.h:15
train.opt
opt
Definition:
train.py:196
garana::TreeReader::fTreeIn
TTree * fTreeIn
pointer to the analyzed TTree or TChain
Definition:
TreeReader.h:51
garana::TreeReader::CheckOpt
void CheckOpt(char opt)
Definition:
TreeReader.cxx:67
FlatDetTree.h
garana::FlatDetTree::SetVecs
void SetVecs()
Definition:
FlatDetTree.cxx:59
garana::TreeReader::fOpt
char fOpt
Definition:
TreeReader.h:50
garana::FlatDetTree::SetBranchAddresses
bool SetBranchAddresses() override
Definition:
FlatDetTree.cxx:39
garana::TreeReader::b_Event
TBranch * b_Event
Definition:
TreeReader.h:54
garana::TreeReader::SetupRead
void SetupRead(TTree *tree)
Definition:
TreeReader.cxx:6
garana::FlatDetTree::ClearVecs
void ClearVecs()
Definition:
FlatDetTree.cxx:64
garana::FlatDetTree::FlatDetTree
FlatDetTree()
Definition:
FlatDetTree.h:21
garana::TreeReader::fEvent
Int_t fEvent
event number for tree entry
Definition:
TreeReader.h:55
make_resolution.tree
tree
Definition:
make_resolution.py:22
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11