Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:23:57

0001 #include <GlobalVariables.C>
0002 
0003 #include <inttcalib/InttCalib.h>
0004 
0005 #include <ffamodules/FlagHandler.h>
0006 
0007 #include <fun4all/Fun4AllDstOutputManager.h>
0008 #include <fun4all/Fun4AllDstInputManager.h>
0009 #include <fun4all/Fun4AllInputManager.h>
0010 #include <fun4all/Fun4AllOutputManager.h>
0011 #include <fun4all/Fun4AllServer.h>
0012 
0013 #include <phool/recoConsts.h>
0014 
0015 #include <Rtypes.h>  // resolves R__LOAD_LIBRARY for clang-tidy
0016 #include <TSystem.h>
0017 
0018 R__LOAD_LIBRARY(libinttcalib.so)
0019 R__LOAD_LIBRARY(libintt.so)
0020 
0021 R__LOAD_LIBRARY(libfun4all.so)
0022 R__LOAD_LIBRARY(libffamodules.so)
0023 R__LOAD_LIBRARY(libfun4allraw.so)
0024 R__LOAD_LIBRARY(libffarawmodules.so)
0025 
0026 void Fun4All_Intt_Calib(
0027     int num_evt = 400000,
0028     int run_num = 0,
0029     const std::string &input_dst_list = "intt.list",
0030     const std::string &hotmap_cdb_file = "hotmap.root",
0031     const std::string &hotmap_png_file = "hotmap.png",
0032     const std::string &bcomap_cdb_file = "bcomap.root",
0033     const std::string &bcomap_png_file = "bcomap.png",
0034     bool isStreaming = true
0035   )
0036 {
0037 
0038   Fun4AllServer *se = Fun4AllServer::instance();
0039   //  se->Verbosity(1);
0040   // Input Manager
0041   recoConsts *rc = recoConsts::instance();
0042   rc->set_StringFlag("CDB_GLOBALTAG", "newcdbtag");
0043   rc->set_uint64Flag("TIMESTAMP", run_num);
0044 
0045   InttCalib *inttcalib = new InttCalib();
0046   inttcalib->Verbosity(0);
0047 
0048   // Construct file paths
0049   inttcalib->SetHotMapCdbFile(hotmap_cdb_file);
0050   inttcalib->SetHotMapPngFile(hotmap_png_file);
0051   inttcalib->SetBcoMapCdbFile(bcomap_cdb_file);
0052   inttcalib->SetBcoMapPngFile(bcomap_png_file);
0053   inttcalib->SetBcoMaximumEvent(num_evt);  // default = 50k
0054   inttcalib->SetStreamingMode(isStreaming);
0055   inttcalib->SetRunNumber(run_num);
0056 
0057   inttcalib->SetHotMapCdbFile(hotmap_cdb_file);
0058   // inttcalib->SetHotMapPngFile(hotmap_save_file);
0059   inttcalib->SetBcoMapCdbFile(bcomap_cdb_file);
0060   // inttcalib->SetBcoMapPngFile(bcomap_save_file);
0061 
0062   se->registerSubsystem(inttcalib);
0063 
0064   Fun4AllInputManager *in = new Fun4AllDstInputManager("DSTin");
0065   in->AddListFile(input_dst_list);
0066   se->registerInputManager(in);
0067 
0068   se->run(num_evt);
0069 
0070   se->End();
0071   delete se;
0072   std::cout << "all done" << std::endl;
0073   gSystem->Exit(0);
0074 }