ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
TileDQstatusAlgTestConfig.RecordAlg Class Reference
Inheritance diagram for TileDQstatusAlgTestConfig.RecordAlg:
Collaboration diagram for TileDQstatusAlgTestConfig.RecordAlg:

Public Member Functions

def __init__ (self, name, rc_key, digits_key, be_key='')
 
def initialize (self)
 
def execute (self)
 
def record_raw_data (self, key, hits, typ, baddq)
 
def record_digits (self, key, incomplete, isCalib)
 
def record_beamelem (self, key, frag)
 

Public Attributes

 rc_key
 
 rc_hits
 
 rc_typ
 
 rc_baddq
 
 digits_key
 
 digits_incomplete
 
 digits_isCalib
 
 be_key
 
 be_frag
 

Detailed Description

Definition at line 113 of file TileDQstatusAlgTestConfig.py.

Constructor & Destructor Documentation

◆ __init__()

def TileDQstatusAlgTestConfig.RecordAlg.__init__ (   self,
  name,
  rc_key,
  digits_key,
  be_key = '' 
)

Definition at line 114 of file TileDQstatusAlgTestConfig.py.

114  def __init__ (self, name,
115  rc_key, digits_key, be_key=''):
116  Alg.__init__ (self, name)
117  self.rc_key = rc_key
118  self.rc_hits = hits_0
119  self.rc_typ = TileFragHash.OptFilterOffline
120  #self.rc_typ = TileFragHash.OptFilterDsp
121  self.rc_baddq = {}
122  #self.rc_baddq = {146 : [2, 10]}
123 
124  self.digits_key = digits_key
125  self.digits_incomplete = False
126  self.digits_isCalib = False
127 
128  self.be_key = be_key
129  self.be_frag = LASE_PTN_FRAG
130  return
131 
132 

Member Function Documentation

◆ execute()

def TileDQstatusAlgTestConfig.RecordAlg.execute (   self)

Definition at line 137 of file TileDQstatusAlgTestConfig.py.

137  def execute (self):
138  if not self.record_raw_data (self.rc_key,
139  self.rc_hits,
140  self.rc_typ,
141  self.rc_baddq):
142  return StatusCode.Failure
143 
144  if not self.record_digits (self.digits_key,
145  self.digits_incomplete,
146  self.digits_isCalib):
147  return StatusCode.Failure
148 
149  if self.be_key != '':
150  if not self.record_beamelem (self.be_key, self.be_frag):
151  return StatusCode.Failure
152  return StatusCode.Success
153 
154 

◆ initialize()

def TileDQstatusAlgTestConfig.RecordAlg.initialize (   self)

Definition at line 133 of file TileDQstatusAlgTestConfig.py.

133  def initialize (self):
134  return StatusCode.Success
135 
136 

◆ record_beamelem()

def TileDQstatusAlgTestConfig.RecordAlg.record_beamelem (   self,
  key,
  frag 
)

Definition at line 223 of file TileDQstatusAlgTestConfig.py.

223  def record_beamelem (self, key, frag):
224  cont = ROOT.TileBeamElemContainer()
225 
226  coll = ROOT.TileBeamElemCollection (frag)
227  coll.setLvl1Type (123)
228 
229  if frag == LASE_PTN_FRAG:
230  v = getattr(ROOT,'vector<unsigned>')()
231  v.resize(16)
232  v[0] = (23 << 8)
233  elem = ROOT.TileBeamElem (ROOT.Identifier(), v)
234  coll.push_back (elem)
235 
236  elif frag == DIGI_PAR_FRAG:
237  coll.setRODBCID (11)
238  hwidHelper = self.detStore['TileHWID']
239 
240  def id (cha):
241  ros = 1
242  drawer = 1
243  adc = 0
244  return hwidHelper.adc_id (ros, drawer, cha, adc)
245 
246  for cha in range(15):
247  hwid = id(cha)
248  elem = ROOT.TileBeamElem (hwid, cha + 100)
249  coll.push_back (elem)
250 
251  hwid = id(15)
252  v = getattr(ROOT,'vector<unsigned>')()
253  v.resize(10)
254  for i in range(10):
255  v[i] = 111 + i
256  v[1] = 2
257  v[2] = 0x08070605
258  elem = ROOT.TileBeamElem (hwid, v)
259  coll.push_back (elem)
260 
261  elif frag == LASER_OBJ_FRAG:
262  coll.setRODBCID (11)
263 
264 
265  cont.addCollection (coll, ROOT.IdentifierHash (frag))
266  ROOT.SetOwnership (coll, False)
267 
268  return self.evtStore.record (cont, key, False)
269 
270 

◆ record_digits()

