|
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) |
|
◆ __init__()
def TileDQstatusAlgTestConfig.RecordAlg.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
rc_key, |
|
|
|
digits_key, |
|
|
|
be_key = '' |
|
) |
| |
Definition at line 114 of file TileDQstatusAlgTestConfig.py.
115 rc_key, digits_key, be_key=''):
116 Alg.__init__ (self, name)
118 self.rc_hits = hits_0
119 self.rc_typ = TileFragHash.OptFilterOffline
124 self.digits_key = digits_key
125 self.digits_incomplete =
False
126 self.digits_isCalib =
False
129 self.be_frag = LASE_PTN_FRAG
◆ execute()
def TileDQstatusAlgTestConfig.RecordAlg.execute |
( |
|
self | ) |
|
Definition at line 137 of file TileDQstatusAlgTestConfig.py.
138 if not self.record_raw_data (self.rc_key,
142 return StatusCode.Failure
144 if not self.record_digits (self.digits_key,
145 self.digits_incomplete,
146 self.digits_isCalib):
147 return StatusCode.Failure
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
◆ initialize()
def TileDQstatusAlgTestConfig.RecordAlg.initialize |
( |
|
self | ) |
|
◆ 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()
226 coll = ROOT.TileBeamElemCollection (frag)
227 coll.setLvl1Type (123)
229 if frag == LASE_PTN_FRAG:
230 v = getattr(ROOT,
'vector<unsigned>')()
233 elem = ROOT.TileBeamElem (ROOT.Identifier(), v)
234 coll.push_back (elem)
236 elif frag == DIGI_PAR_FRAG:
238 hwidHelper = self.detStore[
'TileHWID']
244 return hwidHelper.adc_id (ros, drawer, cha, adc)
246 for cha
in range(15):
248 elem = ROOT.TileBeamElem (hwid, cha + 100)
249 coll.push_back (elem)
252 v = getattr(ROOT,
'vector<unsigned>')()
258 elem = ROOT.TileBeamElem (hwid, v)
259 coll.push_back (elem)
261 elif frag == LASER_OBJ_FRAG:
265 cont.addCollection (coll, ROOT.IdentifierHash (frag))
266 ROOT.SetOwnership (coll,
False)
268 return self.evtStore.record (cont, key,
False)
◆ 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']
192 for frag
in [(1, 3), emptyfrag]:
193 id = hwidHelper.frag (*frag)
194 coll = ROOT.TileDigitsCollection (id)
196 if frag == emptyfrag:
197 v = getattr(ROOT,
'vector<unsigned>')()
202 coll.setFragChipHeaderWords (v)
205 if frag == emptyfrag
and incomplete:
207 elif frag == emptyfrag
and isCalib:
212 digits = getattr(ROOT,
'vector<float>')()
214 for idig
in range(ndig):
215 dig = ROOT.TileDigits(ROOT.HWIdentifier(), digits)
218 cont.addCollection (coll, ROOT.IdentifierHash (hashFunc(id)))
219 ROOT.SetOwnership (coll,
False)
220 return self.evtStore.record (cont, key,
False)
◆ 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()
159 cont = ROOT.TileRawChannelContainer (
False, typ, unit)
160 cont.set_bsflags (0x32002000)
161 hashFunc = cont.hashFunc()
163 for icoll, colldata
in hits:
164 coll = ROOT.TileRawChannelCollection (hashFunc.identifier(icoll))
167 for chan
in baddq.get (icoll, []):
168 mask |= (1<<(chan/3))
169 coll.setFragMemoryPar(mask)
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)
176 hwid = ROOT.HWIdentifier (addr)
177 chan = ROOT.TileRawChannel (hwid, *data)
178 coll.push_back (chan)
180 cont.addCollection (coll, ROOT.IdentifierHash(icoll))
181 ROOT.SetOwnership (coll,
False)
183 return self.evtStore.record (cont, key,
False)
◆ be_frag
TileDQstatusAlgTestConfig.RecordAlg.be_frag |
◆ be_key
TileDQstatusAlgTestConfig.RecordAlg.be_key |
◆ digits_incomplete
TileDQstatusAlgTestConfig.RecordAlg.digits_incomplete |
◆ digits_isCalib
TileDQstatusAlgTestConfig.RecordAlg.digits_isCalib |
◆ digits_key
TileDQstatusAlgTestConfig.RecordAlg.digits_key |
◆ rc_baddq
TileDQstatusAlgTestConfig.RecordAlg.rc_baddq |
◆ rc_hits
TileDQstatusAlgTestConfig.RecordAlg.rc_hits |
◆ rc_key
TileDQstatusAlgTestConfig.RecordAlg.rc_key |
◆ rc_typ
TileDQstatusAlgTestConfig.RecordAlg.rc_typ |
The documentation for this class was generated from the following file: