ECCE @ EIC 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 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
3 #include <fun4all/SubsysReco.h>
7 #include <phool/recoConsts.h>
8 
9 // here you need your package name (set in configure.ac)
10 #include <mytree/AnalyzeSimpleTree.h>
11 #include <mytree/MakeSimpleTree.h>
12 
13 R__LOAD_LIBRARY(libfun4all.so)
14 R__LOAD_LIBRARY(libmytree.so)
15 #endif
16 
17 void RunBoth()
18 {
19  gSystem->Load("libmytree.so");
21  // since it doesn't matter we use a dummy input manager which just
22  // drives the event loop with a runnumber of 310000
24  rc->set_IntFlag( "RUNNUMBER", 310000);
26  se->registerInputManager( in );
27  // make my ttree
28  SubsysReco *mytree = new MakeSimpleTree("MYTREE");
29  se->registerSubsystem(mytree);
30  // and analyze it in the same process
31  SubsysReco *myana = new AnalyzeSimpleTree();
32  se->registerSubsystem(myana);
33 
34  se->run(100);
35  se->End();
36  se->dumpHistos();
37  delete se;
38 }