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 127 of file DetStatusLib.py.

Constructor & Destructor Documentation

◆ __init__()

def python.DetStatusLib.DetStatusReq.__init__ (   self)

Definition at line 130 of file DetStatusLib.py.

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

Member Function Documentation

◆ __str__()

def python.DetStatusLib.DetStatusReq.__str__ (   self)

Definition at line 164 of file DetStatusLib.py.

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

◆ getDict()

def python.DetStatusLib.DetStatusReq.getDict (   self)

Definition at line 160 of file DetStatusLib.py.

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

◆ 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 137 of file DetStatusLib.py.

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

Member Data Documentation

◆ names

python.DetStatusLib.DetStatusReq.names

Definition at line 135 of file DetStatusLib.py.

◆ req

python.DetStatusLib.DetStatusReq.req

Definition at line 133 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:195
python.DetStatusLib.colourVal
def colourVal(sval)
Definition: DetStatusLib.py:27
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:79
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