ATLAS Offline Software
Loading...
Searching...
No Matches
stg.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3from ..lib import DCSC_DefectTranslate_Subdetector, DCSC_Variable
4from DQUtils import Databases
5from DQUtils.channel_mapping import get_channel_ids_names
6
7folder, database = "/STG/DCS/HV", "COOLOFL_DCS/CONDBR2"
8
9ids, names, _ = get_channel_ids_names(Databases.get_folder(folder, database))
10
11STGBA, STGBC, STGEA, STGEC = 1, 2, 3, 4
12
13def STG_HV_state(iov):
14 return iov.fsmCurrentState == "ON"
15
17
18 folder_base = "/STG/DCS"
19
20 mapping = {
21 STGEA: list(range(504, 1015)) +list(range(1024,1025)),
22 STGEC: list(range(0,504))+list(range(1015,1024))
23 }
24
25 variables = [
26 DCSC_Variable("HV", STG_HV_state),
27 ]
28
29 # If you change this please consult with the Muon groups.
30 # It was decided to make it the same across CSC, MDT, RPC and TGC.
31 dead_fraction_caution = None
32 dead_fraction_bad = 0.5
33
34 def __init__(self, *args, **kwargs):
35
36 super(STG, self).__init__(*args, **kwargs)
37
38 self.translators = [STG.color_to_defect_translator(flag, defect)
39 for flag, defect in ((STGEA, 'MS_STG_EA_STANDBY_HV'),
40 (STGEC, 'MS_STG_EC_STANDBY_HV'),
41 )]
__init__(self, *args, **kwargs)
Definition stg.py:34