Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:24:05

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