ATLAS Offline Software
stg.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from ..lib import DCSC_DefectTranslate_Subdetector, DCSC_Variable
4 from DQUtils import Databases
5 from DQUtils.channel_mapping import get_channel_ids_names
6 
7 folder, database = "/STG/DCS/HV", "COOLOFL_DCS/CONDBR2"
8 
9 ids, names, _ = get_channel_ids_names(Databases.get_folder(folder, database))
10 
11 STGBA, STGBC, STGEA, STGEC = 1, 2, 3, 4
12 
13 def 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.1
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  )]
python.subdetector.DCSC_DefectTranslate_Subdetector.translators
translators
Definition: subdetector.py:541
python.variable.DCSC_Variable
Definition: variable.py:33
python.subdetectors.stg.STG_HV_state
def STG_HV_state(iov)
Definition: stg.py:13
python.channel_mapping.get_channel_ids_names
def get_channel_ids_names(folder)
Definition: channel_mapping.py:102
python.subdetectors.stg.STG
Definition: stg.py:16
python.subdetector.DCSC_DefectTranslate_Subdetector
Definition: subdetector.py:532
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.subdetectors.stg.STG.__init__
def __init__(self, *args, **kwargs)
Definition: stg.py:34