Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:20:26

0001 #ifndef MACRO_QA_C
0002 #define MACRO_QA_C
0003 
0004 #include <fun4all/Fun4AllServer.h>
0005 #include <qautils/QAHistManagerDef.h>
0006 #include <simqa_modules/QAG4SimulationCalorimeterSum.h>
0007 
0008 #include <TSystem.h>  // for R__LOAD_LIBRARY
0009 
0010 R__LOAD_LIBRARY(libfun4all.so)
0011 R__LOAD_LIBRARY(libsimqa_modules.so)
0012 
0013 namespace Enable
0014 {
0015   // if you want this to run by default, initialize this to true
0016   // Otherwise you have to use Enable::USER = true; in your macro
0017   bool QA = false;
0018   int QA_VERBOSITY = 0;
0019 }  // namespace Enable
0020 
0021 namespace QA
0022 {
0023   //  int myparam = 0;
0024 }  // namespace QA
0025 
0026 // QA moduel combining tracking and calorimeters
0027 void QA_G4CaloTracking()
0028 {
0029   Fun4AllServer* se = Fun4AllServer::instance();
0030   QAG4SimulationCalorimeterSum* calo_qa = new QAG4SimulationCalorimeterSum();
0031   calo_qa->Verbosity(Enable::QA_VERBOSITY);
0032   se->registerSubsystem(calo_qa);
0033   return;
0034 }
0035 
0036 // run this after se->run() to output QA histogram file for all QA modules
0037 void QA_Output(const std::string& qaOutputFileName)
0038 {
0039   Fun4AllServer* se = Fun4AllServer::instance();
0040   QAHistManagerDef::saveQARootFile(qaOutputFileName);
0041   return;
0042 }
0043 
0044 #endif