Back to home page

sPhenix code displayed by LXR

 
 

    


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

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/SingleMicromegasPoolInput.h>
0009 
0010 #include <phool/recoConsts.h>
0011 
0012 #include <Rtypes.h> // for R__LOAD_LIBRARY
0013 #include <TSystem.h>
0014 
0015 R__LOAD_LIBRARY(libfun4all.so)
0016 R__LOAD_LIBRARY(libfun4allraw.so)
0017 R__LOAD_LIBRARY(libffarawmodules.so)
0018 
0019 void Fun4All_Tpot_Combiner(int nEvents = 0,
0020               const std::string &input_file00 = "tpot.list"
0021 )
0022 {
0023   std::vector<std::string> infile;
0024   infile.push_back(input_file00);
0025 
0026   Fun4AllServer *se = Fun4AllServer::instance();
0027   se->Verbosity(1);
0028 //  recoConsts *rc = recoConsts::instance();
0029 //  rc->set_IntFlag("RUNNUMBER",20445);
0030   Fun4AllStreamingInputManager *in = new Fun4AllStreamingInputManager("Comb");
0031   in->Verbosity(10);
0032   int i=0;
0033   for (const auto& iter : infile)
0034   {
0035     SingleMicromegasPoolInput *sngl= new SingleMicromegasPoolInput("MICROMEGAS_" + std::to_string(i));
0036     sngl->Verbosity(3);
0037     sngl->SetBcoRange(10);
0038     sngl->SetNegativeBco(2);
0039     sngl->AddListFile(iter);
0040     in->registerStreamingInput(sngl,InputManagerType::MICROMEGAS);
0041     i++;
0042   }
0043   se->registerInputManager(in);
0044 
0045   // MicromegasCheck *micromegascheck = new MicromegasCheck();
0046   // micromegascheck->Verbosity(3);
0047   // micromegascheck->SetBcoRange(10);
0048   // se->registerSubsystem(micromegascheck);
0049 
0050   Fun4AllOutputManager *out = new Fun4AllDstOutputManager("out","micromegas.root");
0051   se->registerOutputManager(out);
0052 
0053   se->run(nEvents);
0054 
0055   se->End();
0056   delete se;
0057   gSystem->Exit(0);
0058 }