ATLAS Offline Software
Loading...
Searching...
No Matches
python.subdetectors.sct Namespace Reference

Classes

class  DCSC_Variable_SCT_Config
class  SCT

Functions

 make_sct_mapping ()
 hi_nibble (x)
 lo_nibble (x)
 check_good_chanstat (iov)

Variables

 C_GOOD
 C_MANUAL
list good_states = [C_GOOD, C_MANUAL]

Function Documentation

◆ check_good_chanstat()

python.subdetectors.sct.check_good_chanstat ( iov)
Determine whether CHANSTAT iov is good or bad.

Definition at line 70 of file sct.py.

70def check_good_chanstat(iov):
71 """
72 Determine whether CHANSTAT iov is good or bad.
73 """
74 return (hi_nibble(iov.STATE) in good_states and
75 lo_nibble(iov.STATE) in good_states)
76

◆ hi_nibble()

python.subdetectors.sct.hi_nibble ( x)

Definition at line 62 of file sct.py.

62def hi_nibble(x): return (x & 0xF0) >> 4

◆ lo_nibble()

python.subdetectors.sct.lo_nibble ( x)

Definition at line 63 of file sct.py.

63def lo_nibble(x): return (x & 0x0F)
64
65# Documented at: (Visited 20/05/2010)
66# https://twiki.cern.ch/twiki/bin/view/Atlas/SctDCSSoftware#FSM_Channel_Status_Byte

◆ make_sct_mapping()

python.subdetectors.sct.make_sct_mapping ( )
Generate a mapping for the channelids in /SCT/DCS/HV to DCSOFL output 
channel ids. The highest two bits can be used to determine the system.
(see `subdets`)

Definition at line 40 of file sct.py.

40def make_sct_mapping():
41 """
42 Generate a mapping for the channelids in /SCT/DCS/HV to DCSOFL output
43 channel ids. The highest two bits can be used to determine the system.
44 (see `subdets`)
45 """
46 from DQUtils.db import Databases
47 from DQUtils.channel_mapping import get_channel_ids_names
48 f = Databases.get_folder("/SCT/DCS/HV", "COOLOFL_DCS/CONDBR2")
49 cids, cnames, cmap = get_channel_ids_names(f)
50
51 mapping = {}
52
53 subdets = {0: 114, 1: 111, 2: 115}
54
55 for cid in cids:
56 # The highest-two bits of cid specify which DQ region we're in
57 output_subdet = subdets[(cid >> 25) & 0x3]
58 mapping.setdefault(output_subdet, []).append(cid)
59
60 return mapping
61

Variable Documentation

◆ C_GOOD

python.subdetectors.sct.C_GOOD

Definition at line 67 of file sct.py.

◆ C_MANUAL

python.subdetectors.sct.C_MANUAL

Definition at line 67 of file sct.py.

◆ good_states

list python.subdetectors.sct.good_states = [C_GOOD, C_MANUAL]

Definition at line 68 of file sct.py.