File indexing completed on 2025-08-14 08:14:26
0001
0002
0003
0004
0005
0006
0007
0008 #include <fun4all/Fun4AllUtils.h>
0009
0010 #include <ffamodules/CDBInterface.h>
0011 #include <fun4all/Fun4AllDstInputManager.h>
0012 #include <fun4all/Fun4AllInputManager.h>
0013 #include <fun4all/Fun4AllRunNodeInputManager.h>
0014 #include <fun4all/Fun4AllServer.h>
0015 #include <GlobalVariables.C>
0016
0017 #include <phool/recoConsts.h>
0018
0019 #include <laserqa/laserQA.h>
0020
0021 #include <stdio.h>
0022
0023 R__LOAD_LIBRARY(libfun4all.so)
0024 R__LOAD_LIBRARY(libffamodules.so)
0025 R__LOAD_LIBRARY(libtpc.so)
0026 R__LOAD_LIBRARY(libLaserQA.so)
0027 void Fun4All_laserQA(
0028 const int nEvents = 10,
0029 const std::string fileList = "/sphenix/tg/tg01/jets/bkimelman/BenProduction/Aug19_2024/",
0030 const std::string outdir = "/sphenix/tg/tg01/jets/bkimelman/BenProduction/Aug19_2024/laserClusterQA/",
0031 int runnumber = 53534,
0032 const std::string prod = "new_2025p000_v000",
0033 const std::string type = "run3auau")
0034 {
0035
0036
0037 TString outfile = Form("%s/laserQA_%s_%s-%08d.root",outdir.c_str(),type.c_str(), prod.c_str(), runnumber);
0038 std::string theOutfile = outfile.Data();
0039 auto se = Fun4AllServer::instance();
0040 se->Verbosity(2);
0041 auto rc = recoConsts::instance();
0042 rc->set_IntFlag("RUNNUMBER", runnumber);
0043
0044 Enable::CDB = true;
0045 rc->set_StringFlag("CDB_GLOBALTAG", "ProdA_2025");
0046 rc->set_uint64Flag("TIMESTAMP", runnumber);
0047 std::string geofile = CDBInterface::instance()->getUrl("Tracking_Geometry");
0048
0049
0050 auto infile = new Fun4AllDstInputManager("InputManager");
0051
0052 infile->AddListFile(fileList);
0053 se->registerInputManager(infile);
0054
0055 auto lQA = new laserQA("laserQA");
0056 lQA->setOutfile(theOutfile);
0057 se->registerSubsystem(lQA);
0058
0059 se->run(nEvents);
0060 se->End();
0061 se->PrintTimer();
0062
0063 delete se;
0064 std::cout << "Finished" << std::endl;
0065 gSystem->Exit(0);
0066 }