hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Files
File List
File Members
All
c
d
f
i
j
l
m
n
p
r
s
u
Functions
c
d
f
i
m
n
r
s
u
Variables
Typedefs
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Loading...
Searching...
No Matches
analysis
include
FlatTupleMaker.h
Go to the documentation of this file.
1
/*
2
* @file FlatTupleMaker.h
3
* @author Omar Moreno
4
* @date January 18, 2016
5
* @author PF
6
* @date Jan, 2020
7
* @brief
8
*
9
*/
10
11
#ifndef __FLAT_TUPLE_MAKER_H__
12
#define __FLAT_TUPLE_MAKER_H__
13
14
//----------------//
15
// C++ StdLib //
16
//----------------//
17
#include <string>
18
#include <map>
19
#include <iostream>
20
21
//----------//
22
// ROOT //
23
//----------//
24
#include <TFile.h>
25
#include <TTree.h>
26
32
class
FlatTupleMaker
{
33
34
public
:
41
FlatTupleMaker
(std::string file_name, std::string tree_name);
42
48
FlatTupleMaker
(std::string tree_name);
49
51
~FlatTupleMaker
();
52
58
void
addVariable
(std::string variable_name);
59
65
void
addString
(std::string variable_name);
66
72
void
addVector
(std::string vector_name);
73
80
void
setVariableValue
(std::string variable_name,
double
value) {
variables
[variable_name] = value; };
81
88
void
setVariableValue
(std::string variable_name, std::string value) {
string_variables
[variable_name] = value; };
89
96
void
addToVector
(std::string variable_name,
double
value);
97
105
bool
hasVariable
(std::string variable_name);
106
111
void
close
();
112
119
std::vector<double>
getVector
(std::string variable_name);
120
125
void
writeTree
() {
126
tree
->Write();
127
}
125
void
writeTree
() {
…
}
128
133
void
fill
();
134
135
private
:
136
138
TFile*
file
{
nullptr
};
139
141
TTree*
tree
{
nullptr
};
142
144
std::map <std::string, double>
variables
;
145
147
std::map <std::string, std::string>
string_variables
;
148
150
std::map <std::string, std::vector<double>>
vectors
;
151
152
153
};
32
class
FlatTupleMaker
{
…
};
154
155
#endif
// __FLAT_TUPLE_MAKER_H__
FlatTupleMaker
description
Definition
FlatTupleMaker.h:32
FlatTupleMaker::getVector
std::vector< double > getVector(std::string variable_name)
description
Definition
FlatTupleMaker.cxx:77
FlatTupleMaker::addVector
void addVector(std::string vector_name)
description
Definition
FlatTupleMaker.cxx:53
FlatTupleMaker::~FlatTupleMaker
~FlatTupleMaker()
Definition
FlatTupleMaker.cxx:27
FlatTupleMaker::writeTree
void writeTree()
Write root tree.
Definition
FlatTupleMaker.h:125
FlatTupleMaker::addVariable
void addVariable(std::string variable_name)
description
Definition
FlatTupleMaker.cxx:34
FlatTupleMaker::vectors
std::map< std::string, std::vector< double > > vectors
Definition
FlatTupleMaker.h:150
FlatTupleMaker::close
void close()
description
Definition
FlatTupleMaker.cxx:70
FlatTupleMaker::setVariableValue
void setVariableValue(std::string variable_name, std::string value)
description
Definition
FlatTupleMaker.h:88
FlatTupleMaker::file
TFile * file
Definition
FlatTupleMaker.h:138
FlatTupleMaker::variables
std::map< std::string, double > variables
Definition
FlatTupleMaker.h:144
FlatTupleMaker::addToVector
void addToVector(std::string variable_name, double value)
description
Definition
FlatTupleMaker.cxx:58
FlatTupleMaker::setVariableValue
void setVariableValue(std::string variable_name, double value)
description
Definition
FlatTupleMaker.h:80
FlatTupleMaker::tree
TTree * tree
Definition
FlatTupleMaker.h:141
FlatTupleMaker::hasVariable
bool hasVariable(std::string variable_name)
description
Definition
FlatTupleMaker.cxx:62
FlatTupleMaker::addString
void addString(std::string variable_name)
description
Definition
FlatTupleMaker.cxx:44
FlatTupleMaker::fill
void fill()
description
Definition
FlatTupleMaker.cxx:81
FlatTupleMaker::string_variables
std::map< std::string, std::string > string_variables
Definition
FlatTupleMaker.h:147
Generated by
1.9.8