ATLAS Offline Software
Functions
toEMECData.h File Reference
#include "GeoSpecialShapes/EMECData.h"
#include <iostream>
Include dependency graph for toEMECData.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

EMECData toEMECData (IRDBAccessSvc *rdbAccess, const DecodeVersionKey &larVersionKey)
 

Function Documentation

◆ toEMECData()

EMECData toEMECData ( IRDBAccessSvc rdbAccess,
const DecodeVersionKey larVersionKey 
)
inline

Definition at line 14 of file toEMECData.h.

14  {
15 
16  EMECData data;
17 
18  // Little lambda function here: retreive recordset and fall back to default version if empty:
19  auto getRecordsetPtr=[rdbAccess] (const std::string& node, const std::string& tag, const std::string& tag2node,const std::string & fallbackTag2Node) {
20 
21  // try with specified tag/node
22  IRDBRecordset_ptr ptr=rdbAccess->getRecordsetPtr(node,tag, tag2node);
23  // if failure, try with fallback tag/node
24  if (ptr->size()==0) {
25  ptr=rdbAccess->getRecordsetPtr(node,fallbackTag2Node);
26  }
27  return ptr;
28  };
29 
30 
31  IRDBRecordset_ptr emecGeometry = getRecordsetPtr("EmecGeometry", larVersionKey.tag(),larVersionKey.node(),"EmecGeometry-00");
32  IRDBRecordset_ptr emecMagicNumbers = getRecordsetPtr("EmecMagicNumbers", larVersionKey.tag(), larVersionKey.node(),"EmecMagicNumbers-00");
33  IRDBRecordset_ptr emecParams = getRecordsetPtr("EmecParams", larVersionKey.tag(), larVersionKey.node(),"EMECParams-00");
34  IRDBRecordset_ptr emecWheelParameters = getRecordsetPtr("EmecWheelParameters", larVersionKey.tag(), larVersionKey.node(),"EmecWheelParameters-00");
35  IRDBRecordset_ptr emecFan = getRecordsetPtr("EmecFan", larVersionKey.tag(), larVersionKey.node(),"EmecFan-00");
36  IRDBRecordset_ptr coldContraction = getRecordsetPtr("ColdContraction", larVersionKey.tag(), larVersionKey.node(),"ColdContraction-00");
37 
38 
39  for (size_t i=0;i<emecParams->size();i++) {
40  EMECPARAMS emecparams;
41  emecparams.PHIROTATION=(*emecParams)[i]->getString("PHIROTATION");
42  emecparams.SAGGING=(*emecParams)[i]->getString("SAGGING");
43  emecparams.INNERSLANTPARAM=(*emecParams)[i]->getString("INNERSLANTPARAM");
44  emecparams.OUTERSLANTPARAM=(*emecParams)[i]->getString("OUTERSLANTPARAM");
45  data.emecparams.push_back(emecparams);
46  }
47 
48 
49  for (size_t i=0;i<emecWheelParameters->size();i++) {
50  EMECWHEELPARAMETERS emecwheelparameters;
51  emecwheelparameters.IWHEEL=(*emecWheelParameters)[i]->getInt("IWHEEL");
52  emecwheelparameters.NABS=(*emecWheelParameters)[i]->getInt("NABS");
53  emecwheelparameters.NACC=(*emecWheelParameters)[i]->getInt("NACC");
54  emecwheelparameters.ETAINT=(*emecWheelParameters)[i]->getDouble("ETAINT");
55  emecwheelparameters.ETAEXT=(*emecWheelParameters)[i]->getDouble("ETAEXT");
56  emecwheelparameters.NWSAMP=(*emecWheelParameters)[i]->getInt("NWSAMP");
57  data.emecwheelparameters.push_back(emecwheelparameters);
58  }
59 
60  for (size_t i=0;i<emecMagicNumbers->size();i++) {
61  EMECMAGICNUMBERS emecmagicnumbers;
62  emecmagicnumbers.STRAIGHTSTARTSECTION=(*emecMagicNumbers)[i]->getDouble("STRAIGHTSTARTSECTION");
63  emecmagicnumbers.FOCALTOREF=(*emecMagicNumbers)[i]->getDouble("FOCALTOREF");
64  emecmagicnumbers.REFTOACTIVE=(*emecMagicNumbers)[i]->getDouble("REFTOACTIVE");
65  emecmagicnumbers.ACTIVELENGTH=(*emecMagicNumbers)[i]->getDouble("ACTIVELENGTH");
66  emecmagicnumbers.REFTOPRESAMPLER=(*emecMagicNumbers)[i]->getDouble("REFTOPRESAMPLER");
67  emecmagicnumbers.PRESAMPLERLENGTH=(*emecMagicNumbers)[i]->getDouble("PRESAMPLERLENGTH");
68  data.emecmagicnumbers.push_back(emecmagicnumbers);
69  }
70 
71  for (size_t i=0;i<emecFan->size();i++) {
72  EMECFAN emecfan;
73  emecfan.LEADTHICKNESSINNER=(*emecFan)[i]->getDouble("LEADTHICKNESSINNER");
74  emecfan.LEADTHICKNESSOUTER=(*emecFan)[i]->getDouble("LEADTHICKNESSOUTER");
75  emecfan.STEELTHICKNESS=(*emecFan)[i]->getDouble("STEELTHICKNESS");
76  emecfan.GLUETHICKNESS=(*emecFan)[i]->getDouble("GLUETHICKNESS");
77  emecfan.ELECTRODETOTALTHICKNESS=(*emecFan)[i]->getDouble("ELECTRODETOTALTHICKNESS");
78  data.emecfan.push_back(emecfan);
79  }
80 
81 
82  for (size_t i=0;i<coldContraction->size();i++) {
83  COLDCONTRACTION coldcontraction;
84  coldcontraction.ABSORBERCONTRACTION=(*coldContraction)[i]->getDouble("ABSORBERCONTRACTION");
85  coldcontraction.G10RINGCONTRACTION=(*coldContraction)[i]->getDouble("G10RINGCONTRACTION");
86  coldcontraction.MOTHERBOARDCONTRACTION=(*coldContraction)[i]->getDouble("MOTHERBOARDCONTRACTION");
87  coldcontraction.CABLECONTRACTION=(*coldContraction)[i]->getDouble("CABLECONTRACTION");
88  coldcontraction.COLDWINDOWCONTRACTION=(*coldContraction)[i]->getDouble("COLDWINDOWCONTRACTION");
89  coldcontraction.ELECTRODEINVCONTRACTION=(*coldContraction)[i]->getDouble("ELECTRODEINVCONTRACTION");
90  data.coldcontraction.push_back(coldcontraction);
91  }
92 
93 
94  for (size_t i=0;i<emecGeometry->size();i++) {
95  EMECGEOMETRY emecgeometry;
96  emecgeometry.EFIELD=(*emecGeometry)[i]->getDouble("EFIELD");
97  emecgeometry.MLGAP=(*emecGeometry)[i]->getDouble("MLGAP");
98  emecgeometry.SABL=(*emecGeometry)[i]->getDouble("SABL");
99  emecgeometry.SBAR=(*emecGeometry)[i]->getDouble("SBAR");
100  emecgeometry.SBRN=(*emecGeometry)[i]->getDouble("SBRN");
101  emecgeometry.SCRB=(*emecGeometry)[i]->getDouble("SCRB");
102  emecgeometry.Z1=(*emecGeometry)[i]->getDouble("Z1");
103  emecgeometry.Z0=(*emecGeometry)[i]->getDouble("Z0");
104  emecgeometry.DCF=(*emecGeometry)[i]->getDouble("DCF");
105  emecgeometry.RLIMIT=(*emecGeometry)[i]->getDouble("RLIMIT");
106  emecgeometry.EPS=(*emecGeometry)[i]->getDouble("EPS");
107  emecgeometry.RHOIN=(*emecGeometry)[i]->getDouble("RHOIN");
108  emecgeometry.RCKP=(*emecGeometry)[i]->getDouble("RCKP");
109  emecgeometry.ETOT=(*emecGeometry)[i]->getDouble("ETOT");
110  emecgeometry.EKAP=(*emecGeometry)[i]->getDouble("EKAP");
111  emecgeometry.ECU=(*emecGeometry)[i]->getDouble("ECU");
112  emecgeometry.EPREP=(*emecGeometry)[i]->getDouble("EPREP");
113  emecgeometry.EINOX=(*emecGeometry)[i]->getDouble("EINOX");
114  emecgeometry.NLAYER=(*emecGeometry)[i]->getInt("NLAYER");
115  emecgeometry.RMIN=(*emecGeometry)[i]->getDouble("RMIN");
116  emecgeometry.RMAX=(*emecGeometry)[i]->getDouble("RMAX");
117  emecgeometry.DZENDE=(*emecGeometry)[i]->getDouble("DZENDE");
118  emecgeometry.ZORIG=(*emecGeometry)[i]->getDouble("ZORIG");
119  emecgeometry.DCRACK=(*emecGeometry)[i]->getDouble("DCRACK");
120  emecgeometry.DZPLA=(*emecGeometry)[i]->getDouble("DZPLA");
121  emecgeometry.DZDSE=(*emecGeometry)[i]->getDouble("DZDSE");
122  emecgeometry.DZDSM=(*emecGeometry)[i]->getDouble("DZDSM");
123  emecgeometry.DZDSI=(*emecGeometry)[i]->getDouble("DZDSI");
124  emecgeometry.NUREG=(*emecGeometry)[i]->getInt("NUREG");
125  emecgeometry.DETA_0=(*emecGeometry)[i]->getDouble("DETA_0");
126  emecgeometry.DETA_1=(*emecGeometry)[i]->getDouble("DETA_1");
127  emecgeometry.DETA_2=(*emecGeometry)[i]->getDouble("DETA_2");
128  emecgeometry.DETA_3=(*emecGeometry)[i]->getDouble("DETA_3");
129  emecgeometry.DETA_4=(*emecGeometry)[i]->getDouble("DETA_4");
130  emecgeometry.DETA_5=(*emecGeometry)[i]->getDouble("DETA_5");
131  emecgeometry.DETA_6=(*emecGeometry)[i]->getDouble("DETA_6");
132  emecgeometry.DETA_7=(*emecGeometry)[i]->getDouble("DETA_7");
133  emecgeometry.DETA_8=(*emecGeometry)[i]->getDouble("DETA_8");
134  emecgeometry.DETA_9=(*emecGeometry)[i]->getDouble("DETA_9");
135  emecgeometry.DETA_10=(*emecGeometry)[i]->getDouble("DETA_10");
136  emecgeometry.DPHI_0=(*emecGeometry)[i]->getDouble("DPHI_0");
137  emecgeometry.DPHI_1=(*emecGeometry)[i]->getDouble("DPHI_1");
138  emecgeometry.DPHI_2=(*emecGeometry)[i]->getDouble("DPHI_2");
139  emecgeometry.DPHI_3=(*emecGeometry)[i]->getDouble("DPHI_3");
140  emecgeometry.DPHI_4=(*emecGeometry)[i]->getDouble("DPHI_4");
141  emecgeometry.DPHI_5=(*emecGeometry)[i]->getDouble("DPHI_5");
142  emecgeometry.DPHI_6=(*emecGeometry)[i]->getDouble("DPHI_6");
143  emecgeometry.DPHI_7=(*emecGeometry)[i]->getDouble("DPHI_7");
144  emecgeometry.DPHI_8=(*emecGeometry)[i]->getDouble("DPHI_8");
145  emecgeometry.DPHI_9=(*emecGeometry)[i]->getDouble("DPHI_9");
146  emecgeometry.DPHI_10=(*emecGeometry)[i]->getDouble("DPHI_10");
147  emecgeometry.ETASTR_0=(*emecGeometry)[i]->getDouble("ETASTR_0");
148  emecgeometry.ETASTR_1=(*emecGeometry)[i]->getDouble("ETASTR_1");
149  emecgeometry.ETASTR_2=(*emecGeometry)[i]->getDouble("ETASTR_2");
150  emecgeometry.ETASTR_3=(*emecGeometry)[i]->getDouble("ETASTR_3");
151  emecgeometry.ETASTR_4=(*emecGeometry)[i]->getDouble("ETASTR_4");
152  emecgeometry.ETASTR_5=(*emecGeometry)[i]->getDouble("ETASTR_5");
153  emecgeometry.ETASTR_6=(*emecGeometry)[i]->getDouble("ETASTR_6");
154  emecgeometry.EMHIT=(*emecGeometry)[i]->getDouble("EMHIT");
155  emecgeometry.EMDIGI=(*emecGeometry)[i]->getDouble("EMDIGI");
156  emecgeometry.GAP0=(*emecGeometry)[i]->getDouble("GAP0");
157  emecgeometry.ZSHIFT=(*emecGeometry)[i]->getDouble("ZSHIFT");
158  data.emecgeometry.push_back(emecgeometry);
159  }
160 
161 
162  return data;
163 }
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
EMECGEOMETRY::DPHI_6
double DPHI_6
Definition: EMECData.h:66
EMECGEOMETRY::DETA_7
double DETA_7
Definition: EMECData.h:56
EMECPARAMS::INNERSLANTPARAM
std::string INNERSLANTPARAM
Definition: EMECData.h:88
EMECFAN::LEADTHICKNESSOUTER
double LEADTHICKNESSOUTER
Definition: EMECData.h:124
EMECGEOMETRY::ZORIG
double ZORIG
Definition: EMECData.h:42
EMECMAGICNUMBERS::PRESAMPLERLENGTH
double PRESAMPLERLENGTH
Definition: EMECData.h:109
EMECGEOMETRY::ETASTR_6
double ETASTR_6
Definition: EMECData.h:77
EMECFAN::STEELTHICKNESS
double STEELTHICKNESS
Definition: EMECData.h:125
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
EMECGEOMETRY::RHOIN
double RHOIN
Definition: EMECData.h:31
EMECFAN
Definition: EMECData.h:122
EMECGEOMETRY::EINOX
double EINOX
Definition: EMECData.h:37
EMECGEOMETRY::DPHI_4
double DPHI_4
Definition: EMECData.h:64
EMECGEOMETRY::DETA_9
double DETA_9
Definition: EMECData.h:58
EMECGEOMETRY::ETASTR_1
double ETASTR_1
Definition: EMECData.h:72
EMECData
Definition: EMECData.h:131
EMECGEOMETRY::ECU
double ECU
Definition: EMECData.h:35
EMECGEOMETRY::DETA_8
double DETA_8
Definition: EMECData.h:57
EMECPARAMS::PHIROTATION
std::string PHIROTATION
Definition: EMECData.h:86
EMECGEOMETRY::DETA_5
double DETA_5
Definition: EMECData.h:54
DecodeVersionKey::node
const std::string & node() const
Return the version node.
Definition: DecodeVersionKey.cxx:99
EMECGEOMETRY::DPHI_8
double DPHI_8
Definition: EMECData.h:68
EMECGEOMETRY::DPHI_5
double DPHI_5
Definition: EMECData.h:65
EMECGEOMETRY::DPHI_10
double DPHI_10
Definition: EMECData.h:70
EMECGEOMETRY::DCF
double DCF
Definition: EMECData.h:28
EMECGEOMETRY::Z0
double Z0
Definition: EMECData.h:27
EMECGEOMETRY::DETA_3
double DETA_3
Definition: EMECData.h:52
EMECGEOMETRY::EFIELD
double EFIELD
Definition: EMECData.h:20
EMECGEOMETRY::SABL
double SABL
Definition: EMECData.h:22
EMECFAN::ELECTRODETOTALTHICKNESS
double ELECTRODETOTALTHICKNESS
Definition: EMECData.h:127
EMECWHEELPARAMETERS::NABS
int NABS
Definition: EMECData.h:95
EMECMAGICNUMBERS
Definition: EMECData.h:103
EMECWHEELPARAMETERS::IWHEEL
int IWHEEL
Definition: EMECData.h:94
EMECMAGICNUMBERS::REFTOPRESAMPLER
double REFTOPRESAMPLER
Definition: EMECData.h:108
EMECGEOMETRY::ETASTR_4
double ETASTR_4
Definition: EMECData.h:75
EMECGEOMETRY::DZDSM
double DZDSM
Definition: EMECData.h:46
EMECGEOMETRY::DPHI_7
double DPHI_7
Definition: EMECData.h:67
EMECGEOMETRY::DPHI_1
double DPHI_1
Definition: EMECData.h:61
EMECFAN::LEADTHICKNESSINNER
double LEADTHICKNESSINNER
Definition: EMECData.h:123
EMECFAN::GLUETHICKNESS
double GLUETHICKNESS
Definition: EMECData.h:126
EMECGEOMETRY::EMDIGI
double EMDIGI
Definition: EMECData.h:79
EMECGEOMETRY::DETA_10
double DETA_10
Definition: EMECData.h:59
COLDCONTRACTION::G10RINGCONTRACTION
double G10RINGCONTRACTION
Definition: EMECData.h:115
lumiFormat.i
int i
Definition: lumiFormat.py:92
COLDCONTRACTION::MOTHERBOARDCONTRACTION
double MOTHERBOARDCONTRACTION
Definition: EMECData.h:116
EMECGEOMETRY::EPREP
double EPREP
Definition: EMECData.h:36
EMECGEOMETRY::DETA_1
double DETA_1
Definition: EMECData.h:50
EMECWHEELPARAMETERS
Definition: EMECData.h:93
EMECMAGICNUMBERS::STRAIGHTSTARTSECTION
double STRAIGHTSTARTSECTION
Definition: EMECData.h:104
EMECWHEELPARAMETERS::NACC
int NACC
Definition: EMECData.h:96
EMECGEOMETRY::GAP0
double GAP0
Definition: EMECData.h:80
EMECGEOMETRY::DZDSE
double DZDSE
Definition: EMECData.h:45
EMECGEOMETRY::ETASTR_0
double ETASTR_0
Definition: EMECData.h:71
EMECGEOMETRY::DPHI_9
double DPHI_9
Definition: EMECData.h:69
DecodeVersionKey::tag
const std::string & tag() const
Return version tag.
Definition: DecodeVersionKey.cxx:93
EMECGEOMETRY::DPHI_3
double DPHI_3
Definition: EMECData.h:63
EMECGEOMETRY::SBRN
double SBRN
Definition: EMECData.h:24
EMECGEOMETRY::DCRACK
double DCRACK
Definition: EMECData.h:43
COLDCONTRACTION::CABLECONTRACTION
double CABLECONTRACTION
Definition: EMECData.h:117
EMECGEOMETRY::SCRB
double SCRB
Definition: EMECData.h:25
PyPoolBrowser.node
node
Definition: PyPoolBrowser.py:131
EMECPARAMS
Definition: EMECData.h:85
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
EMECGEOMETRY::EMHIT
double EMHIT
Definition: EMECData.h:78
EMECPARAMS::SAGGING
std::string SAGGING
Definition: EMECData.h:87
EMECGEOMETRY::DETA_0
double DETA_0
Definition: EMECData.h:49
EMECGEOMETRY::EPS
double EPS
Definition: EMECData.h:30
EMECGEOMETRY::DETA_6
double DETA_6
Definition: EMECData.h:55
EMECMAGICNUMBERS::ACTIVELENGTH
double ACTIVELENGTH
Definition: EMECData.h:107
EMECMAGICNUMBERS::FOCALTOREF
double FOCALTOREF
Definition: EMECData.h:105
EMECGEOMETRY::DETA_4
double DETA_4
Definition: EMECData.h:53
EMECPARAMS::OUTERSLANTPARAM
std::string OUTERSLANTPARAM
Definition: EMECData.h:89
EMECGEOMETRY::ETASTR_5
double ETASTR_5
Definition: EMECData.h:76
EMECGEOMETRY::DZPLA
double DZPLA
Definition: EMECData.h:44
EMECGEOMETRY::ETASTR_3
double ETASTR_3
Definition: EMECData.h:74
EMECWHEELPARAMETERS::ETAEXT
double ETAEXT
Definition: EMECData.h:98
EMECGEOMETRY::RMIN
double RMIN
Definition: EMECData.h:39
EMECGEOMETRY::DPHI_2
double DPHI_2
Definition: EMECData.h:62
COLDCONTRACTION
Definition: EMECData.h:113
EMECGEOMETRY
Definition: EMECData.h:19
EMECGEOMETRY::DZENDE
double DZENDE
Definition: EMECData.h:41
EMECGEOMETRY::DPHI_0
double DPHI_0
Definition: EMECData.h:60
EMECGEOMETRY::Z1
double Z1
Definition: EMECData.h:26
EMECMAGICNUMBERS::REFTOACTIVE
double REFTOACTIVE
Definition: EMECData.h:106
EMECGEOMETRY::RMAX
double RMAX
Definition: EMECData.h:40
EMECWHEELPARAMETERS::ETAINT
double ETAINT
Definition: EMECData.h:97
EMECGEOMETRY::EKAP
double EKAP
Definition: EMECData.h:34
EMECGEOMETRY::RCKP
double RCKP
Definition: EMECData.h:32
EMECWHEELPARAMETERS::NWSAMP
int NWSAMP
Definition: EMECData.h:99
EMECGEOMETRY::DETA_2
double DETA_2
Definition: EMECData.h:51
EMECGEOMETRY::ETOT
double ETOT
Definition: EMECData.h:33
EMECGEOMETRY::MLGAP
double MLGAP
Definition: EMECData.h:21
COLDCONTRACTION::ABSORBERCONTRACTION
double ABSORBERCONTRACTION
Definition: EMECData.h:114
EMECGEOMETRY::NLAYER
int NLAYER
Definition: EMECData.h:38
COLDCONTRACTION::COLDWINDOWCONTRACTION
double COLDWINDOWCONTRACTION
Definition: EMECData.h:118
EMECGEOMETRY::NUREG
int NUREG
Definition: EMECData.h:48
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
EMECGEOMETRY::ZSHIFT
double ZSHIFT
Definition: EMECData.h:81
EMECGEOMETRY::RLIMIT
double RLIMIT
Definition: EMECData.h:29
EMECGEOMETRY::SBAR
double SBAR
Definition: EMECData.h:23
EMECGEOMETRY::ETASTR_2
double ETASTR_2
Definition: EMECData.h:73
COLDCONTRACTION::ELECTRODEINVCONTRACTION
double ELECTRODEINVCONTRACTION
Definition: EMECData.h:119
node
Definition: memory_hooks-stdcmalloc.h:74
EMECGEOMETRY::DZDSI
double DZDSI
Definition: EMECData.h:47