Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:24:08

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 #include <Rtypes.h> // for R__LOAD_LIBRARY
0019 #include <TSystem.h>
0020 
0021 R__LOAD_LIBRARY(libfun4all.so)
0022 R__LOAD_LIBRARY(libfun4allraw.so)
0023 R__LOAD_LIBRARY(libXingShiftCal.so)
0024 
0025   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)
0026 {
0027 
0028   Fun4AllServer *se = Fun4AllServer::instance();
0029   se->Verbosity(0);
0030 
0031   recoConsts *rc = recoConsts::instance();
0032   std::pair<int, int> runseg = Fun4AllUtils::GetRunSegment(fname);
0033   int runnumber = runseg.first;
0034   if (runnumber != 0)
0035   {
0036     rc->set_IntFlag("RUNNUMBER",runnumber);
0037   }
0038 
0039   XingShiftCal *xingshift = new XingShiftCal("XingShiftCal",overwrite);
0040   se->registerSubsystem(xingshift);
0041  
0042   Fun4AllInputManager *In = new Fun4AllPrdfInputManager("in");
0043   In->AddFile(fname);
0044   se->registerInputManager(In);
0045 
0046   se->run(nEvents);
0047   se->End();
0048   se->PrintTimer();
0049   delete se;
0050   std::cout << "All done!" << std::endl;
0051   gSystem->Exit(0);
0052 
0053 }
0054 
0055 #endif