BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
CalibModel.cxx
Go to the documentation of this file.
1// $Header: /bes/bes/BossCvs/Calibration/CalibData/src/CalibModel.cxx,v 1.19 2020/09/28
2// 05:24:02 maqm Exp $
3
4#define _CalibData_CalibModel_cxx
5
6#include "CalibData/CalibModel.h"
7#include "GaudiKernel/ClassID.h"
8#include "GaudiKernel/Kernel.h"
9
10/** @file CalibModel.cxx
11 Implementation for CalibModel class, which initializes strings
12 for use as paths for TDDS data. Also includes definitions
13 of Gaudi class ids for TDDS DataObjects.
14*/
15
16/** @class CalibModel
17 Provides convenience definitions of strings which are paths
18 to calibration data in the TDDS. The class has no data members.
19 The strings it initializes are just "there"; existing in
20 this module and extern everywhere else (see the fancy footwork
21 in CalibModel.h).
22 The single static instance of CalibModel declared in this file
23 causes the constructor to be run, initializing the strings, and
24 a vector of pairs. The pairs are used to match each string
25 with the appropriate Gaudi class id.
26
27 NOTE: This scheme might have to be revised. We haven't dealt
28 with different instruments, nor with flavors. Assuming,
29 as seems likely, that we *never* have to keep track of
30 constants for more than one instrument simultaneously
31 (most likely not even sequentially within a single job),
32 we can leave any mention of instrument out of these
33 paths. If we want to preserve the possibility of maintaining
34 more than one flavor simultaneously, flavor will have to
35 be part of the path string. We could tack it on the end
36 dynamically without having to do any violence to what
37 we've got below.
38*/
39
40std::string root;
41std::string tkr;
42std::string cal;
43std::string acd;
44std::string test;
45std::string nas;
46std::string mdc;
47
49public:
50 /** The constructor sets values into the externally-accessible
51 string variables */
53 // Initialize a bunch of strings here
54 // First few are just for convenience in assembling the
55 // the rest; no need for them to be public.
56 std::string root = "/Calib";
57 std::string test = root + "/Test";
58 std::string nas = root + "/NAS";
59 std::string Mdc = root + "/Mdc";
60 std::string Tof = root + "/Tof";
61 std::string Dedx = root + "/Dedx";
62 std::string Emc = root + "/Emc";
63 std::string Muc = root + "/Muc";
64 std::string EsTime = root + "/EsTime";
65 std::string EstTof = root + "/EstTof";
66 // Top_up Qiumei Ma
67 std::string InjSigInterval = root + "/InjSigInterval";
68 std::string InjSigTime = root + "/InjSigTime";
69 std::string OffEvtFilter = root + "/OffEvtFilter";
70 std::string CorrectedETS = root + "/CorrectedETS";
71 // Practically all of these don't exist in any shape or form,
72 // but go ahead an reserve names anyway.
73
74 CalibData::Test_Gen = test + "_Gen";
75 CalibData::Test_1 = test + "_1";
76
77 // the Mdc nodes
78
79 CalibData::MdcCal = Mdc + "Cal";
80 CalibData::TofCal = Tof + "Cal";
81 CalibData::DedxCal = Dedx + "Cal";
82 CalibData::EmcCal = Emc + "Cal";
83 CalibData::MucCal = Muc + "Cal";
84 CalibData::EsTimeCal = EsTime + "Cal";
85 CalibData::EstTofCal = EstTof + "Cal";
86 CalibData::MdcAlign = Mdc + "Align";
87 // Top_up Qiumei Ma
88 CalibData::InjSigInterval = InjSigInterval;
89 CalibData::InjSigTime = InjSigTime;
90 CalibData::OffEvtFilter = OffEvtFilter;
91 CalibData::CorrectedETS = CorrectedETS;
92
93 CalibData::TofQElec = "/Calib/TofQElec";
94 CalibData::TofSim = "/Calib/TofSim";
95 CalibData::DedxSim = "/Calib/DedxSim";
96 CalibData::MdcDataConstant = Mdc + "DataConst";
97
98 // Use same class for hot strips, dead strips or (merged) bad strips,
99 // but different path in TDDS
100
101 CalibData::pairs.push_back( std::make_pair( CalibData::MdcCal, CLID_Calib_MdcCal ) );
102 CalibData::pairs.push_back( std::make_pair( CalibData::TofCal, CLID_Calib_TofCal ) );
103 CalibData::pairs.push_back( std::make_pair( CalibData::DedxCal, CLID_Calib_DedxCal ) );
104 CalibData::pairs.push_back( std::make_pair( CalibData::EmcCal, CLID_Calib_EmcCal ) );
105 CalibData::pairs.push_back( std::make_pair( CalibData::MucCal, CLID_Calib_MucCal ) );
106 CalibData::pairs.push_back( std::make_pair( CalibData::EsTimeCal, CLID_Calib_EsTimeCal ) );
107 CalibData::pairs.push_back( std::make_pair( CalibData::EstTofCal, CLID_Calib_EstTofCal ) );
108 CalibData::pairs.push_back( std::make_pair( CalibData::MdcAlign, CLID_Calib_MdcAlign ) );
109 CalibData::pairs.push_back( std::make_pair( CalibData::TofQElec, CLID_TofQ_Elec ) );
110 CalibData::pairs.push_back( std::make_pair( CalibData::TofSim, CLID_Calib_TofSim ) );
111 CalibData::pairs.push_back( std::make_pair( CalibData::DedxSim, CLID_Dedx_Sim ) );
112 CalibData::pairs.push_back(
114 // Top_up Qiumei Ma
115 CalibData::pairs.push_back(
117 CalibData::pairs.push_back(
118 std::make_pair( CalibData::InjSigTime, CLID_Calib_InjSigTime ) );
119 CalibData::pairs.push_back(
121 CalibData::pairs.push_back(
123 }
124
125}; // end of calibModel class definition
126
127// Instantiate an instance to get the ball rolling.
128static CalibModel mod;
129
130#undef _CalibData_CalibModel_cxx
std::string nas
std::string mdc
std::string test
std::string acd
std::string cal
std::string root
std::string tkr