Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-17 09:20:23

0001 #ifndef MACRO_RUNDUMP_C
0002 #define MACRO_RUNDUMP_C
0003 
0004 #include <nodedump/Dumper.h>
0005 
0006 #include <fun4all/Fun4AllServer.h>
0007 #include <fun4all/Fun4AllDstInputManager.h>
0008 
0009 #include <Rtypes.h> // R__LOAD_LIBRARY defined for clang-tidy
0010 #include <TSystem.h>
0011 
0012 R__LOAD_LIBRARY(libfun4all.so)
0013 R__LOAD_LIBRARY(libphnodedump.so)
0014 
0015 void run_dump(const std::string &infile, const int evts=100)
0016 {
0017   gSystem->Load("libg4dst.so");
0018   Fun4AllServer* se = Fun4AllServer::instance();
0019 
0020   Dumper *dmp = new Dumper();
0021   gSystem->Exec("mkdir dump");
0022   dmp->SetOutDir("./dump");
0023 
0024   se->registerSubsystem(dmp);
0025 
0026   Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0027   se->registerInputManager(in);
0028   se->fileopen("DSTin",infile);
0029   se->run(evts);
0030   se->End();
0031   delete se;
0032 }
0033 
0034 #endif