def TileDQstatusAlgTestConfig.RecordAlg.record_digits (   self,
  key,
  incomplete,
  isCalib 
)

Definition at line 186 of file TileDQstatusAlgTestConfig.py.

186  def record_digits (self, key, incomplete, isCalib):
187  cont = ROOT.TileDigitsContainer()
188  hashFunc = cont.hashFunc()
189  hwidHelper = self.detStore['TileHWID']
190 
191  emptyfrag = (3, 13) # ros, drawer
192  for frag in [(1, 3), emptyfrag]:
193  id = hwidHelper.frag (*frag)
194  coll = ROOT.TileDigitsCollection (id)
195 
196  if frag == emptyfrag:
197  v = getattr(ROOT,'vector<unsigned>')()
198  v.resize(16)
199  v[3] = 0xffffffff
200  v[9] = 0xffffffff
201  v[12] = 0xffffffff
202  coll.setFragChipHeaderWords (v)
203 
204 
205  if frag == emptyfrag and incomplete:
206  ndig = 10
207  elif frag == emptyfrag and isCalib:
208  ndig = 96
209  else:
210  ndig = 48
211 
212  digits = getattr(ROOT,'vector<float>')()
213  digits.resize (12)
214  for idig in range(ndig):
215  dig = ROOT.TileDigits(ROOT.HWIdentifier(), digits)
216  coll.push_back (dig)
217 
218  cont.addCollection (coll, ROOT.IdentifierHash (hashFunc(id)))
219  ROOT.SetOwnership (coll, False)
220  return self.evtStore.record (cont, key, False)
221 
222 

◆ record_raw_data()

def TileDQstatusAlgTestConfig.RecordAlg.record_raw_data (   self,
  key,
  hits,
  typ,
  baddq 
)

Definition at line 155 of file TileDQstatusAlgTestConfig.py.

155  def record_raw_data (self, key, hits, typ, baddq):
156  idHelper = self.detStore['CaloCell_ID'].tile_idHelper()
157 
158  unit = 0 # TileRawChannelUnit::ADCcounts
159  cont = ROOT.TileRawChannelContainer (False, typ, unit)
160  cont.set_bsflags (0x32002000)
161  hashFunc = cont.hashFunc()
162 
163  for icoll, colldata in hits:
164  coll = ROOT.TileRawChannelCollection (hashFunc.identifier(icoll))
165 
166  mask = 0
167  for chan in baddq.get (icoll, []):
168  mask |= (1<<(chan/3))
169  coll.setFragMemoryPar(mask)
170 
171  for addr, data in colldata:
172  if isinstance(addr, tuple):
173  adc_id = idHelper.adc_id (*addr)
174  chan = ROOT.TileRawChannel (adc_id, *data)
175  else:
176  hwid = ROOT.HWIdentifier (addr)
177  chan = ROOT.TileRawChannel (hwid, *data)
178  coll.push_back (chan)
179 
180  cont.addCollection (coll, ROOT.IdentifierHash(icoll))
181  ROOT.SetOwnership (coll, False)
182 
183  return self.evtStore.record (cont, key, False)
184 
185 

Member Data Documentation

◆ be_frag

TileDQstatusAlgTestConfig.RecordAlg.be_frag

Definition at line 128 of file TileDQstatusAlgTestConfig.py.

◆ be_key

TileDQstatusAlgTestConfig.RecordAlg.be_key

Definition at line 127 of file TileDQstatusAlgTestConfig.py.

◆ digits_incomplete

TileDQstatusAlgTestConfig.RecordAlg.digits_incomplete

Definition at line 124 of file TileDQstatusAlgTestConfig.py.

◆ digits_isCalib

TileDQstatusAlgTestConfig.RecordAlg.digits_isCalib

Definition at line 125 of file TileDQstatusAlgTestConfig.py.

◆ digits_key

TileDQstatusAlgTestConfig.RecordAlg.digits_key

Definition at line 123 of file TileDQstatusAlgTestConfig.py.

◆ rc_baddq

TileDQstatusAlgTestConfig.RecordAlg.rc_baddq

Definition at line 120 of file TileDQstatusAlgTestConfig.py.

◆ rc_hits

TileDQstatusAlgTestConfig.RecordAlg.rc_hits

Definition at line 117 of file TileDQstatusAlgTestConfig.py.

◆ rc_key

TileDQstatusAlgTestConfig.RecordAlg.rc_key

Definition at line 116 of file TileDQstatusAlgTestConfig.py.

◆ rc_typ

TileDQstatusAlgTestConfig.RecordAlg.rc_typ

Definition at line 118 of file TileDQstatusAlgTestConfig.py.


The documentation for this class was generated from the following file:
initialize
void initialize()
Definition: run_EoverP.cxx:894
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18