39 std::cout <<
"create DTHVCheckWithHysteresis" << std::endl;
78 const std::map<int, timedMeasurement>& snapshotValues,
79 const std::map<int, int>& aliasMap,
80 const std::map<int, int>& layerMap) {
131 std::map<int, int>::iterator chanIter;
146 if (valueA < minHV[
part])
150 if (valueS < minHV[2])
152 if (valueS >
maxHV[2])
154 if (valueC < minHV[3])
156 if (valueC >
maxHV[3])
161 chanIter->second =
flag.
a;
165 chanIter->second =
flag.
c;
169 chanIter->second =
flag.
s;
176 int l_p = chlId.
wire();
181 std::map<int, int>::const_iterator layerIter;
182 std::map<int, int>::const_iterator layerIend = layerMap.end();
183 std::map<int, timedMeasurement>::const_iterator snapIter;
184 std::map<int, timedMeasurement>::const_iterator snapIend = snapshotValues.end();
186 if ((layerIter = layerMap.find(chA.
rawId())) != layerIend) {
187 chan = (layerIter->second * 10) + l_p;
188 if ((snapIter = snapshotValues.find(
chan)) != snapIend) {
189 voltA = snapIter->second.second;
192 if ((layerIter = layerMap.find(chS.
rawId())) != layerIend) {
193 chan = (layerIter->second * 10) + 2;
194 if ((snapIter = snapshotValues.find(
chan)) != snapIend) {
195 voltS = snapIter->second.second;
198 if ((layerIter = layerMap.find(chC.
rawId())) != layerIend) {
199 chan = (layerIter->second * 10) + 3;
200 if ((snapIter = snapshotValues.find(
chan)) != snapIend) {
201 voltC = snapIter->second.second;
206 if ((valueS >
maxCurrent) && (voltS >= minHV[2]))
208 if ((valueC >
maxCurrent) && (voltC >= minHV[3]))
219 const std::map<int, timedMeasurement>& snapshotValues,
220 const std::map<int, int>& aliasMap,
221 const std::map<int, int>& layerMap) {
224 std::map<int, int>::iterator chanIter;
228 chanIter->second = flagA;
232 chanIter->second = flagC;
236 chanIter->second = flagS;
int wire() const
Return the wire number.
DTHVAbstractCheck::flag checkCurrentStatus(int rawId, int type, float valueA, float valueC, float valueS, const std::map< int, timedMeasurement > &snapshotValues, const std::map< int, int > &aliasMap, const std::map< int, int > &layerMap) override
check HV status
~DTHVCheckWithHysteresis() override
std::map< int, int > * oldStatusS
void setStatus(int rawId, int flagA, int flagC, int flagS, const std::map< int, timedMeasurement > &snapshotValues, const std::map< int, int > &aliasMap, const std::map< int, int > &layerMap) override
static DTHVAbstractCheck * instance
#define DEFINE_FWK_SERVICE(type)
DTHVCheckWithHysteresis()
constexpr uint32_t rawId() const
get the raw id
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
std::map< int, int > * oldStatusA
DTLayerId layerId() const
Return the corresponding LayerId.
std::map< int, int > * oldStatusC