31 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before CaloLocalHadCoeff");
34 if(condObject==
nullptr) {
35 ATH_MSG_ERROR(
"Unable to access conditions object CaloLocalHadCoeff");
36 return StatusCode::FAILURE;
40 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before beam pos");
46 return StatusCode::FAILURE;
48 float beamposX { (*raw)[
"posX"].data<
float>() };
49 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , beam pos X = "<<beamposX);
52 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before loc shiftX");
55 if ( attrLocList ==
nullptr )
58 return StatusCode::FAILURE;
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);
66 const coral::AttributeList &atr = itr->second;
67 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
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())
76 nlohmann::json aligndata=chan.value();
78 std::string channel=chan.key();
79 int layerID=aligndata[
"layerID"];
80 float shiftX=aligndata[
"shiftX"];
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);
90 ATH_MSG_INFO(
"test: "<<ctx.eventID().event_number()<<
" , before glob shiftX");
93 if ( attrGlobList ==
nullptr )
96 return StatusCode::FAILURE;
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);
104 const coral::AttributeList &atr = itr2->second;
105 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
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())
114 nlohmann::json aligndata=chan.value();
116 std::string channel=chan.key();
117 std::string alignType=aligndata[
"alignType"];
118 float shiftX=aligndata[
"shiftX"];
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);
128 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before loc tof");
131 if ( attrLocToFList ==
nullptr )
134 return StatusCode::FAILURE;
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);
142 const coral::AttributeList &atr = itr3->second;
143 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
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())
152 nlohmann::json paramdata=chan.value();
154 std::string channel=chan.key();
155 int trainID=paramdata[
"trainID"];
156 float barWeight=paramdata[
"barWeight"];
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);
165 ATH_MSG_INFO(
"execute: "<<ctx.eventID().event_number()<<
" , before vtx tof");
168 if ( attrVtxToFList ==
nullptr )
171 return StatusCode::FAILURE;
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);
179 const coral::AttributeList &atr = itr4->second;
180 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
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())
189 nlohmann::json paramdata=chan.value();
191 std::string channel=chan.key();
192 int stationID=paramdata[
"stationID"];
193 float timeGlobalOffset=paramdata[
"timeGlobalOffset"];
194 std::vector<float> trainEdge=paramdata[
"trainEdge"];
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)<<
")");
202 return StatusCode::SUCCESS;