ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.DetStatusLib.DetStatusReq Class Reference
Collaboration diagram for python.DetStatusLib.DetStatusReq:

Public Member Functions

def __init__ (self)
 
def setFromString (self, reqstring)
 
def getDict (self)
 
def __str__ (self)
 

Public Attributes

 req
 
 names
 

Detailed Description

Definition at line 126 of file DetStatusLib.py.

Constructor & Destructor Documentation

◆ __init__()

def python.DetStatusLib.DetStatusReq.__init__ (   self)

Definition at line 129 of file DetStatusLib.py.

129  def __init__(self):
130  "Initialise to empty set of requirements"
131  # requirements are stored as dict[status_channelID]=minimum value
132  self.req={}
133  # access to name/number translation
134  self.names=DetStatusNames()
135 

Member Function Documentation

◆ __str__()

def python.DetStatusLib.DetStatusReq.__str__ (   self)

Definition at line 163 of file DetStatusLib.py.

163  def __str__(self):
164  "Print representation of status requirements"
165  result=""
166  for (key,val) in self.req.items():
167  result+="%s %i " % (self.names.name(key),val)
168  return result
169 

◆ getDict()

def python.DetStatusLib.DetStatusReq.getDict (   self)

Definition at line 159 of file DetStatusLib.py.

159  def getDict(self):
160  "Return the dictionary holding the requirements (channel/value pairs)"
161  return self.req
162 

◆ setFromString()

def python.DetStatusLib.DetStatusReq.setFromString (   self,
  reqstring 
)
Set requirements from a space-separated string with flag req pairs
e.g. 'SCTB 3 EMEC G' (numbers or letters for status)

Definition at line 136 of file DetStatusLib.py.

136  def setFromString(self,reqstring):
137  """Set requirements from a space-separated string with flag req pairs
138  e.g. 'SCTB 3 EMEC G' (numbers or letters for status)"""
139  self.req={}
140  namelist=self.names.allNames()
141  tokens=str(reqstring).split()
142  ix=0
143  while (ix+1<len(tokens)):
144  flagname=tokens[ix]
145  val=colourVal(tokens[ix+1])
146  if (val is not None):
147  used=False
148  # check if the name matches any flags
149  for name in namelist:
150  if (flagname==name[0:len(flagname)]):
151  self.req[self.names.num(name)]=val
152  used=True
153  if (not used):
154  print ("Name %s does not match any status flag" % flagname)
155  else:
156  print ("Value %s does not define a status" % tokens[ix+1])
157  ix+=2
158 

Member Data Documentation

◆ names

python.DetStatusLib.DetStatusReq.names

Definition at line 134 of file DetStatusLib.py.

◆ req

python.DetStatusLib.DetStatusReq.req

Definition at line 132 of file DetStatusLib.py.


The documentation for this class was generated from the following file:
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
python.DetStatusLib.colourVal
def colourVal(sval)
Definition: DetStatusLib.py:26
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:71
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11
Trk::split
@ split
Definition: LayerMaterialProperties.h:38