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()

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

Definition at line 69 of file sct.py.

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

◆ hi_nibble()

hi_nibble ( x)

Definition at line 61 of file sct.py.

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

◆ lo_nibble()

lo_nibble ( x)

Definition at line 62 of file sct.py.

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

◆ make_sct_mapping()

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 39 of file sct.py.

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

Variable Documentation

◆ C_GOOD

python.subdetectors.sct.C_GOOD

Definition at line 66 of file sct.py.

◆ C_MANUAL

python.subdetectors.sct.C_MANUAL

Definition at line 66 of file sct.py.

◆ good_states

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

Definition at line 67 of file sct.py.