File indexing completed on 2025-08-05 08:15:28
0001 #ifndef FUN4ALL_ZDCNEUTRONLOCPOL_C
0002 #define FUN4ALL_ZDCNEUTRONLOCPOL_C
0003
0004 #include <zdcneutronlocpol/ZDCNeutronLocPol.h>
0005
0006 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0007 #include <fun4all/Fun4AllDstInputManager.h>
0008 #include <fun4all/Fun4AllDstOutputManager.h>
0009 #include <fun4all/Fun4AllInputManager.h>
0010 #include <fun4all/Fun4AllRunNodeInputManager.h>
0011 #include <fun4all/Fun4AllServer.h>
0012 #include <fun4all/Fun4AllUtils.h>
0013 #include <fun4all/SubsysReco.h>
0014
0015 #include <phool/recoConsts.h>
0016
0017 #include <iostream>
0018 #include <string>
0019 #include <cstdio>
0020
0021
0022 R__LOAD_LIBRARY(libfun4all.so)
0023 R__LOAD_LIBRARY(libfun4allraw.so)
0024 R__LOAD_LIBRARY(libZDCNeutronLocPol.so)
0025
0026
0027 void Fun4All_ZDCNeutronLocPol(const std::string &fname = "DST_TRIGGERED_EVENT_run2pp_new_2024p001-00042797-0000.root", const std::string &outname = "zdcneutronlocpol_42797_0000.root", int startEvent = 0, int nEvents = 10000)
0028
0029 {
0030
0031 Fun4AllServer *se = Fun4AllServer::instance();
0032 se->Verbosity(0);
0033
0034
0035 Fun4AllInputManager *in1 = new Fun4AllDstInputManager("in1");
0036 in1->AddFile(fname);
0037 se->registerInputManager(in1);
0038
0039 ZDCNeutronLocPol *zdcneutronlocpol = new ZDCNeutronLocPol();
0040 zdcneutronlocpol->setFileName(outname);
0041 zdcneutronlocpol->setGainMatch("/sphenix/user/dloomis/analysis/ZDCNeutronLocPol/SMDrelativegains.dat");
0042 se->registerSubsystem(zdcneutronlocpol);
0043
0044 if (startEvent > 0)
0045 {
0046 se->fileopen("in1",fname);
0047 se->skip(startEvent);
0048 }
0049
0050
0051 se->run(nEvents);
0052 se->End();
0053 se->PrintTimer();
0054 delete se;
0055 std::cout << "All done!" << std::endl;
0056 gSystem->Exit(0);
0057
0058
0059
0060
0061 }
0062
0063 #endif