ATLAS Offline Software
Classes | Functions | Variables
python.subdetectors.sct Namespace Reference

Classes

class  DCSC_Variable_SCT_Config
 
class  SCT
 

Functions

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

Variables

list good_states = [C_GOOD, C_MANUAL]
 

Function Documentation

◆ check_good_chanstat()

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

Definition at line 70 of file sct.py.

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

def python.subdetectors.sct.hi_nibble (   x)

Definition at line 62 of file sct.py.

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

◆ lo_nibble()

def python.subdetectors.sct.lo_nibble (   x)

Definition at line 63 of file sct.py.

63 def 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
67 C_GOOD, C_MANUAL = 0x1, 0x3

◆ make_sct_mapping()

def 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.

40 def 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

◆ good_states

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

Definition at line 68 of file sct.py.

python.subdetectors.sct.lo_nibble
def lo_nibble(x)
Definition: sct.py:63
python.channel_mapping.get_channel_ids_names
def get_channel_ids_names(folder)
Definition: channel_mapping.py:102
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
python.subdetectors.sct.make_sct_mapping
def make_sct_mapping()
Definition: sct.py:40
python.subdetectors.sct.check_good_chanstat
def check_good_chanstat(iov)
Definition: sct.py:70
python.subdetectors.sct.hi_nibble
def hi_nibble(x)
Definition: sct.py:62