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) {
129 flag.
a = flag.
c = flag.
s = 0;
131 std::map<int, int>::iterator chanIter;
133 minHV[part] =
minHVh[part];
146 if (valueA < minHV[part])
148 if (valueA >
maxHV[part])
150 if (valueS < minHV[2])
152 if (valueS >
maxHV[2])
154 if (valueC < minHV[3])
156 if (valueC >
maxHV[3])
159 oldStatusA->insert(std::pair<int, int>(rawId, flag.
a));
161 chanIter->second = flag.
a;
163 oldStatusC->insert(std::pair<int, int>(rawId, flag.
c));
165 chanIter->second = flag.
c;
167 oldStatusS->insert(std::pair<int, int>(rawId, flag.
s));
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;
226 oldStatusA->insert(std::pair<int, int>(rawId, flagA));
228 chanIter->second = flagA;
230 oldStatusC->insert(std::pair<int, int>(rawId, flagC));
232 chanIter->second = flagC;
234 oldStatusS->insert(std::pair<int, int>(rawId, flagS));
236 chanIter->second = flagS;
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
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
constexpr uint32_t rawId() const
get the raw id
~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
int wire() const
Return the wire number.
static DTHVAbstractCheck * instance
#define DEFINE_FWK_SERVICE(type)
DTHVCheckWithHysteresis()
DTLayerId layerId() const
Return the corresponding LayerId.
std::map< int, int > * oldStatusA
std::map< int, int > * oldStatusC