46 const EventContext& ctx = Gaudi::Hive::currentContext();
47 EventIDBase t( getContext().eventID() );
50 ATH_MSG_INFO(
"execute: "<<getContext().eventID().event_number()<<
" , before CaloLocalHadCoeff");
53 if(condObject==
nullptr) {
54 ATH_MSG_ERROR(
"Unable to access conditions object CaloLocalHadCoeff");
55 return StatusCode::FAILURE;
59 ATH_MSG_INFO(
"execute: "<<getContext().eventID().event_number()<<
" , before beam pos");
65 return StatusCode::FAILURE;
67 float beamposX { (*raw)[
"posX"].data<
float>() };
68 ATH_MSG_INFO(
"execute: "<<getContext().eventID().event_number()<<
" , beam pos X = "<<beamposX);
71 ATH_MSG_INFO(
"execute: "<<getContext().eventID().event_number()<<
" , before loc shiftX");
74 if ( attrLocList ==
nullptr )
77 return StatusCode::FAILURE;
82 for (itr = attrLocList->
begin(); itr != attrLocList->
end(); ++itr) {
83 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/Align/Local, this is real channel nr. "<<counter);
85 const coral::AttributeList &atr = itr->second;
86 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
88 nlohmann::json jsondata = nlohmann::json::parse(
data);
89 int nchannels=jsondata[
"nchannels"];
90 nlohmann::json channeldata=jsondata[
"data"];
91 for(
auto& chan : channeldata.items())
95 nlohmann::json aligndata=chan.value();
97 std::string channel=chan.key();
98 int layerID=aligndata[
"layerID"];
99 float shiftX=aligndata[
"shiftX"];
101 ATH_MSG_INFO(
"execute: run "<<getContext().eventID().run_number()<<
", lb "<<getContext().eventID().lumi_block()<<
", evnt "<<getContext().eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", layerID "<<layerID<<
", shiftX = "<<shiftX);
109 ATH_MSG_INFO(
"test: "<<getContext().eventID().event_number()<<
" , before glob shiftX");
112 if ( attrGlobList ==
nullptr )
115 return StatusCode::FAILURE;
120 for (itr2 = attrGlobList->
begin(); itr2 != attrGlobList->
end(); ++itr2) {
121 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/Align/Global, this is real channel nr. "<<counter);
123 const coral::AttributeList &atr = itr2->second;
124 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
126 nlohmann::json jsondata = nlohmann::json::parse(
data);
127 int nchannels=jsondata[
"nchannels"];
128 nlohmann::json channeldata=jsondata[
"data"];
129 for(
auto& chan : channeldata.items())
133 nlohmann::json aligndata=chan.value();
135 std::string channel=chan.key();
136 std::string alignType=aligndata[
"alignType"];
137 float shiftX=aligndata[
"shiftX"];
139 ATH_MSG_INFO(
"execute: run "<<getContext().eventID().run_number()<<
", lb "<<getContext().eventID().lumi_block()<<
", evnt "<<getContext().eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", alignType "<<alignType<<
", shiftX = "<<shiftX);
147 ATH_MSG_INFO(
"execute: "<<getContext().eventID().event_number()<<
" , before loc tof");
150 if ( attrLocToFList ==
nullptr )
153 return StatusCode::FAILURE;
158 for (itr3 = attrLocToFList->
begin(); itr3 != attrLocToFList->
end(); ++itr3) {
159 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/ToFParameters/Local, this is real channel nr. "<<counter);
161 const coral::AttributeList &atr = itr3->second;
162 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
164 nlohmann::json jsondata = nlohmann::json::parse(
data);
165 int nchannels=jsondata[
"nchannels"];
166 nlohmann::json channeldata=jsondata[
"data"];
167 for(
auto& chan : channeldata.items())
171 nlohmann::json paramdata=chan.value();
173 std::string channel=chan.key();
174 int trainID=paramdata[
"trainID"];
175 float barWeight=paramdata[
"barWeight"];
177 ATH_MSG_INFO(
"execute: run "<<getContext().eventID().run_number()<<
", lb "<<getContext().eventID().lumi_block()<<
", evnt "<<getContext().eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", trainID "<<trainID<<
", barWeight = "<<barWeight);
184 ATH_MSG_INFO(
"execute: "<<getContext().eventID().event_number()<<
" , before vtx tof");
187 if ( attrVtxToFList ==
nullptr )
190 return StatusCode::FAILURE;
195 for (itr4 = attrVtxToFList->
begin(); itr4 != attrVtxToFList->
end(); ++itr4) {
196 if(counter>1)
ATH_MSG_INFO(
"there should be only one real channel in /FWD/AFP/ToFParameters/Vertex, this is real channel nr. "<<counter);
198 const coral::AttributeList &atr = itr4->second;
199 std::string
data = *(
static_cast<const std::string *
>((atr[
"data"]).addressOfData()));
201 nlohmann::json jsondata = nlohmann::json::parse(
data);
202 int nchannels=jsondata[
"nchannels"];
203 nlohmann::json channeldata=jsondata[
"data"];
204 for(
auto& chan : channeldata.items())
208 nlohmann::json paramdata=chan.value();
210 std::string channel=chan.key();
211 int stationID=paramdata[
"stationID"];
212 float timeGlobalOffset=paramdata[
"timeGlobalOffset"];
213 std::vector<float> trainEdge=paramdata[
"trainEdge"];
215 ATH_MSG_INFO(
"execute: run "<<getContext().eventID().run_number()<<
", lb "<<getContext().eventID().lumi_block()<<
", evnt "<<getContext().eventID().event_number()<<
", channel "<<channel<<
"/"<<nchannels<<
", stationID "<<stationID<<
", timeGlobalOffset = "<<timeGlobalOffset<<
", trainEdge = ("<<trainEdge.at(0)<<
", "<<trainEdge.at(1)<<
", ... "<<trainEdge.at(4)<<
")");
221 return StatusCode::SUCCESS;