Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:29

0001 #ifndef FUN4ALL_XINGSHIFT_C
0002 #define FUN4ALL_XINGSHIFT_C
0003 
0004 #include <xingshiftcal/XingShiftCal.h>
0005 
0006 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0007 
0008 #include <fun4all/Fun4AllDstInputManager.h>
0009 #include <fun4all/Fun4AllDstOutputManager.h>
0010 #include <fun4all/Fun4AllInputManager.h>
0011 #include <fun4all/Fun4AllRunNodeInputManager.h>
0012 #include <fun4all/Fun4AllServer.h>
0013 #include <fun4all/Fun4AllUtils.h>
0014 #include <fun4all/SubsysReco.h>
0015 
0016 #include <phool/recoConsts.h>
0017 
0018 // cppcheck-suppress unknownMacro
0019 R__LOAD_LIBRARY(libfun4all.so)
0020 R__LOAD_LIBRARY(libfun4allraw.so)
0021 R__LOAD_LIBRARY(libXingShiftCal.so)
0022 
0023   void Fun4All_xingshift(const std::string &fname = "/sphenix/lustre01/sphnxpro/commissioning/GL1/beam/GL1_beam_gl1daq-00040934-0000.evt", int nEvents = 10000, int overwrite = 0)
0024 {
0025 
0026   Fun4AllServer *se = Fun4AllServer::instance();
0027   se->Verbosity(0);
0028 
0029   recoConsts *rc = recoConsts::instance();
0030   pair<int, int> runseg = Fun4AllUtils::GetRunSegment(fname);
0031   int runnumber = runseg.first;
0032   if (runnumber != 0)
0033   {
0034     rc->set_IntFlag("RUNNUMBER",runnumber);
0035   }
0036 
0037   XingShiftCal *xingshift = new XingShiftCal("XingShiftCal",overwrite);
0038   se->registerSubsystem(xingshift);
0039  
0040   Fun4AllInputManager *In = new Fun4AllPrdfInputManager("in");
0041   In->AddFile(fname);
0042   se->registerInputManager(In);
0043 
0044   se->run(nEvents);
0045   se->End();
0046   se->PrintTimer();
0047   delete se;
0048   std::cout << "All done!" << std::endl;
0049   gSystem->Exit(0);
0050 
0051 
0052 
0053 
0054 }
0055 
0056 #endif