CGEM BOSS 6.6.5.h
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.17 2011/12/20 00:10:29 zhangy 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 // Practically all of these don't exist in any shape or form,
67 // but go ahead an reserve names anyway.
68
69
70 CalibData::Test_Gen = test + "_Gen";
71 CalibData::Test_1 = test + "_1";
72
73 //the Mdc nodes
74
75 CalibData::MdcCal = Mdc + "Cal";
76 CalibData::TofCal = Tof + "Cal";
77 CalibData::DedxCal = Dedx + "Cal";
78 CalibData::EmcCal = Emc + "Cal";
79 CalibData::MucCal = Muc + "Cal";
80 CalibData::EsTimeCal = EsTime + "Cal";
81 CalibData::EstTofCal = EstTof + "Cal";
82 CalibData::MdcAlign = Mdc+"Align";
83 CalibData::TofQElec="/Calib/TofQElec";
84 CalibData::TofSim="/Calib/TofSim";
85 CalibData::DedxSim="/Calib/DedxSim";
86 CalibData::MdcDataConstant = Mdc+"DataConst";
87
88 // Use same class for hot strips, dead strips or (merged) bad strips,
89 // but different path in TDDS
90
91 CalibData::pairs.push_back(std::make_pair(CalibData::MdcCal,
93 CalibData::pairs.push_back(std::make_pair(CalibData::TofCal,
95 CalibData::pairs.push_back(std::make_pair(CalibData::DedxCal,
97 CalibData::pairs.push_back(std::make_pair(CalibData::EmcCal,
99 CalibData::pairs.push_back(std::make_pair(CalibData::MucCal,
101 CalibData::pairs.push_back(std::make_pair(CalibData::EsTimeCal,
103 CalibData::pairs.push_back(std::make_pair(CalibData::EstTofCal,
105 CalibData::pairs.push_back(std::make_pair(CalibData::MdcAlign,
107 CalibData::pairs.push_back(std::make_pair(CalibData::TofQElec,
109 CalibData::pairs.push_back(std::make_pair(CalibData::TofSim,
111 CalibData::pairs.push_back(std::make_pair(CalibData::DedxSim,
113 CalibData::pairs.push_back(std::make_pair(CalibData::MdcDataConstant,
115
116
117 }
118
119}; // end of calibModel class definition
120
121// Instantiate an instance to get the ball rolling.
122static CalibModel mod;
123
124
125#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_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_TofCal
Definition CalibModel.h:43
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:86
_EXTERN_ std::string MdcCal
Definition CalibModel.h:84
_EXTERN_ std::string DedxCal
Definition CalibModel.h:88
_EXTERN_ std::string TofSim
Definition CalibModel.h:102
_EXTERN_ std::string MdcDataConstant
Definition CalibModel.h:106
_EXTERN_ std::string EmcCal
Definition CalibModel.h:90
_EXTERN_ std::string TofQElec
Definition CalibModel.h:100
_EXTERN_ std::string EstTofCal
Definition CalibModel.h:96
_EXTERN_ std::string Test_1
Definition CalibModel.h:82
_EXTERN_ CalibPairCol pairs
Definition CalibModel.h:111
_EXTERN_ std::string EsTimeCal
Definition CalibModel.h:94
_EXTERN_ std::string DedxSim
Definition CalibModel.h:104
_EXTERN_ std::string MdcAlign
Definition CalibModel.h:98
_EXTERN_ std::string MucCal
Definition CalibModel.h:92
_EXTERN_ std::string Test_Gen
Definition CalibModel.h:79