BOSS 7.1.1
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 05:24:02 maqm Exp $
2
3#define _CalibData_CalibModel_cxx
4
6#include "GaudiKernel/Kernel.h"
7#include "GaudiKernel/ClassID.h"
8
9/** @file CalibModel.cxx
10 Implementation for CalibModel class, which initializes strings
11 for use as paths for TDDS data. Also includes definitions
12 of Gaudi class ids for TDDS DataObjects.
13*/
14
15/** @class CalibModel
16 Provides convenience definitions of strings which are paths
17 to calibration data in the TDDS. The class has no data members.
18 The strings it initializes are just "there"; existing in
19 this module and extern everywhere else (see the fancy footwork
20 in CalibModel.h).
21 The single static instance of CalibModel declared in this file
22 causes the constructor to be run, initializing the strings, and
23 a vector of pairs. The pairs are used to match each string
24 with the appropriate Gaudi class id.
25
26 NOTE: This scheme might have to be revised. We haven't dealt
27 with different instruments, nor with flavors. Assuming,
28 as seems likely, that we *never* have to keep track of
29 constants for more than one instrument simultaneously
30 (most likely not even sequentially within a single job),
31 we can leave any mention of instrument out of these
32 paths. If we want to preserve the possibility of maintaining
33 more than one flavor simultaneously, flavor will have to
34 be part of the path string. We could tack it on the end
35 dynamically without having to do any violence to what
36 we've got below.
37*/
38
39std::string root;
40std::string tkr;
41std::string cal;
42std::string acd;
43std::string test;
44std::string nas;
45std::string mdc;
46
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
75 CalibData::Test_Gen = test + "_Gen";
76 CalibData::Test_1 = test + "_1";
77
78 //the Mdc nodes
79
80 CalibData::MdcCal = Mdc + "Cal";
81 CalibData::TofCal = Tof + "Cal";
82 CalibData::DedxCal = Dedx + "Cal";
83 CalibData::EmcCal = Emc + "Cal";
84 CalibData::MucCal = Muc + "Cal";
85 CalibData::EsTimeCal = EsTime + "Cal";
86 CalibData::EstTofCal = EstTof + "Cal";
87 CalibData::MdcAlign = Mdc+"Align";
88 //Top_up Qiumei Ma
89 CalibData::InjSigInterval=InjSigInterval;
90 CalibData::InjSigTime=InjSigTime;
91 CalibData::OffEvtFilter=OffEvtFilter;
92 CalibData::CorrectedETS=CorrectedETS;
93
94 CalibData::TofQElec="/Calib/TofQElec";
95 CalibData::TofSim="/Calib/TofSim";
96 CalibData::DedxSim="/Calib/DedxSim";
97 CalibData::MdcDataConstant = Mdc+"DataConst";
98
99 // Use same class for hot strips, dead strips or (merged) bad strips,
100 // but different path in TDDS
101
102 CalibData::pairs.push_back(std::make_pair(CalibData::MdcCal,
104 CalibData::pairs.push_back(std::make_pair(CalibData::TofCal,
106 CalibData::pairs.push_back(std::make_pair(CalibData::DedxCal,
108 CalibData::pairs.push_back(std::make_pair(CalibData::EmcCal,
110 CalibData::pairs.push_back(std::make_pair(CalibData::MucCal,
112 CalibData::pairs.push_back(std::make_pair(CalibData::EsTimeCal,
114 CalibData::pairs.push_back(std::make_pair(CalibData::EstTofCal,
116 CalibData::pairs.push_back(std::make_pair(CalibData::MdcAlign,
118 CalibData::pairs.push_back(std::make_pair(CalibData::TofQElec,
120 CalibData::pairs.push_back(std::make_pair(CalibData::TofSim,
122 CalibData::pairs.push_back(std::make_pair(CalibData::DedxSim,
124 CalibData::pairs.push_back(std::make_pair(CalibData::MdcDataConstant,
126 //Top_up Qiumei Ma
127 CalibData::pairs.push_back(std::make_pair(CalibData::InjSigInterval,
129 CalibData::pairs.push_back(std::make_pair(CalibData::InjSigTime,
131 CalibData::pairs.push_back(std::make_pair(CalibData::OffEvtFilter,
133 CalibData::pairs.push_back(std::make_pair(CalibData::CorrectedETS,
135
136
137 }
138
139}; // end of calibModel class definition
140
141// Instantiate an instance to get the ball rolling.
142static CalibModel mod;
143
144
145#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
const CLID CLID_Calib_InjSigTime
Definition CalibModel.h:67
const CLID CLID_Calib_EmcCal
Definition CalibModel.h:47
const CLID CLID_Calib_MdcDataConst
Definition CalibModel.h:63
const CLID CLID_Calib_TofSim
Definition CalibModel.h:59
const CLID CLID_Calib_DedxCal
Definition CalibModel.h:45
const CLID CLID_Calib_MdcCal
Definition CalibModel.h:41
const CLID CLID_TofQ_Elec
Definition CalibModel.h:57
const CLID CLID_Calib_MdcAlign
Definition CalibModel.h:55
const CLID CLID_Calib_InjSigInterval
Definition CalibModel.h:65
const CLID CLID_Calib_TofCal
Definition CalibModel.h:43
const CLID CLID_Calib_OffEvtFilter
Definition CalibModel.h:69
const CLID CLID_Calib_CorrectedETS
Definition CalibModel.h:71
const CLID CLID_Calib_MucCal
Definition CalibModel.h:49
const CLID CLID_Calib_EsTimeCal
Definition CalibModel.h:51
const CLID CLID_Calib_EstTofCal
Definition CalibModel.h:53
const CLID CLID_Dedx_Sim
Definition CalibModel.h:61
_EXTERN_ std::string TofCal
Definition CalibModel.h:94
_EXTERN_ std::string OffEvtFilter
Definition CalibModel.h:118
_EXTERN_ std::string MdcCal
Definition CalibModel.h:92
_EXTERN_ std::string DedxCal
Definition CalibModel.h:96
_EXTERN_ std::string TofSim
Definition CalibModel.h:110
_EXTERN_ std::string MdcDataConstant
Definition CalibModel.h:114
_EXTERN_ std::string EmcCal
Definition CalibModel.h:98
_EXTERN_ std::string TofQElec
Definition CalibModel.h:108
_EXTERN_ std::string EstTofCal
Definition CalibModel.h:104
_EXTERN_ std::string InjSigInterval
Definition CalibModel.h:116
_EXTERN_ std::string Test_1
Definition CalibModel.h:90
_EXTERN_ std::string CorrectedETS
Definition CalibModel.h:119
_EXTERN_ CalibPairCol pairs
Definition CalibModel.h:125
_EXTERN_ std::string EsTimeCal
Definition CalibModel.h:102
_EXTERN_ std::string DedxSim
Definition CalibModel.h:112
_EXTERN_ std::string MdcAlign
Definition CalibModel.h:106
_EXTERN_ std::string MucCal
Definition CalibModel.h:100
_EXTERN_ std::string Test_Gen
Definition CalibModel.h:87
_EXTERN_ std::string InjSigTime
Definition CalibModel.h:117