Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-07-16 08:16:41

0001 
0002 #include <bcolumicount/StreamingBcoReco.h>
0003 
0004 #include <ffamodules/SyncReco.h>
0005 
0006 #include <fun4all/Fun4AllServer.h>
0007 #include <fun4all/Fun4AllInputManager.h>
0008 #include <fun4all/Fun4AllDstInputManager.h>
0009 #include <fun4all/Fun4AllOutputManager.h>
0010 #include <fun4all/Fun4AllDstOutputManager.h>
0011 
0012 #include <fun4allraw/Fun4AllPrdfInputManager.h>
0013 
0014 
0015 #include <phool/recoConsts.h>
0016 
0017 #include <Rtypes.h> // defines R__LOAD_LIBRARY macro for clang-tidy
0018 #include <TSystem.h>
0019 #include <fstream>
0020 
0021 R__LOAD_LIBRARY(libfun4all.so)
0022 R__LOAD_LIBRARY(libbcolumicount.so)
0023 R__LOAD_LIBRARY(libffamodules.so)
0024 
0025 void Fun4All_StreamingBco(const int nEvents = 0,
0026               const std::string &bcodst = "DST_BCOINFO-00081100.root")
0027 {
0028 
0029   std::string outfile = "DST_STREAMING_BCOINFO-";
0030   std::string histfile = "bco_histos-";
0031 
0032   // There is probably a better way to do this... revisit!
0033   std::string run_segments = bcodst.substr(bcodst.size() - 13, 8);
0034   outfile += run_segments;
0035   outfile += ".root";
0036 
0037   histfile += run_segments;
0038   histfile += ".root";
0039 
0040   gSystem->Load("libg4dst.so");
0041   Fun4AllServer *se = Fun4AllServer::instance();
0042   //se->Verbosity(1);
0043 
0044   StreamingBcoReco *streaming_bco = new StreamingBcoReco();
0045   //streaming_bco->Verbosity(2);
0046 
0047   se->registerSubsystem(streaming_bco);
0048   //in->Verbosity(10);
0049 
0050   Fun4AllInputManager *in_dst = new Fun4AllDstInputManager("DSTin");
0051   in_dst->AddFile(bcodst);
0052   se->registerInputManager(in_dst);
0053 
0054   Fun4AllOutputManager *out = new Fun4AllDstOutputManager("out",outfile);
0055   se->registerOutputManager(out);
0056 
0057   se->run(nEvents);
0058 
0059   se->dumpHistos(histfile);
0060   se->End();
0061   delete se;
0062   gSystem->Exit(0);
0063 }