File indexing completed on 2025-08-05 08:11:06
0001
0002
0003
0004 #include <TSystem.h>
0005 #include <Fun4AllServer.h>
0006 #include <Fun4AllDstInputManager.h>
0007 #include <recoConsts.h>
0008 #include "BbcCheck.h"
0009
0010
0011 #if defined(__CLING__)
0012 R__LOAD_LIBRARY(libmbd_io.so)
0013 R__LOAD_LIBRARY(libcalo_io.so)
0014 R__LOAD_LIBRARY(libcalotrigger_io.so)
0015 R__LOAD_LIBRARY(libglobalvertex_io.so)
0016 R__LOAD_LIBRARY(libcentrality_io.so)
0017 R__LOAD_LIBRARY(libzdcinfo_io.so)
0018 R__LOAD_LIBRARY(libfun4allraw.so)
0019 R__LOAD_LIBRARY(libBBCStudy.so)
0020 #endif
0021
0022 void Run_BbcCheck(int nEvents = 1000,
0023 const char *dst_bbc_file = "DST_BBC_G4HIT_sHijing_0_20fm_50kHz_bkg_0_20fm-0000000040-00000.root",
0024 const char *outFile = "outfile.root")
0025 {
0026 #ifdef __CINT__
0027 gSystem->Load("libfun4all");
0028 gSystem->Load("libmbd_io.so");
0029 gSystem->Load("libglobalvertex_io.so");
0030 cout << "CINT" << endl;
0031 #endif
0032
0033
0034
0035
0036
0037
0038 recoConsts *rc = recoConsts::instance();
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 Fun4AllServer *se = Fun4AllServer::instance();
0051 se->Verbosity(0);
0052
0053 BbcCheck *ana = new BbcCheck();
0054 ana->set_savefile( outFile );
0055 se->registerSubsystem( ana );
0056
0057
0058
0059
0060
0061
0062
0063 Fun4AllInputManager *dst_bbc_in = new Fun4AllDstInputManager( "BBCCHECK", "DST", "TOP");
0064 se->registerInputManager( dst_bbc_in );
0065
0066 TString dst_bbc_fname = dst_bbc_file;
0067 if ( dst_bbc_fname.EndsWith(".root") )
0068 {
0069 dst_bbc_in->AddFile( dst_bbc_file );
0070 }
0071 else
0072 {
0073
0074 cout << "Using list file " << dst_bbc_file << endl;
0075 dst_bbc_in->AddListFile( dst_bbc_file );
0076 }
0077
0078 se->run(nEvents);
0079 se->End();
0080 delete se;
0081 }