107{
111 TFile*
f=TFile::Open(full_path.c_str());
112 if(f==nullptr)
113 {
115 return StatusCode::FAILURE;
116 }
117
118 m_h3W=(TH3F*)
f->GetObjectChecked(
"h3_w",
"TH3F");
120 {
121 ATH_MSG_FATAL(
"Cannot find TH3F m_h3W in config file " << full_path );
122 return StatusCode::FAILURE;
123 }
124
125 m_h3Eta=(TH3F*)
f->GetObjectChecked(
"h3_eta",
"TH3F");
127 {
128 ATH_MSG_FATAL(
"Cannot find TH3F m_h3Eta in config file " << full_path );
129 return StatusCode::FAILURE;
130 }
131
132 m_h3Phi=(TH3F*)
f->GetObjectChecked(
"h3_phi",
"TH3F");
134 {
135 ATH_MSG_FATAL(
"Cannot find TH3F m_h3Phi in config file " << full_path );
136 return StatusCode::FAILURE;
137 }
138
139 m_h3Mag=(TH3F*)
f->GetObjectChecked(
"h3_R",
"TH3F");
141 {
142 ATH_MSG_FATAL(
"Cannot find TH3F m_h3Mag in config file " << full_path );
143 return StatusCode::FAILURE;
144 }
145
146 m_h3W->SetDirectory(0);
150
152 {
153 ATH_MSG_DEBUG(
"ApplyCorrection is set to true, now loading h3_eta_phi_response, h3_eta_phi_offset, and h1_run_index.");
154
157 {
158 ATH_MSG_FATAL(
"Cannot find TH3F h3_eta_phi_response in config file " << full_path );
159 return StatusCode::FAILURE;
160 }
164 {
165 ATH_MSG_FATAL(
"Cannot find TH3F h3_eta_phi_offset in config file " << full_path );
166 return StatusCode::FAILURE;
167 }
169
170 TH1I* h1_run_index=(TH1I*)
f->GetObjectChecked(
"h1_run_index",
"TH1I");
171 if(h1_run_index==nullptr)
172 {
173 ATH_MSG_FATAL(
"Cannot find TH3F h1_run_index in config file " << full_path );
174 return StatusCode::FAILURE;
175 }
176 for(int xbin=1; xbin<=h1_run_index->GetNbinsX(); xbin++) {
177 m_runMap.emplace_hint(
m_runMap.end(),std::make_pair(h1_run_index->GetBinContent(xbin),xbin));
178 }
179 }
180 else
181 {
182 ATH_MSG_DEBUG(
"ApplyCorrection is set to false, not loading h3_eta_phi_response, h3_eta_phi_offset, and h1_run_index.");
183 }
184
186 return StatusCode::SUCCESS;
187}
std::string PathResolverFindCalibFile(const std::string &logical_file_name)