Back to home page

sPhenix code displayed by LXR

 
 

    


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

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