6#include "GaudiKernel/Algorithm.h"
7#include "GaudiKernel/MsgStream.h"
24 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::initialize");
26 log << MSG::INFO <<
"Initializing" <<
endmsg;
33 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::SetDefaultValues");
50 std::map <std::string, parDouble>::iterator doubleMapIt =
m_doubleMap.begin();
51 std::map <std::string, parInt>::iterator intMapIt =
m_intMap.begin();
53 for (; doubleMapIt !=
m_doubleMap.end(); ++doubleMapIt) alg->declareProperty(std::string(
"Overwrite_") + doubleMapIt->first, doubleMapIt->second.overwriteVal);
54 for (; intMapIt !=
m_intMap.end() ; ++intMapIt ) alg->declareProperty(std::string(
"Overwrite_") + intMapIt->first , intMapIt->second.overwriteVal);
59 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings");
61 log << MSG::INFO <<
" OverwriteDigiParValues " <<
endmsg;
63 std::map <std::string, parDouble>::iterator doubleMapIt =
m_doubleMap.begin();
64 std::map <std::string, parInt>::iterator intMapIt =
m_intMap.begin();
68 for (; doubleMapIt !=
m_doubleMap.end(); ++doubleMapIt) {
70 if (doubleMapIt->second.overwriteVal > doubleMapIt->second.low &&
71 doubleMapIt->second.overwriteVal < doubleMapIt->second.high) {
73 *(doubleMapIt->second.par) = doubleMapIt->second.overwriteVal;
75 log << MSG::INFO <<
" Overwriting: "
76 << doubleMapIt->second.parDescription <<
" to : "
77 << doubleMapIt->second.overwriteVal <<
endmsg;
84 for (; intMapIt !=
m_intMap.end(); ++intMapIt) {
86 if (intMapIt->second.overwriteVal > intMapIt->second.low &&
87 intMapIt->second.overwriteVal < intMapIt->second.high) {
89 *(intMapIt->second.par) = intMapIt->second.overwriteVal;
91 log << MSG::INFO <<
" Overwriting: "
92 << intMapIt->second.parDescription <<
" to : "
93 << intMapIt->second.overwriteVal <<
endmsg;
101 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::Print");
103 std::map <std::string, parDouble>::const_iterator doubleMapIt =
m_doubleMap.begin();
104 std::map <std::string, parInt>::const_iterator intMapIt =
m_intMap.begin();
106 log << MSG::INFO <<
"===================== Doubles ======================" <<
endmsg;
108 for (; doubleMapIt !=
m_doubleMap.end(); ++doubleMapIt)
109 log << MSG::INFO << doubleMapIt->second.parDescription <<
": " << *(doubleMapIt->second.par) <<
endmsg;
111 log << MSG::INFO <<
"===================== Integers ======================" <<
endmsg;
113 for (; intMapIt !=
m_intMap.end(); ++intMapIt)
114 log << MSG::INFO << intMapIt->second.parDescription <<
": " << *(intMapIt->second.par) <<
endmsg;
116 log << MSG::INFO <<
"=====================================================" <<
endmsg;
123 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::SetDigiParDouble");
124 log << MSG::FATAL <<
" LUCID_DigiSettings: parameter does not exist: " << parname <<
endmsg;
135 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::SetDigiParInt");
136 log << MSG::FATAL <<
" LUCID_DigiSettings: parameter does not exist: " << parname <<
endmsg;
147 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::GetDigiParDouble");
148 log << MSG::FATAL <<
" LUCID_DigiSettings: parameter does not exist: " << parname <<
endmsg;
159 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::GetDigiParInt");
160 log << MSG::FATAL <<
" LUCID_DigiSettings: parameter does not exist: " << parname <<
endmsg;
168 const std::string& parname,
174 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::DefNewParameterDouble");
175 log << MSG::FATAL <<
" Swap the boundaries on the range " << parname <<
endmsg;
179 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::DefNewParameterDouble");
180 log << MSG::FATAL <<
" More than one parameter with that name " << parname <<
endmsg;
184 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::DefNewParameterDouble");
185 log << MSG::FATAL <<
" More than one parameter with that name " << parname <<
endmsg;
201 const std::string& parname,
207 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::DefNewParameterInt");
208 log << MSG::FATAL <<
" Swap the boundaries on the range " << parname <<
endmsg;
212 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::DefNewParameterInt");
213 log << MSG::FATAL <<
" More than one parameter with that name " << parname <<
endmsg;
217 MsgStream log(
m_msgSvc,
"LUCID_DigiSettings::DefNewParameterInt");
218 log << MSG::FATAL <<
" More than one parameter with that name " << parname <<
endmsg;
230 m_intMap[parname] = std::move(parI);
double m_tdcFedNoiseFactor
std::map< std::string, parInt > m_intMap
void OverwriteDigiParValues()
void SetDigiParDouble(const std::string &, double)
double m_qdcFedNoiseFactor
void Initialize(IMessageSvc *msgSvc)
double m_tdcPmtNoiseFactor
std::map< std::string, parDouble > m_doubleMap
int m_parValueNotSetByUserInt
void DefNewParameterDouble(std::string, const std::string &, double *, double, double)
int GetDigiParInt(const std::string &)
double GetDigiParDouble(const std::string &)
void OverwriteDigiParProperties(Gaudi::Algorithm *)
void DefNewParameterInt(std::string, const std::string &, int *, int, int)
double m_parValueNotSetByUserDouble
void SetDigiParInt(const std::string &, int)
std::string parDescription
std::string parDescription