Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
RunBoth.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RunBoth.C
1
#ifndef MACRO_RUNBOTH_C
2
#define MACRO_RUNBOTH_C
3
4
// here you need your package name (set in configure.ac)
5
#include <mytree/AnalyzeSimpleTree.h>
6
#include <mytree/MakeSimpleTree.h>
7
8
#include <
fun4all/SubsysReco.h
>
9
#include <
fun4all/Fun4AllServer.h
>
10
#include <
fun4all/Fun4AllInputManager.h
>
11
#include <
fun4all/Fun4AllDummyInputManager.h
>
12
13
#include <
phool/recoConsts.h
>
14
15
16
R__LOAD_LIBRARY(libfun4all.so)
17
R__LOAD_LIBRARY(libmytree.so)
18
19
void
RunBoth
()
20
{
21
Fun4AllServer
*se =
Fun4AllServer::instance
();
22
// since it doesn't matter we use a dummy input manager which just
23
// drives the event loop with a runnumber of 310000
24
recoConsts
*rc =
recoConsts::instance
();
25
rc->
set_IntFlag
(
"RUNNUMBER"
, 310000);
26
Fun4AllInputManager
*
in
=
new
Fun4AllDummyInputManager
(
"DSTin"
);
27
se->
registerInputManager
( in );
28
// make my ttree
29
SubsysReco
*mytree =
new
MakeSimpleTree
(
"MYTREE"
);
30
se->
registerSubsystem
(mytree);
31
// and analyze it in the same process
32
SubsysReco
*myana =
new
AnalyzeSimpleTree
();
33
se->
registerSubsystem
(myana);
34
35
se->
run
(100);
36
se->
End
();
37
se->
dumpHistos
();
38
delete
se;
39
}
40
41
#endif
tutorials
blob
master
MyOwnTTree
macro
RunBoth.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:49
using
1.8.2 with
sPHENIX GitHub integration