Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SCorrelatorQAMaker.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SCorrelatorQAMaker.cc
1 // ----------------------------------------------------------------------------
2 // 'SCorrelatorQAMaker.cc'
3 // Derek Anderson
4 // 10.04.2023
5 //
6 // A module to produce TNtuples and histograms for QA
7 // plots relevant to the sPHENIX Cold QCD Energy-Energy
8 // Correlator analysis.
9 // ----------------------------------------------------------------------------
10 
11 #define SCORRELATORQAMAKER_CC
12 
13 // c++ utilities
14 #include <cassert>
15 #include <optional>
16 // user includes
17 #include "SCorrelatorQAMaker.h"
18 
19 using namespace std;
20 
21 
22 
23 namespace SColdQcdCorrelatorAnalysis {
24 
25  // ctor/dtor ----------------------------------------------------------------
26 
27  SCorrelatorQAMaker::~SCorrelatorQAMaker() {
28 
29  delete m_checkTrackPairs;
30  delete m_makeTrackQATuples;
31 
32  } // end dtor
33 
34 
35 
36  // global setters -----------------------------------------------------------
37 
38  void SCorrelatorQAMaker::SetGlobalDebug(const bool debug) {
39 
40  m_checkTrackPairs -> SetDebug(debug);
41  m_makeTrackQATuples -> SetDebug(debug);
42  return;
43 
44  } // end 'SetGlobalDebug(bool)'
45 
46 
47 
48  void SCorrelatorQAMaker::SetGlobalOutFile(const string sOutFile) {
49 
50  m_checkTrackPairs -> SetOutFile(sOutFile);
51  m_makeTrackQATuples -> SetOutFile(sOutFile);
52  return;
53 
54  } // end 'SetGlobalOutFile(string)'
55 
56 
57 
58  void SCorrelatorQAMaker::SetGlobalVerbosity(const int verbosity) {
59 
60  m_checkTrackPairs -> SetVerbosity(verbosity);
61  m_makeTrackQATuples -> SetVerbosity(verbosity);
62  return;
63 
64  } // end 'SetGlobalVerbosity(int)'
65 
66 
67 
68  // plugin initializers ------------------------------------------------------
69 
70  // specialization for SCheckTrackPairs
71  template <> void SCorrelatorQAMaker::InitPlugin(const SCheckTrackPairsConfig& config, optional<string> name) {
72 
73  // throw error if no name provided
74  if (!name.has_value()) {
75  assert(name.has_value());
76  }
77 
78  m_checkTrackPairs = new SCheckTrackPairs(name.value());
79  m_checkTrackPairs -> SetConfig(config);
80  return;
81 
82  } // end 'InitPlugin(SCheckTrackPairs, optional<string>)'
83 
84 
85 
86  // specialization for SMakeTrkQATuples
87  template <> void SCorrelatorQAMaker::InitPlugin(const SMakeTrkQATuplesConfig& config, optional<string> name) {
88 
89  // throw error if no name provided
90  if (!name.has_value()) {
91  assert(name.has_value());
92  }
93 
94  m_makeTrackQATuples = new SMakeTrkQATuples(name.value());
95  m_makeTrackQATuples -> SetConfig(config);
96  return;
97 
98  } // end 'InitPlugin(SMakeTrkQATuples, optional<string>)'
99 
100 } // end SColdQcdCorrelatorAnalysis namespace
101 
102 // end ------------------------------------------------------------------------