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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
MyHitTTree.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file MyHitTTree.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/Fun4AllDstInputManager.h
>
7
#include <
fun4all/Fun4AllOutputManager.h
>
8
#include <
fun4all/Fun4AllDstOutputManager.h
>
9
#include <
g4histos/G4HitTTree.h
>
10
R__LOAD_LIBRARY
(libg4histos.so)
11
#endif
12
13
void
MyHitTTree
(
const
char
*
fname
,
const
int
nevnt = 0,
const
char
*outfile=
"hits.root"
)
14
{
15
gSystem->Load(
"libg4histos"
);
16
Fun4AllServer
*se =
Fun4AllServer::instance
();
17
char
detector[100];
18
char
outnode[100];
19
sprintf(detector,
"%s"
,
"box_0"
);
20
sprintf(outnode,
"G4RootHit_%s"
,detector);
21
// se->Verbosity(10);
22
G4HitTTree
*tt =
new
G4HitTTree
();
23
tt->
Detector
(detector);
24
se->
registerSubsystem
(tt);
25
26
Fun4AllInputManager
*
in
=
new
Fun4AllDstInputManager
(
"DSTin"
);
27
in->
fileopen
(fname);
28
se->
registerInputManager
(in);
29
Fun4AllOutputManager
*out =
new
Fun4AllDstOutputManager
(
"DSTout"
,outfile);
30
out->
AddNode
(outnode);
31
se->
registerOutputManager
(out);
32
33
se->
run
(nevnt);
34
se->
End
();
35
delete
se;
36
}
tutorials
blob
master
block
MyHitTTree.C
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:26:00
using
1.8.2 with
ECCE GitHub integration