12 TParameter<T>* p =
dynamic_cast<TParameter<T>*
>(f.Get(name.c_str()));
20 const std::string& filename)
22 m_file(TFile::Open(filename.c_str())) {
24 throw std::runtime_error(
"LArTemperatureCorrectionTool: Cannot open file");
27 m_tree =
dynamic_cast<TTree*
>(
m_file->Get(
"temperature"));
29 throw std::runtime_error(
"LArTemperatureCorrectionTool: Cannot find tree");
33 m_tree->SetBranchAddress(
"run", &t_run);
53 ATH_MSG_INFO(
"LArTemperatureCorrectionTool initialized for runs "
55 ATH_MSG_INFO(
"base temperatures (barrel/endcapA/endcapC) = "
58 ATH_MSG_INFO(
"sensitivity relE/K (barrel/endcapA/endcapC) = "
82 m_tree->SetBranchAddress(
"run", &t_run);
83 m_tree->SetBranchAddress(
"average_temperature_barrel", &t_barrel);
84 m_tree->SetBranchAddress(
"average_temperature_endcapA", &t_endcapA);
85 m_tree->SetBranchAddress(
"average_temperature_endcapC", &t_endcapC);
89 int high =
m_tree->GetEntries() - 1;
93 if (high - low < 50) {
94 for (
int i = low; i <= high; ++i) {
97 return AllValues{t_barrel, t_endcapA, t_endcapC};
103 mid = low + (high - low) / 2;
106 return AllValues{t_barrel, t_endcapA, t_endcapC};
107 }
else if (
run < t_run) {
127 "run " <<
run <<
" is before the first run - using the first run");
131 <<
" is after the last run - using the last run");
#define ATH_MSG_WARNING(x)
AsgMessaging(const std::string &name)
Constructor with a name.