Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 #include <fun4all/Fun4AllServer.h>
0002 #include <fun4all/Fun4AllInputManager.h>
0003 #include <fun4all/Fun4AllOutputManager.h>
0004 #include <fun4all/Fun4AllDstOutputManager.h>
0005 
0006 #include <fun4allraw/Fun4AllStreamingInputManager.h>
0007 #include <fun4allraw/InputManagerType.h>
0008 #include <fun4allraw/SingleGl1PoolInput.h>
0009 
0010 #include <phool/recoConsts.h>
0011 
0012 //#include <ffarawmodules/Gl1Check.h>
0013 
0014 R__LOAD_LIBRARY(libfun4all.so)
0015 R__LOAD_LIBRARY(libfun4allraw.so)
0016 R__LOAD_LIBRARY(libffarawmodules.so)
0017 
0018 SingleGl1PoolInput *sngl[9]{};
0019 
0020 void Fun4All_Gl1_Combiner(int nEvents = 0,
0021               const string &input_file00 = "gl1.list"
0022 )
0023 {
0024   vector<string> infile;
0025   infile.push_back(input_file00);
0026 
0027   Fun4AllServer *se = Fun4AllServer::instance();
0028   se->Verbosity(1);
0029   recoConsts *rc = recoConsts::instance();
0030 //  rc->set_IntFlag("RUNNUMBER",20445);
0031   Fun4AllStreamingInputManager *in = new Fun4AllStreamingInputManager("Comb");
0032 //  in->Verbosity(10);
0033   int i=0;
0034   for (auto iter : infile)
0035   {
0036     SingleGl1PoolInput *sngl= new SingleGl1PoolInput("GL1_" + to_string(i));
0037 //    sngl->Verbosity(3);
0038     sngl->AddListFile(iter);
0039     in->registerStreamingInput(sngl,InputManagerType::GL1);
0040     i++;
0041   }
0042   se->registerInputManager(in);
0043 
0044 //   Gl1Check *gl1check = new Gl1Check();
0045 // //  gl1check->Verbosity(3);
0046 //   se->registerSubsystem(gl1check);
0047 
0048    Fun4AllOutputManager *out = new Fun4AllDstOutputManager("out","gl1.root");
0049 out->UseFileRule();
0050 out->SetNEvents(5);
0051    se->registerOutputManager(out);
0052 
0053     se->run(nEvents);
0054 
0055     se->End();
0056     delete se;
0057     gSystem->Exit(0);
0058 }