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/SingleMvtxPoolInput.h>
0009
0010 #include <phool/recoConsts.h>
0011
0012 #include <array>
0013
0014 R__LOAD_LIBRARY(libfun4all.so)
0015 R__LOAD_LIBRARY(libfun4allraw.so)
0016
0017
0018 void Fun4All_Mvtx_Combiner(int nEvents = 0,
0019 const string &input_file00 = "mvtx-flx0.list",
0020 const string &input_file01 = "mvtx-flx1.list",
0021 const string &input_file02 = "mvtx-flx2.list",
0022 const string &input_file03 = "mvtx-flx3.list",
0023 const string &input_file04 = "mvtx-flx4.list",
0024 const string &input_file05 = "mvtx-flx5.list")
0025 {
0026 vector<string> infiles;
0027 infiles.push_back(input_file00);
0028 infiles.push_back(input_file01);
0029 infiles.push_back(input_file02);
0030 infiles.push_back(input_file03);
0031 infiles.push_back(input_file04);
0032 infiles.push_back(input_file05);
0033
0034 Fun4AllServer *se = Fun4AllServer::instance();
0035 se->Verbosity(1);
0036 recoConsts *rc = recoConsts::instance();
0037
0038 Fun4AllStreamingInputManager *in = new Fun4AllStreamingInputManager("Comb");
0039
0040
0041 int i = 0;
0042 for (auto& infile : infiles)
0043 {
0044 auto* sngl= new SingleMvtxPoolInput("MVTX_FLX" + to_string(i));
0045
0046 sngl->SetBcoRange(10);
0047 sngl->AddListFile(infile);
0048 in->registerStreamingInput(sngl, InputManagerType::MVTX);
0049 i++;
0050 }
0051 se->registerInputManager(in);
0052
0053 Fun4AllOutputManager *out = new Fun4AllDstOutputManager("out","mvtx_raw_hits.root");
0054 se->registerOutputManager(out);
0055
0056 se->run(nEvents);
0057
0058 se->End();
0059 delete se;
0060 gSystem->Exit(0);
0061 }