123 auto& dpid = dpcom.
id;
129 LOG(info) <<
"Processing DP " << dpcom <<
", with value = " << o2::dcs::getValue<double>(dpcom);
132 LOG(info) <<
"Processing DP " << dpcom <<
", with value = " << o2::dcs::getValue<int32_t>(dpcom);
148 if (std::strstr(dpid.get_alias(),
"position") !=
nullptr) {
149 std::bitset<4> posstatus(o2::dcs::getValue<double>(dpcom));
151 LOG(info) <<
" Prev.positions : " << mPrevPositionstatus <<
", new = " << posstatus;
153 if (posstatus == mPrevPositionstatus) {
155 LOG(info) <<
"ZN/ZP positions unchanged, doing nothing";
160 LOG(info) <<
"Positions modified";
162 mUpdateVerticalPosition =
true;
163 mPrevPositionstatus = posstatus;
166 if (std::strstr(dpid.get_alias(),
"HV") !=
nullptr) {
167 std::string aliasStr(dpid.get_alias());
168 const auto offs = std::strlen(
"ZDC_");
169 std::string detStr = aliasStr.substr(offs, 3);
171 if ((std::strstr(detStr.c_str(),
"ZNA")) !=
nullptr) {
173 }
else if ((std::strstr(detStr.c_str(),
"ZPA")) !=
nullptr) {
175 }
else if ((std::strstr(detStr.c_str(),
"ZNC")) !=
nullptr) {
177 }
else if ((std::strstr(detStr.c_str(),
"ZPC")) !=
nullptr) {
179 }
else if ((std::strstr(detStr.c_str(),
"ZEM")) !=
nullptr) {
182 std::size_t
pos = aliasStr.find(
"HV");
183 std::string chStr = aliasStr.substr(1,
pos + 2);
184 auto ich = std::stoi(chStr);
185 auto hvch = 5 * (detID - 1) + ich;
186 std::bitset<NHVCHANNELS> hvstatus(o2::dcs::getValue<int32_t>(dpcom));
188 LOG(info) <<
"HV ch. " << hvch <<
" Prev. value = " << mPrevHVstatus <<
", New value = " << hvstatus;
190 if (hvstatus == mPrevHVstatus) {
192 LOG(info) <<
"Same HV status as before, doing nothing";
197 LOG(info) <<
"Something changed in HV for ch. " << hvch;
199 mUpdateHVStatus =
true;
201 auto singlestripHV = hvstatus[ich];
202 if (mHV[ich] != singlestripHV) {
203 mHV[ich] = singlestripHV;
207 LOG(info) <<
"Updating previous HV status for ch. " << hvch;
209 mPrevHVstatus = hvstatus;
214 if (std::strstr(dpid.get_alias(),
"CONFIG") !=
nullptr) {
215 std::string aliasStr(dpid.get_alias());
216 const auto offs = std::strlen(
"ZDC_CONFIG_");
217 std::size_t
const nsta = aliasStr.find_first_of(
"0123456789", offs);
218 std::size_t
const nend = aliasStr.find_first_not_of(
"0123456789", nsta);
219 std::string ddlStr = aliasStr.substr(nsta, nend != std::string::npos ? nend - nsta : nend);
220 auto iddl = std::stoi(ddlStr);
221 const auto offs1 = nend;
222 std::size_t
const nsta1 = aliasStr.find_first_of(
"0123456789", offs1);
223 std::size_t
const nend1 = aliasStr.find_first_not_of(
"0123456789", nsta1);
224 std::string chStr = aliasStr.substr(nsta1, nend1 != std::string::npos ? nend1 - nsta1 : nend1);
225 auto idch = std::stoi(chStr);
226 std::bitset<4> mapstatus(o2::dcs::getValue<int32_t>(dpcom));
228 LOG(info) <<
"DDL: " << iddl <<
": Prev = " << mPreviousMapping[iddl] <<
", new = " << mapstatus;
230 if (mapstatus == mPreviousMapping[iddl]) {
232 LOG(info) <<
"Same mapping status as before, doing nothing";
237 LOG(info) <<
"Mapping modified for DDL" << iddl;
239 mUpdateMapping =
true;
240 for (
auto imod = 0; imod <
NMODULES; ++imod) {
241 auto singlechstatus = mapstatus[imod];
243 for (
int ich = 0; ich <
NCHANNELS; ++ich) {
244 if (idch != (4 * imod + ich)) {
245 printf(
"ZDC -> problem in Nchannels: expecting %d reading %d\n\n", 4 * imod + ich, idch);
247 if ((mZDCMapInfo[iddl][imod].moduleID[ich]) == -1) {
252 LOG(info) <<
"mZDCMapInfo[" << iddl <<
"][" << imod <<
"].moduleID[" << idch <<
"] = " << mZDCMapInfo[iddl][imod].channelValue[idch];
254 if (mMapping[idch] != singlechstatus) {
255 mMapping[idch] = singlechstatus;
259 LOG(info) <<
"Updating previous mapping status for DDL " << iddl;
261 mPreviousMapping[iddl] = mapstatus;