File indexing completed on 2025-08-05 08:21:36
0001 #ifndef MACRO_FUN4ALLMYSIMPLERECO_C
0002 #define MACRO_FUN4ALLMYSIMPLERECO_C
0003
0004 #include <fun4all/Fun4AllServer.h>
0005 #include <fun4all/Fun4AllInputManager.h>
0006 #include <fun4all/Fun4AllDummyInputManager.h>
0007
0008 #include <mysimplereco/MySimpleReco.h>
0009
0010 R__LOAD_LIBRARY(libfun4all.so)
0011 R__LOAD_LIBRARY(libMySimpleReco.so)
0012
0013 void Fun4All_MySimpleReco(const int nEvents = 3)
0014 {
0015
0016
0017
0018 Fun4AllServer *se = Fun4AllServer::instance();
0019 MySimpleReco *myreco = new MySimpleReco();
0020 se->registerSubsystem(myreco);
0021
0022 Fun4AllInputManager *in = new Fun4AllDummyInputManager("Bozo");
0023 in->Verbosity(1);
0024 se->registerInputManager( in );
0025
0026 if (nEvents <= 0)
0027 {
0028 return;
0029 }
0030 cout << endl << "Running over " << nEvents << " Events" << endl;
0031 se->run(nEvents);
0032 cout << endl << "Calling End in Fun4All_MySimpleReco.C" << endl;
0033 se->End();
0034 cout << endl << "All done, calling delete Fun4AllServer" << endl;
0035 delete se;
0036 cout << endl << "gSystem->Exit(0)" << endl;
0037 gSystem->Exit(0);
0038 }
0039
0040 #endif