File indexing completed on 2025-08-05 08:13:28
0001 #ifndef MACRO_FUN4ALLMYSIMPLERECO_C
0002 #define MACRO_FUN4ALLMYSIMPLERECO_C
0003
0004 #include <fun4all/Fun4AllServer.h>
0005 #include <fun4all/Fun4AllInputManager.h>
0006 #include <fun4all/Fun4AllDstInputManager.h>
0007
0008 #include <waveform/WaveFormNtuple.h>
0009
0010 R__LOAD_LIBRARY(libfun4all.so)
0011 R__LOAD_LIBRARY(libWaveForm.so)
0012
0013 void Fun4All_WaveFormNtuple(const int nEvents = 3, const std::string &infile = "/sphenix/tg/tg01/commissioning/CaloCalibWG/sli/2024data/condor44060/condorout/OutDir7/DST_CALOR-00044060-0007.root")
0014 {
0015
0016
0017
0018 gSystem->Load("libg4dst.so");
0019 Fun4AllServer *se = Fun4AllServer::instance();
0020 WaveFormNtuple *myreco = new WaveFormNtuple();
0021 se->registerSubsystem(myreco);
0022
0023 Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0024 in->AddFile(infile);
0025 in->Verbosity(1);
0026 se->registerInputManager( in );
0027
0028 if (nEvents <= 0)
0029 {
0030 return;
0031 }
0032 cout << endl << "Running over " << nEvents << " Events" << endl;
0033 se->run(nEvents);
0034 cout << endl << "Calling End in Fun4All_WaveForm.C" << endl;
0035 se->End();
0036 cout << endl << "All done, calling delete Fun4AllServer" << endl;
0037 delete se;
0038 cout << endl << "gSystem->Exit(0)" << endl;
0039 gSystem->Exit(0);
0040 }
0041
0042 #endif