Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_MySimpleReco.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_MySimpleReco.C
1 #ifndef MACRO_FUN4ALLMYSIMPLERECO_C
2 #define MACRO_FUN4ALLMYSIMPLERECO_C
3 
7 
8 #include <mysimplereco/MySimpleReco.h>
9 
10 R__LOAD_LIBRARY(libfun4all.so)
11 R__LOAD_LIBRARY(libMySimpleReco.so)
12 
13 void Fun4All_MySimpleReco(const int nEvents = 3)
14 {
16  // Make the Server
19  MySimpleReco *myreco = new MySimpleReco();
20  se->registerSubsystem(myreco);
21 // this (dummy) input manager just drives the event loop
23  in->Verbosity(1);
24  se->registerInputManager( in );
25 // events = 0 => run till end of input file
26  if (nEvents <= 0)
27  {
28  return;
29  }
30  cout << endl << "Running over " << nEvents << " Events" << endl;
31  se->run(nEvents);
32  cout << endl << "Calling End in Fun4All_MySimpleReco.C" << endl;
33  se->End();
34  cout << endl << "All done, calling delete Fun4AllServer" << endl;
35  delete se;
36  cout << endl << "gSystem->Exit(0)" << endl;
37  gSystem->Exit(0);
38 }
39 
40 #endif // MACRO_FUN4ALLMYSIMPLERECO_C