EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
blob
master
AnaTutorial
block
CaloAna
clusters
CreateSubsysRecoModule
cylinder
eventgenerator_display
IonGun
MagneticField
materialscan
Momentum
myjetanalysis
MyOwnTTree
macro
AnalyzeTree.C
MakeTree.C
RunBoth.C
src
PHG4DSTReader
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MakeTree.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MakeTree.C
1
#pragma once
2
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3
#include <
fun4all/SubsysReco.h
>
4
#include <
fun4all/Fun4AllServer.h
>
5
#include <
fun4all/Fun4AllInputManager.h
>
6
#include <
fun4all/Fun4AllDstOutputManager.h
>
7
#include <
fun4all/Fun4AllOutputManager.h
>
8
#include <
fun4all/Fun4AllDummyInputManager.h
>
9
#include <
phool/recoConsts.h
>
10
// here you need your package name (set in configure.ac)
11
#include <mytree/MakeSimpleTree.h>
12
R__LOAD_LIBRARY
(libfun4all.so)
13
R__LOAD_LIBRARY
(libmytree.so)
14
#endif
15
16
void
MakeTree
()
17
{
18
gSystem->Load(
"libmytree.so"
);
19
Fun4AllServer
*se =
Fun4AllServer::instance
();
20
21
// since it doesn't matter we use a dummy input manager which just
22
// drives the event loop with a runnumber of 310000
23
recoConsts
*rc =
recoConsts::instance
();
24
rc->
set_IntFlag
(
"RUNNUMBER"
, 310000);
25
Fun4AllInputManager
*
in
=
new
Fun4AllDummyInputManager
(
"DSTin"
);
26
se->
registerInputManager
( in );
27
28
// normally it's a good idea to have the name of the module
29
// as argument. The name is needed if you want to have this module
30
// discard events from the output. In case you want to run a few of these
31
// modules you need to be able to set unique names somewhere
32
SubsysReco
*mytree =
new
MakeSimpleTree
(
"MYTREE"
);
33
se->
registerSubsystem
(mytree);
34
Fun4AllOutputManager
*out =
new
Fun4AllDstOutputManager
(
"OUT"
,
"mytree.root"
);
35
// This is one of the few places where the name of a module is actually important -
36
// e.g. using duplicate names will definitely screw you here
37
// The AddEventSelector tells the output manager which module can discard events
38
// multiple modules are allowed (no list, you need an AddEventSelector line for
39
// every module).
40
out->
AddEventSelector
(
"MYTREE"
);
41
// this adds these nodes to the output (if you do not select any the default is to
42
// write all nodes. The nodes under The RunNode are always saved entirely
43
out->
AddNode
(
"MYSIMPLETREE"
);
44
out->
AddNode
(
"MYTCARRAY"
);
45
se->
registerOutputManager
(out);
46
se->
run
(100);
47
se->
End
();
48
delete
se;
49
gSystem->Exit(0);
50
}
fun4all_tutorials
blob
master
MyOwnTTree
macro
MakeTree.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:54
using
1.8.2 with
EIC GitHub integration