29{
30
31 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before CaloLocalHadCoeff");
32 SG::ReadCondHandle<CaloLocalHadCoeff> rch(
m_key, ctx);
33 const CaloLocalHadCoeff* condObject = *rch;
34 if(condObject==nullptr) {
35 ATH_MSG_ERROR(
"Unable to access conditions object CaloLocalHadCoeff");
36 return StatusCode::FAILURE;
37 }
38
39
40 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before beam pos");
41 SG::ReadCondHandle<AthenaAttributeList> readHandle{
m_readKey, ctx };
42 const AthenaAttributeList* raw { *readHandle };
43 if ( raw == nullptr )
44 {
46 return StatusCode::FAILURE;
47 }
48 float beamposX { (*raw)["posX"].data<float>() };
49 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , beam pos X = "<<beamposX);
50
51
52 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before loc shiftX");
53 SG::ReadCondHandle<CondAttrListCollection> ch_locshiftX(
m_rch_locshiftX, ctx );
54 const CondAttrListCollection* attrLocList { *ch_locshiftX };
55 if ( attrLocList == nullptr )
56 {
58 return StatusCode::FAILURE;
59 }
60
63 for (itr = attrLocList->
begin(); itr != attrLocList->
end(); ++itr) {
64 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/Align/Local, this is real channel nr. "<<counter);
65
66 const coral::AttributeList &atr = itr->second;
67 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
68
69 nlohmann::json jsondata = nlohmann::json::parse(
data);
70 int nchannels=jsondata["nchannels"];
71 nlohmann::json channeldata=jsondata["data"];
72 for(auto& chan : channeldata.items())
73 {
74
76 nlohmann::json aligndata=
chan.value();
77
79 int layerID=aligndata["layerID"];
80 float shiftX=aligndata["shiftX"];
81
82 ATH_MSG_INFO(
"execute: run "<<ctx.eventID().run_number()<<
", lb "<<ctx.eventID().lumi_block()<<
", evnt "<<ctx.eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", layerID "<<layerID<<
", shiftX = "<<shiftX);
83 }
84
86 }
87
88
89
90 ATH_MSG_INFO(
"test: "<<ctx.eventID().event_number()<<
" , before glob shiftX");
91 SG::ReadCondHandle<CondAttrListCollection> ch_globshiftX(
m_rch_globshiftX, ctx );
92 const CondAttrListCollection* attrGlobList { *ch_globshiftX };
93 if ( attrGlobList == nullptr )
94 {
96 return StatusCode::FAILURE;
97 }
98
101 for (itr2 = attrGlobList->
begin(); itr2 != attrGlobList->
end(); ++itr2) {
102 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/Align/Global, this is real channel nr. "<<counter);
103
104 const coral::AttributeList &atr = itr2->second;
105 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
106
107 nlohmann::json jsondata = nlohmann::json::parse(
data);
108 int nchannels=jsondata["nchannels"];
109 nlohmann::json channeldata=jsondata["data"];
110 for(auto& chan : channeldata.items())
111 {
112
114 nlohmann::json aligndata=
chan.value();
115
117 std::string alignType=aligndata["alignType"];
118 float shiftX=aligndata["shiftX"];
119
120 ATH_MSG_INFO(
"execute: run "<<ctx.eventID().run_number()<<
", lb "<<ctx.eventID().lumi_block()<<
", evnt "<<ctx.eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", alignType "<<alignType<<
", shiftX = "<<shiftX);
121 }
122
124 }
125
126
127
128 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before loc tof");
129 SG::ReadCondHandle<CondAttrListCollection> ch_loctof(
m_rch_loctof, ctx );
130 const CondAttrListCollection* attrLocToFList { *ch_loctof };
131 if ( attrLocToFList == nullptr )
132 {
134 return StatusCode::FAILURE;
135 }
136
139 for (itr3 = attrLocToFList->
begin(); itr3 != attrLocToFList->
end(); ++itr3) {
140 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/ToFParameters/Local, this is real channel nr. "<<counter);
141
142 const coral::AttributeList &atr = itr3->second;
143 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
144
145 nlohmann::json jsondata = nlohmann::json::parse(
data);
146 int nchannels=jsondata["nchannels"];
147 nlohmann::json channeldata=jsondata["data"];
148 for(auto& chan : channeldata.items())
149 {
150
152 nlohmann::json paramdata=
chan.value();
153
155 int trainID=paramdata["trainID"];
156 float barWeight=paramdata["barWeight"];
157
158 ATH_MSG_INFO(
"execute: run "<<ctx.eventID().run_number()<<
", lb "<<ctx.eventID().lumi_block()<<
", evnt "<<ctx.eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", trainID "<<trainID<<
", barWeight = "<<barWeight);
159 }
160
162 }
163
164
165 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before vtx tof");
166 SG::ReadCondHandle<CondAttrListCollection> ch_vtxtof(
m_rch_vtxtof, ctx );
167 const CondAttrListCollection* attrVtxToFList { *ch_vtxtof };
168 if ( attrVtxToFList == nullptr )
169 {
171 return StatusCode::FAILURE;
172 }
173
176 for (itr4 = attrVtxToFList->
begin(); itr4 != attrVtxToFList->
end(); ++itr4) {
177 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/ToFParameters/Vertex, this is real channel nr. "<<counter);
178
179 const coral::AttributeList &atr = itr4->second;
180 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
181
182 nlohmann::json jsondata = nlohmann::json::parse(
data);
183 int nchannels=jsondata["nchannels"];
184 nlohmann::json channeldata=jsondata["data"];
185 for(auto& chan : channeldata.items())
186 {
187
189 nlohmann::json paramdata=
chan.value();
190
193 float timeGlobalOffset=paramdata["timeGlobalOffset"];
194 std::vector<float> trainEdge=paramdata["trainEdge"];
195
196 ATH_MSG_INFO(
"execute: run "<<ctx.eventID().run_number()<<
", lb "<<ctx.eventID().lumi_block()<<
", evnt "<<ctx.eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", stationID "<<stationID<<
", timeGlobalOffset = "<<timeGlobalOffset<<
", trainEdge = ("<<trainEdge.at(0)<<
", "<<trainEdge.at(1)<<
", ... "<<trainEdge.at(4)<<
")");
197 }
198
200 }
201
202 return StatusCode::SUCCESS;
203}
char data[hepevt_bytes_allocation_ATLAS]
SG::ReadCondHandleKey< CaloLocalHadCoeff > m_key
SG::ReadCondHandleKey< CondAttrListCollection > m_rch_globshiftX
SG::ReadCondHandleKey< AthenaAttributeList > m_readKey
SG::ReadCondHandleKey< CondAttrListCollection > m_rch_locshiftX
SG::ReadCondHandleKey< CondAttrListCollection > m_rch_loctof
SG::ReadCondHandleKey< CondAttrListCollection > m_rch_vtxtof
const_iterator end() const
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
ChanAttrListMap::const_iterator const_iterator
constexpr uint8_t stationID
Large or Small wedge.