ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
macros
online_distribution
tutorials
blob
master
AnaTutorial
AnaTutorialECCE
block
CaloAna
clusters
CreateSubsysRecoModule
cylinder
dst_workflow
eventgenerator_display
IonGun
MagneticField
materialscan
Momentum
myjetanalysis
MyOwnTTree
macro
src
AnalyzeSimpleTree.cc
AnalyzeSimpleTree.h
AnalyzeSimpleTreeLinkDef.h
MakeSimpleTree.cc
MakeSimpleTree.h
MakeSimpleTreeLinkDef.h
MySimpleTree.cc
MySimpleTree.h
MySimpleTreeLinkDef.h
MyTClonesArray.cc
MyTClonesArray.h
MyTClonesArrayLinkDef.h
PHG4DSTReader
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MySimpleTree.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MySimpleTree.h
1
#ifndef MYSIMPLETREE_h
2
#define MYSIMPLETREE_h
3
4
// This class just stores an int and a float. While not needed it is
5
// better in the long run to get used to use methods to get to the
6
// data. It doesn't matter for the root TTree which is saved but if
7
// you save this class inside a TClonesArray (the other example) it
8
// makes it easier. It also allows greater flexibility, e.g. if you ever
9
// want to ("dammit I forgot to multiply myfloat with Pi") modify the
10
// values on the fly:
11
// exchange
12
// float MyFloat() const {return myfloat;}
13
// by
14
// float MyFloat() const {return myfloat*M_PI;}
15
// and you don't have to change your analysis code one bit
16
17
18
#include <
phool/PHObject.h
>
19
20
class
MySimpleTree
:
public
PHObject
21
{
22
23
public
:
24
25
MySimpleTree
();
26
virtual
~MySimpleTree
() {}
27
28
void
Reset
();
29
30
void
MyFloat
(
const
float
f
) {
myfloat
=
f
;}
31
float
MyFloat
()
const
{
return
myfloat
;}
32
void
MyInt
(
const
int
i) {
myint
= i;}
33
int
MyInt
()
const
{
return
myint
;}
34
35
protected
:
36
int
myint
;
37
float
myfloat
;
38
39
ClassDef(
MySimpleTree
,1)
40
41
};
42
43
#endif
tutorials
blob
master
MyOwnTTree
src
MySimpleTree.h
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:26:00
using
1.8.2 with
ECCE GitHub integration