ECCE @ EIC 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
6 
7 #include <mysimplereco/MySimpleReco.h>
8 
9 R__LOAD_LIBRARY(libfun4all.so)
10 R__LOAD_LIBRARY(libMySimpleReco.so)
11 
12 void Fun4All_MySimpleReco(const int nEvents = 3)
13 {
15  // Make the Server
18  MySimpleReco *myreco = new MySimpleReco();
19  se->registerSubsystem(myreco);
20 // this (dummy) input manager just drives the event loop
22  in->Verbosity(1);
23  se->registerInputManager( in );
24 // events = 0 => run till end of input file
25  if (nEvents <= 0)
26  {
27  return;
28  }
29  cout << endl << "Running over " << nEvents << " Events" << endl;
30  se->run(nEvents);
31  cout << endl << "Calling End in Fun4All_MySimpleReco.C" << endl;
32  se->End();
33  cout << endl << "All done, calling delete Fun4AllServer" << endl;
34  delete se;
35  cout << endl << "gSystem->Exit(0)" << endl;
36  gSystem->Exit(0);
37 }
38 #endif // MACRO_FUN4ALLMYSIMPLERECO_C
39