Analysis Software
Documentation for sPHENIX simulation software
 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>
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 {
22  // since it doesn't matter we use a dummy input manager which just
23  // drives the event loop with a runnumber of 310000
25  rc->set_IntFlag( "RUNNUMBER", 310000);
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