ATLAS Offline Software
Loading...
Searching...
No Matches
TileDCSState.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6// Tile includes
8
9#include <cstring>
10#include <algorithm>
11
13 : m_goodDrawer(212222),
14 m_unknownValue(-30) // should be negative
15{
16
17 std::fill(&m_states[0][0], &m_states[3][64], m_unknownValue);
18 std::fill(&m_hv[0][0][0], &m_hv[3][63][48], m_unknownValue);
19 std::fill(&m_hvSet[0][0][0], &m_hvSet[3][63][68], m_unknownValue);
20 std::fill(&m_status[0][0][0], &m_status[3][63][48], UNKNOWN);
21 std::fill(&m_hvStatus[0][0][0], &m_hvStatus[3][63][48], UNKNOWN);
22
23}
24
25
26//_____________________________________________________________________________
27TileDCSState::TileDCSStatus TileDCSState::getDCSStatus(unsigned int ros, unsigned int drawer) const {
28
30
31 int state = m_states[ros - 1][drawer];
32 if (state == m_goodDrawer) {
33 status = OK_DRAWER;
34 } else if (state == m_unknownValue) {
35 status = UNKNOWN;
36 } else if (std::find(m_warningDrawer.begin(), m_warningDrawer.end(), state) !=
37 m_warningDrawer.end()) {
38
39 status = WARNING_DRAWER;
40 }
41
42 return status;
43}
TileDCSStatus getDCSStatus(unsigned int ros, unsigned int drawer) const
Return TileDCSstatus for given Tile drawer determined by summary states per LVPS.
TileDCSStatus m_hvStatus[NUMBER_OF_ROSES][NUMBER_OF_DRAWERS][NUMBER_OF_CHANNELS]
TileDCSStatus
Describes Tile DCS status.
std::vector< int > m_warningDrawer
float m_hv[NUMBER_OF_ROSES][NUMBER_OF_DRAWERS][NUMBER_OF_HV_CHANNELS]
int m_states[NUMBER_OF_ROSES][NUMBER_OF_DRAWERS]
TileDCSStatus m_status[NUMBER_OF_ROSES][NUMBER_OF_DRAWERS][NUMBER_OF_CHANNELS]
float m_hvSet[NUMBER_OF_ROSES][NUMBER_OF_DRAWERS][NUMBER_OF_HVSET_CHANNELS]