9 #include <FairLogger.h>
27 : FairParGenericSet(name, title, context) {}
49 LOG(fatal) << GetName() <<
": ASCII input is not defined!";
90 LOG(fatal) << GetName() <<
": ASCII output is not defined!";
100 LOG(warn) << GetName()
101 <<
": Previously defined global settings will be ignored.";
104 LOG(warn) << GetName()
105 <<
": Overwriting previously defined parameter sets.";
111 TString inputFile = fileName;
114 inFile.open(inputFile.Data());
117 if (!inFile.is_open()) {
118 inputFile = gSystem->Getenv(
"VMCWORKDIR");
119 inputFile +=
"/parameters/sts/" + TString(fileName);
120 inFile.open(inputFile.Data());
124 if (!inFile.is_open()) {
125 LOG(fatal) << GetName() <<
": Cannot read file " << fileName <<
" nor "
134 Double_t vDep = -1.e10;
135 Double_t vBias = -1.e10;
136 Double_t temperature = -1.e10;
137 Double_t cCoupling = -1.e10;
138 Double_t cInterstrip = -1.e10;
141 if (inFile.eof())
break;
142 getline(inFile, input);
143 if (input.empty() || input[0] ==
'#')
continue;
144 std::stringstream line(input);
145 line >> sName >> address >> vDep >> vBias >> temperature >> cCoupling
149 if (vDep < 1.e-9 || vBias < 1.e-9 || temperature < 1.e-9
150 || cCoupling < 1.e-9 || cInterstrip < 1.e-9) {
151 LOG(fatal) << GetName()
152 <<
": Missing or illegal condition parameters for address "
153 << address <<
"; " << vDep <<
" " << vBias <<
" "
154 << temperature <<
" " << cCoupling <<
" " << cInterstrip;
160 LOG(fatal) << GetName() <<
": Multiple occurence of address " << address
167 vDep, vBias, temperature, cCoupling, cInterstrip);
172 LOG(info) << GetName() <<
": Read conditions of " << nSensors
173 << (nSensors == 1 ?
" sensor" :
" sensors") <<
" from "
184 Double_t temperature,
186 Double_t cInterstrip) {
188 LOG(warn) << GetName() <<
": Overwriting current global settings!";
198 Double_t vFd = conditions.
GetVfd();
199 Double_t vBias = conditions.
GetVbias();
203 SetGlobalPar(vFd, vBias, temperature, cCoupling, cInterstrip);
211 std::stringstream ss;
217 ss <<
"Conditions for " <<
fParams.size() <<
" sensors";