ATLAS Offline Software
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
LArLATOMEDecoder::EventProcess Class Reference
Inheritance diagram for LArLATOMEDecoder::EventProcess:
Collaboration diagram for LArLATOMEDecoder::EventProcess:

Public Types

typedef unsigned int Word
 this should be the same as how we get the data, otherwise we will have bugs. More...
 
typedef int NumWord
 
typedef int Packet
 
typedef int SuperCell
 
typedef int Sample
 
typedef std::string Path
 

Public Member Functions

 EventProcess (const LArLATOMEDecoder *decoderInput, LArDigitContainer *adc_coll, LArDigitContainer *adc_bas_coll, LArRawSCContainer *et_coll, LArRawSCContainer *et_id_coll, LArAccumulatedDigitContainer *accdigits, LArAccumulatedCalibDigitContainer *caccdigits, LArLATOMEHeaderContainer *header_coll)
 
void fillCollection (const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment *pROB, const LArLATOMEMapping *map, const LArOnOffIdMapping *onoffmap=nullptr, const LArCalibLineMapping *clmap=nullptr)
 Execute decoding for an event. More...
 
bool msgLvl (const MSG::Level lvl) const
 Test the output level. More...
 
MsgStream & msg () const
 The standard message stream. More...
 
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream. More...
 
void setLevel (MSG::Level lvl)
 Change the current logging level. More...
 

Private Types

enum  MODE { MON_HEADER, PAYLOAD, MON_TRAILER }
 

Private Member Functions

bool compareOrSet (Word &param, Word value, bool compare)
 
unsigned int decodeTrailer (const uint32_t *p, unsigned int offset)
 
unsigned int decodeHeader (const uint32_t *p, unsigned int offset)
 
unsigned int bytesPerChannel (MonDataType at0, MonDataType at1)
 
void increaseWordShift (unsigned int &wordshift)
 
void increaseByteShift (unsigned int &wordshift, unsigned int &byteshift)
 
void decodeByte (unsigned int &byte, unsigned int wordshift, unsigned int byteshift, const uint32_t *p)
 
void decodeWord (unsigned int &word, unsigned int &wordshift, unsigned int &byteshift, const uint32_t *p)
 
void decodeChannel (unsigned int &wordshift, unsigned int &byteshift, const uint32_t *p, MonDataType at0, MonDataType at1, unsigned int &at0Data, unsigned int &at1Data, unsigned int &satData, bool &at0val, bool &at1val)
 
int signEnergy (unsigned int energy)
 
void fillRaw (const LArLATOMEMapping *map)
 Pass ADC values from an event. More...
 
void fillCalib (const LArLATOMEMapping *map, const LArOnOffIdMapping *onoffmap, const LArCalibLineMapping *clmap)
 
void fillHeader ()
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

std::vector< Wordm_packetEnd
 
Word m_latomeBCID {}
 
Word m_latomeID {}
 
Word m_l1ID {}
 
Word m_ROBFragSize {}
 
Word m_nPackets {}
 
Word m_iPacket {}
 
Word m_nWordsPerPacket {}
 
Word m_monHeaderSize {}
 
Word m_region {}
 
Word m_nStreams {}
 
Word m_streamNumber {}
 
Word m_at0typeRec {}
 
Word m_at1typeRec {}
 
Word m_at0type {}
 
Word m_at1type {}
 
Word m_at0nBC {}
 
Word m_at1nBC {}
 
Word m_at0BC {}
 
Word m_at1BC {}
 
Word m_activeSC {}
 
Word m_nsc1 {}
 
Word m_nsc2 {}
 
Word m_nsc3 {}
 
Word m_nsc4 {}
 
Word m_nsc5 {}
 
Word m_nsc6 {}
 
bool m_headerDecoded {}
 
short m_nBC_rawADC {}
 
short m_nBC_ADC {}
 
short m_nBC_E {}
 
short m_nBC_EID {}
 
short m_nBC_Averaged {}
 
short m_BC_rawADC {}
 
short m_BC_ADC {}
 
short m_BC_E {}
 
short m_BC_EID {}
 
bool m_hasRawAdc {}
 
bool m_hasAdc {}
 
bool m_hasE {}
 
bool m_hasEID {}
 
bool m_isAveraged {}
 
bool m_isAutoCorr {}
 
const LArLATOMEDecoderm_decoder {}
 
LArDigitContainerm_adc_coll {}
 
LArDigitContainerm_adc_bas_coll {}
 
LArRawSCContainerm_et_coll {}
 
LArRawSCContainerm_et_id_coll {}
 
LArAccumulatedDigitContainerm_accdigits {}
 
LArAccumulatedCalibDigitContainerm_caccdigits {}
 
LArLATOMEHeaderContainerm_header_coll {}
 
unsigned int m_nthLATOME = 0
 
std::vector< unsigned short > m_BCIDsInEvent
 
std::vector< LatomeRawDatam_rawValuesInEvent
 
std::vector< LatomeAveragedRawDatam_averagedRawValuesInEvent
 
std::vector< LatomeCalibPatternsm_latomeCalibPatternsInEvent
 
std::string m_nm
 Message source name. More...
 
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels) More...
 
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer. More...
 
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level. More...
 
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging) More...
 

Static Private Attributes

static const Word m_monTrailerSize =2
 some cached info to ease processing reading from data header More...
 
static const Word s_monHeaderMarker =0xff1234ff
 this is fixed and not read from data More...
 
static const Word s_monCheckPoint =0xdeadbeef
 

Detailed Description

Definition at line 129 of file LArLATOMEDecoder.h.

Member Typedef Documentation

◆ NumWord

Definition at line 134 of file LArLATOMEDecoder.h.

◆ Packet

Definition at line 135 of file LArLATOMEDecoder.h.

◆ Path

Definition at line 138 of file LArLATOMEDecoder.h.

◆ Sample

Definition at line 137 of file LArLATOMEDecoder.h.

◆ SuperCell

Definition at line 136 of file LArLATOMEDecoder.h.

◆ Word

this should be the same as how we get the data, otherwise we will have bugs.

use reinterpret_cast later to properly interpret the bit in other format if needed.

Definition at line 133 of file LArLATOMEDecoder.h.

Member Enumeration Documentation

◆ MODE

Enumerator
MON_HEADER 
PAYLOAD 
MON_TRAILER 

Definition at line 174 of file LArLATOMEDecoder.h.

174  {
176  };

Constructor & Destructor Documentation

◆ EventProcess()

LArLATOMEDecoder::EventProcess::EventProcess ( const LArLATOMEDecoder decoderInput,
LArDigitContainer adc_coll,
LArDigitContainer adc_bas_coll,
LArRawSCContainer et_coll,
LArRawSCContainer et_id_coll,
LArAccumulatedDigitContainer accdigits,
LArAccumulatedCalibDigitContainer caccdigits,
LArLATOMEHeaderContainer header_coll 
)

Definition at line 134 of file LArLATOMEDecoder.cxx.

137  : AthMessaging(Gaudi::svcLocator()->service<IMessageSvc>("MessageSvc"), "LArLATOMEDecoder::EventProcess"),
138  m_decoder(decoderInput),
139  m_adc_coll(adc_coll),
140  m_adc_bas_coll(adc_bas_coll),
141  m_et_coll(et_coll),
142  m_et_id_coll(et_id_coll),
143  m_accdigits(accdigits),
144  m_caccdigits(caccdigits),
145  m_header_coll(header_coll) {
146  m_latomeID = 0;
147  m_l1ID = 0;
148  m_ROBFragSize = 0;
149  m_nPackets = 0;
150  m_iPacket = 0;
151  m_nWordsPerPacket = 0;
152  m_monHeaderSize = 0;
153  m_region = 0;
154  m_nStreams = 0;
155  m_streamNumber = 0;
160  m_at0nBC = 0;
161  m_at1nBC = 0;
162  m_at0BC = 0;
163  m_at1BC = 0;
164  m_activeSC = 0;
165  m_nsc1 = 0;
166  m_nsc2 = 0;
167  m_nsc3 = 0;
168  m_nsc4 = 0;
169  m_nsc5 = 0;
170  m_nsc6 = 0;
171  m_headerDecoded = false;
172 
173  m_nBC_rawADC = 0;
174  m_nBC_ADC = 0;
175  m_nBC_E = 0;
176  m_nBC_EID = 0;
177 
178  m_nBC_Averaged = 0;
179 
180  m_BC_rawADC = 0;
181  m_BC_ADC = 0;
182  m_BC_E = 0;
183  m_BC_EID = 0;
184 
185  m_hasRawAdc = false;
186  m_hasAdc = false;
187  m_hasE = false;
188  m_hasEID = false;
189 
190  m_isAveraged = (m_caccdigits != 0);
191  m_isAutoCorr = (m_accdigits != 0);
192 
193  if (!m_isAveraged && !m_isAutoCorr) {
195  } else {
198  }
199 }

Member Function Documentation

◆ bytesPerChannel()

unsigned int LArLATOMEDecoder::EventProcess::bytesPerChannel ( MonDataType  at0,
MonDataType  at1 
)
private

Definition at line 324 of file LArLATOMEDecoder.cxx.

324  {
325  unsigned int b = 0;
326  if (at0 == MonDataType::Averaged || at0 == MonDataType::AutoCorr)
327  return 8;
328 
330  if (at0 != MonDataType::Invalid)
331  b += 2;
332  if (at1 != MonDataType::Invalid)
333  b += 2;
335  ++b;
336  return b;
337 }

◆ compareOrSet()

bool LArLATOMEDecoder::EventProcess::compareOrSet ( Word param,
Word  value,
bool  compare 
)
private

Definition at line 201 of file LArLATOMEDecoder.cxx.

201  {
202  if (!compare) {
203  param = value;
204  return true;
205  }
206  return param == value;
207 }

◆ decodeByte()

void LArLATOMEDecoder::EventProcess::decodeByte ( unsigned int &  byte,
unsigned int  wordshift,
unsigned int  byteshift,
const uint32_t *  p 
)
private

Definition at line 356 of file LArLATOMEDecoder.cxx.

356  {
357  byte = ((bswap_32(p[wordshift])) >> (8 * (4 - 1 - byteshift))) & 0xff;
358 }

◆ decodeChannel()

void LArLATOMEDecoder::EventProcess::decodeChannel ( unsigned int &  wordshift,
unsigned int &  byteshift,
const uint32_t *  p,
MonDataType  at0,
MonDataType  at1,
unsigned int &  at0Data,
unsigned int &  at1Data,
unsigned int &  satData,
bool &  at0val,
bool &  at1val 
)
private

now that we have the basic words we can rearrange the bits in case it is energy, ADC do not need further arrangement this is assuming energy lsb is at bit[0-2] and energy-id at [5-7]. Make sure this is the case for all recipe in the firmware. assumptions are in https://its.cern.ch/jira/browse/LDPBFW-2976

Definition at line 370 of file LArLATOMEDecoder.cxx.

371  {
372 
373  // the structure of data is always consisting of 2,3,4 or 5 bytes depending on the recipe.
374  // If there is an energy it means there is the quality/saturation byte thus odd number of bytes. Otherwise ADC or Energy spans <mostly> over 2 bytes.
375  // avoid vectors and loops and bitsets to make it faster (can change later if needed but there is only few configurations so no need to make it infinitely
376  // flexible. use unsigned int everywhere for now since we have 18 bits for energy which does not fit in short, cast later.
377  unsigned int nbytesPerChannel = bytesPerChannel(at0, at1);
378  bool satByte = nbytesPerChannel % 2; // do we have satbyte
379 
380  at0val = false;
381  at1val = false;
382  at0Data = 0;
383  at1Data = 0;
384  unsigned int satData = 0;
385  saturation = 0;
386 
387  unsigned int word1 = 0;
388  unsigned int word2 = 0;
389  decodeWord(word1, wordshift, byteshift, p);
390  if (nbytesPerChannel > 3) {
391  decodeWord(word2, wordshift, byteshift, p);
392  }
393  at0Data = word1 & 0x7fff;
394  at0val = word1 & 0x8000;
395  if (nbytesPerChannel > 3) {
396  at1Data = word2 & 0x7fff;
397  at1val = word2 & 0x8000;
398  }
399  if (satByte) {
400  decodeByte(satData, wordshift, byteshift, p);
401  increaseByteShift(wordshift, byteshift);
402  }
403 
407 
408  if (at0 == MonDataType::Energy && at1 == MonDataType::SelectedEnergy) {
409  at0Data = (at0Data << 3) | (satData & 0x7);
410  at1Data = (at1Data << 3) | ((satData & 0x70) >> 4);
411  saturation = ((satData & 0x88) == 0x88);
412  } else if (at1 == MonDataType::Energy && at0 == MonDataType::SelectedEnergy) {
413  at0Data = (at0Data << 3) | ((satData & 0x70) >> 4);
414  at1Data = (at1Data << 3) | (satData & 0x7);
415  saturation = ((satData & 0x88) == 0x88);
416  } else {
417  if (at0 == MonDataType::Energy || at0 == MonDataType::SelectedEnergy) {
418  at0Data = (at0Data << 3) | (satData & 0x7);
419  saturation = (satData & 0x20);
420  }
421  if (at1 == MonDataType::Energy || at1 == MonDataType::SelectedEnergy) {
422  at1Data = (at1Data << 3) | (satData & 0x7);
423  saturation = (satData & 0x20);
424  }
425  }
426 }

◆ decodeHeader()

unsigned int LArLATOMEDecoder::EventProcess::decodeHeader ( const uint32_t *  p,
unsigned int  offset 
)
private

now these are taken from the ROD header but the word are still here (maybe we will use them for something else)

Definition at line 219 of file LArLATOMEDecoder.cxx.

219  {
220 
222  int monheadererror = 0;
223  int monheadererrorbit = 0;
224  if (!compareOrSet(m_latomeID, bswap_32(p[0 + offset]), m_headerDecoded))
225  monheadererror |= (1 << monheadererrorbit++);
226  Word l1IDtmp = m_l1ID;
227  if (!compareOrSet(l1IDtmp, bswap_32(p[1 + offset]), m_headerDecoded))
228  monheadererror |= (1 << monheadererrorbit++);
229  if (l1IDtmp != m_l1ID) {
230  ATH_MSG_DEBUG("Mon header L1ID " << l1IDtmp << " different from rod header L1ID " << m_l1ID);
231  }
232  ATH_MSG_DEBUG(" latomeID: " << m_latomeID << " l1ID: " << m_l1ID);
233 
234  Word monHeaderMarker = bswap_32(p[2 + offset]);
235  Word monCheckPoint = bswap_32(p[4 + offset]);
236  if (s_monHeaderMarker != monHeaderMarker) {
237  monheadererror |= (1 << monheadererrorbit++);
238  ATH_MSG_WARNING("Problem in monHeaderMarker: " << monHeaderMarker);
239  }
240  if (s_monCheckPoint != monCheckPoint) {
241  monheadererror |= (1 << monheadererrorbit++);
242  ATH_MSG_WARNING("Problem in monCheckPoint: " << monCheckPoint);
243  }
244 
245  if (!compareOrSet(m_nPackets, bswap_32(p[3 + offset]) >> 24, m_headerDecoded))
246  monheadererror |= (1 << monheadererrorbit++);
247 
248  if (m_nPackets == 0xFF) {
249  m_nPackets = 1;
250  m_iPacket = 0;
251  m_nWordsPerPacket = (bswap_32(p[3 + offset]) & 0xffffff) / 4.;
252  } else {
253  if (m_headerDecoded)
254  ++m_iPacket;
255  else
256  m_iPacket = 0;
257  if (!compareOrSet(m_iPacket, (bswap_32(p[3 + offset]) >> 16) & 0xf, m_headerDecoded))
258  monheadererror |= (1 << monheadererrorbit++);
259  m_nWordsPerPacket = (bswap_32(p[3 + offset]) & 0xffff) / 4.;
260  }
261 
262  if (!compareOrSet(m_monHeaderSize, bswap_32(p[5 + offset]), m_headerDecoded))
263  monheadererror |= (1 << monheadererrorbit++);
264 
267  if (m_monHeaderSize < 18) {
268  ATH_MSG_WARNING(" Mon header size should not be less that 18 : =" << m_monHeaderSize << " are you reading old data file?");
269  return 0;
270  }
271 
272  ATH_MSG_DEBUG(" nPackets: " << m_nPackets << " iPacket: " << m_iPacket << " nWordsPerPacket: " << m_nWordsPerPacket << " monHeaderSize: " << m_monHeaderSize);
273 
275  if (!compareOrSet(m_at0typeRec, bswap_32(p[9 + offset]), m_headerDecoded))
276  monheadererror |= (1 << monheadererrorbit++);
277  if (!compareOrSet(m_at1typeRec, bswap_32(p[12 + offset]), m_headerDecoded))
278  monheadererror |= (1 << monheadererrorbit++);
279  monheadererrorbit += 2;
280 
281  if (!compareOrSet(m_at0nBC, bswap_32(p[10 + offset]), m_headerDecoded))
282  monheadererror |= (1 << monheadererrorbit++);
283  if (!compareOrSet(m_at1nBC, bswap_32(p[13 + offset]), m_headerDecoded))
284  monheadererror |= (1 << monheadererrorbit++);
285  if (!compareOrSet(m_at0BC, bswap_32(p[11 + offset]), m_headerDecoded))
286  monheadererror |= (1 << monheadererrorbit++);
287  if (!compareOrSet(m_at1BC, bswap_32(p[14 + offset]), m_headerDecoded))
288  monheadererror |= (1 << monheadererrorbit++);
289  if (!compareOrSet(m_activeSC, bswap_32(p[15 + offset]), m_headerDecoded))
290  monheadererror |= (1 << monheadererrorbit++);
291  if (!compareOrSet(m_nsc1, bswap_32(p[16]) >> 24, m_headerDecoded))
292  monheadererror |= (1 << monheadererrorbit++);
293  if (!compareOrSet(m_nsc2, (bswap_32(p[16]) >> 16) & 0xff, m_headerDecoded))
294  monheadererror |= (1 << monheadererrorbit++);
295  if (!compareOrSet(m_nsc3, (bswap_32(p[16]) >> 8) & 0xff, m_headerDecoded))
296  monheadererror |= (1 << monheadererrorbit++);
297  if (!compareOrSet(m_nsc4, (bswap_32(p[16])) & 0xff, m_headerDecoded))
298  monheadererror |= (1 << monheadererrorbit++);
299  if (!compareOrSet(m_nsc5, bswap_32(p[17]) >> 24, m_headerDecoded))
300  monheadererror |= (1 << monheadererrorbit++);
301  if (!compareOrSet(m_nsc6, (bswap_32(p[17]) >> 16) & 0xff, m_headerDecoded))
302  monheadererror |= (1 << monheadererrorbit++);
303 
304  ATH_MSG_DEBUG(" at0type " << m_at0typeRec << " at1type " << m_at1typeRec << " at0nBC " << m_at0nBC << " at1nBC " << m_at1nBC << " at0BC " << m_at0BC
305  << " at1BC " << m_at1BC << " nsc1 " << m_nsc1 << " nsc2 " << m_nsc2 << " nsc3 " << m_nsc3 << " nsc4 " << m_nsc4 << " nsc5 "
306  << m_nsc5 << " nsc6 " << m_nsc6);
307 
308  if (monheadererror) {
309  ATH_MSG_WARNING(" consistency error in mon checker at packet " << m_iPacket << " errorbits " << std::hex << monheadererror << std::dec);
310  }
311 
312  m_headerDecoded = true;
314 }

◆ decodeTrailer()

unsigned int LArLATOMEDecoder::EventProcess::decodeTrailer ( const uint32_t *  p,
unsigned int  offset 
)
private

for now the trailerhas only 2 fixed words, just check them

fixed shift for now but in case we get a dynamic trailer (hopefully not)

Definition at line 209 of file LArLATOMEDecoder.cxx.

209  {
211  if (bswap_32(p[offset]) != 0xc0ffee00 || bswap_32(p[offset + 1] != 0xaaaaaaaa)) {
212  ATH_MSG_WARNING("Problem in trailer at packet " << m_iPacket << " words " << std::hex << bswap_32(p[offset]) << ", " << bswap_32(p[offset + 1])
213  << std::dec);
214  }
216  return offset + m_monTrailerSize;
217 }

◆ decodeWord()

void LArLATOMEDecoder::EventProcess::decodeWord ( unsigned int &  word,
unsigned int &  wordshift,
unsigned int &  byteshift,
const uint32_t *  p 
)
private

Definition at line 360 of file LArLATOMEDecoder.cxx.

360  {
361  unsigned int msb = 0;
362  unsigned int lsb = 0;
363  decodeByte(msb, wordshift, byteshift, p);
364  increaseByteShift(wordshift, byteshift);
365  decodeByte(lsb, wordshift, byteshift, p);
366  increaseByteShift(wordshift, byteshift);
367  word = lsb | (msb << 8);
368 }

◆ fillCalib()

void LArLATOMEDecoder::EventProcess::fillCalib ( const LArLATOMEMapping map,
const LArOnOffIdMapping onoffmap,
const LArCalibLineMapping clmap 
)
private

accumulated calib digits requested so decode dac and delay from headers

scale to the min nt since we have only one nt per channel and not by sample as with raw data

for loop on SCs

Definition at line 870 of file LArLATOMEDecoder.cxx.

870  {
871 
873  uint32_t DAC_value=0;
874  uint16_t delay_value=0;
875  uint16_t isPulsed_value=false;
876  std::unique_ptr<LArCalibParams> calibParams1;
877  std::unique_ptr<LArCalibParams> calibParams2;
878 
879  int pattype = m_nthLATOME >> 16;
880  const LArOnOffIdMapping* cabling = 0;
881  if (m_caccdigits) {
882  m_caccdigits->setDelayScale(25. / 240.);
883 
885  cabling = {*cablingHdl};
886  if (!cabling) {
887  ATH_MSG_ERROR("Do not have mapping object " << m_decoder->m_cablingKeySC.key());
888  return;
889  }
890 
891  calibParams1=std::make_unique<LArCalibParams>();
892  calibParams2=std::make_unique<LArCalibParams>();
893 
894  if (pattype > 0x48) {
895  StatusCode sc1 = calibParams1->initialize();
896  StatusCode sc2 = calibParams2->initialize();
897  if (sc1 != StatusCode::SUCCESS || sc2 != StatusCode::SUCCESS) {
898  ATH_MSG_WARNING("could not initialize LArCalibParams, acc calib will not be filled ");
899  return;
900  }
901  if (pattype == 0x49 || pattype == 0x4a) {
902 
904 
906  } else {
907 
909 
911  }
912  } else {
913  StatusCode sc1 = calibParams1->initialize();
914  if (sc1 != StatusCode::SUCCESS) {
915  ATH_MSG_WARNING("could not initialize LArCalibParams, acc calib will not be filled ");
916  return;
917  }
919  }
920  }
921 
922  const HWIdentifier hwidEmpty;
923  for (SuperCell ch = 0; ch < N_LATOME_CHANNELS; ++ch) {
924  LArCalibParams* calibParams = 0;
925  auto SCID = map ? map->getChannelID(m_nthLATOME, ch) : hwidEmpty;
926  if (SCID == hwidEmpty) {
927  ATH_MSG_DEBUG("No mapping for ch: " << std::dec << ch);
928  continue;
929  }
931  continue;
933  continue;
934 
935  std::vector<uint64_t> sum;
936  std::vector<uint64_t> sum2;
937  unsigned int ntmin = 9999999;
939  for (auto nt : m_averagedRawValuesInEvent[ch].nTrigValid) {
940  if (nt < ntmin) {
941  ntmin = nt;
942  }
943  }
944  sum.resize(m_averagedRawValuesInEvent[ch].sum.size());
945  sum2.resize(m_averagedRawValuesInEvent[ch].sum.size());
946 
947  for (unsigned int is = 0; is < m_averagedRawValuesInEvent[ch].sum.size(); ++is) {
948  double fsum = (double)m_averagedRawValuesInEvent[ch].sum[is] / m_averagedRawValuesInEvent[ch].nTrigValid[is] * ntmin;
949  double fsum2 = (double)m_averagedRawValuesInEvent[ch].sumSq[is] / m_averagedRawValuesInEvent[ch].nTrigValid[is] * ntmin;
950  sum[is] = round(fsum);
951  sum2[is] = round(fsum2);
952  }
953  if (m_accdigits) {
954 
955  LArAccumulatedDigit* accdigi = new LArAccumulatedDigit(SCID, gain, sum, sum2, ntmin);
956  m_accdigits->push_back(accdigi);
957  }
958  if (m_caccdigits) {
959  if (pattype == 0x49 || pattype == 0x4a) {
960  if (m_decoder->m_onlineId->barrel_ec(SCID) == 0) {
961  calibParams = calibParams1.get();
962  } else {
963  calibParams = calibParams2.get();
964  }
965  } else if (pattype == 0x4b || pattype == 0x4c) {
966  if (m_decoder->m_onlineId->isHECchannel(SCID)) {
967  calibParams = calibParams1.get();
968  } else {
969  calibParams = calibParams2.get();
970  }
971  } else {
972  calibParams = calibParams1.get();
973  }
974  unsigned int eventNb = 0;
975  unsigned int numCL = 0;
976  unsigned int numPulsedLeg = 0;
977  std::vector<Identifier> ccellIds(0);
978  Identifier myofflineID = cabling->cnvToIdentifier(SCID);
979  ccellIds = m_decoder->m_sc2ccMappingTool->superCellToOfflineID(myofflineID);
980  for (Identifier id : ccellIds) { // loop cells in sc
981  HWIdentifier cellLegHWID = cablingLeg->createSignalChannelID(id);
982  const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine(cellLegHWID);
983  numCL += calibLineLeg.size();
984  for (HWIdentifier calibLineHWID : calibLineLeg) { // loop legacy calib lines
985  if (calibParams->isPulsed(eventNb, calibLineHWID)) {
986  numPulsedLeg += 1;
987  }
988  }
989  }
990 
991  isPulsed_value = true;
992  if (numPulsedLeg != numCL) {
993  if (m_decoder->m_keepPulsed)
994  continue;
995  isPulsed_value = false;
996  }
997  DAC_value = calibParams->DAC(eventNb, SCID) * numPulsedLeg;
998  // Here we want to change the DAC value to reflect the incorrect factors applied in HEC, where some of the cells are much smaller yet have DAC2MeV factors
999  // which came from averaging over many cells
1000  int ft = m_decoder->m_onlineId->feedthrough(SCID);
1001  int slot = m_decoder->m_onlineId->slot(SCID);
1002  int channel = m_decoder->m_onlineId->channel(SCID);
1003  if (m_decoder->m_onlineId->barrel_ec(SCID) == 1 && (ft == 3 || ft == 10 || ft == 16 || ft == 22)) {
1004  // if it's HEC
1005  if (slot == 1) {
1006  if (channel >= 16 && channel <= 31) { // eta 1.65 bin
1007  DAC_value = DAC_value / 1.363;
1008  m_decoder->msg(MSG::DEBUG) << "Multiplying DAC for channel " << SCID << "by 1/1.363" << endmsg;
1009  } else if (channel >= 32 && channel <= 47) { // eta 1.75 bin
1010  DAC_value = DAC_value / 1.206;
1011  m_decoder->msg(MSG::DEBUG) << "Multiplying DAC for channel " << SCID << "by 1/1.206" << endmsg;
1012  }
1013  }
1014  }
1015 
1016  delay_value = calibParams->Delay(eventNb, SCID);
1017  LArAccumulatedCalibDigit* accdigi = new LArAccumulatedCalibDigit(SCID, gain, sum, sum2, ntmin, DAC_value, delay_value, isPulsed_value);
1018 
1019  m_caccdigits->push_back(accdigi);
1020  }
1021 
1022  }
1023 }

◆ fillCollection()

void LArLATOMEDecoder::EventProcess::fillCollection ( const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment pROB,
const LArLATOMEMapping map,
const LArOnOffIdMapping onoffmap = nullptr,
const LArCalibLineMapping clmap = nullptr 
)

Execute decoding for an event.

some of this info should be used in the LatomeHeader class and for cross checks also (same as for the mon header)

this is an empty fragment, skip it

not we have the packet size from the first packet, check all packet headers before decoding we can decide later if we drop decoding if we have inconsistency

OK all headers checked and we have all info we need to decode each packet, so lets start

for now just getting the ADCs from AT0 Change later to add energy as well and use the BC shift to determine at which BC there is energy

recipe does not have at1, set at1 mux to invalid

lets start from here

start of packet, bcid still unvalid / should increase by one but take care of rotation at s_nBunches;

the data is packed with 64 bits words. Will be padded with 0s at the end of the timeslot time slot.

lets fill now, using the older code structure but this should be change to support having energy.

Loop over SC

Loop over time slots

Loop over BC

Definition at line 428 of file LArLATOMEDecoder.cxx.

429  {
430  // Mon* mon = new Mon;
431 
433  // const unsigned int rod_Size_words = robFrag->rod_ndata();
434  // const unsigned int rob_Size_words = robFrag->payload_size_word();
435  const unsigned int sourceID = robFrag->rob_source_id();
436  // const unsigned int rod_fragment_size_word = robFrag->rod_fragment_size_word();
437  // const unsigned int rod_header_size_word = robFrag->rod_header_size_word();
438  // const unsigned int rod_trailer_size_word = robFrag->rod_trailer_size_word();
439  // const unsigned int rod_bc_id = robFrag->rod_bc_id();
440  // const unsigned int rod_nstatus = robFrag->rod_nstatus();
441  // const unsigned int rod_status_position = robFrag->rod_status_position();
442  // const uint32_t* rod_start = robFrag->rod_start();
443  m_l1ID = robFrag->rod_lvl1_id();
444  m_ROBFragSize = robFrag->rod_ndata();
445  const uint32_t* p = robFrag->rod_data();
446  const unsigned int n = robFrag->rod_ndata();
447  if (0 == n) {
449  ATH_MSG_DEBUG("Empty fragment, skip ");
450  return;
451  }
452  m_latomeBCID = robFrag->rod_bc_id();
453  const uint32_t* rod_status = robFrag->rod_status();
454  const unsigned int rod_nstatus = robFrag->rod_nstatus();
455  if (rod_nstatus != 27) {
456  ATH_MSG_WARNING("Inconsistent number of rod header status elements: nstatus= " << rod_nstatus);
457  return;
458  }
459  if (rod_nstatus > 8) {
460  uint32_t status8 = rod_status[8];
461  m_at0type = status8 & 0x3;
462  m_at1type = (status8 >> 2) & 0x3;
463  }
464  m_nthLATOME = robFrag->rod_source_id();
465 
466  LatomeCalibPatterns pat1, pat2, pat3;
467  pat1.DAC = rod_status[9];
468  pat1.delay = rod_status[10];
469  pat1.patterns.resize(4);
470  for (unsigned int i = 0; i < 4; ++i)
471  pat1.patterns[i] = rod_status[i + 11];
472 
473  pat2.DAC = rod_status[15];
474  pat2.delay = rod_status[16];
475  pat2.patterns.resize(4);
476  for (unsigned int i = 0; i < 4; ++i)
477  pat2.patterns[i] = rod_status[i + 17];
478 
479  pat3.DAC = rod_status[21];
480  pat3.delay = rod_status[22];
481  pat3.patterns.resize(4);
482  for (unsigned int i = 0; i < 4; ++i)
483  pat3.patterns[i] = rod_status[i + 23];
484 
485  m_latomeCalibPatternsInEvent = {pat1, pat2, pat3};
486 
487  const HWIdentifier hwidEmpty;
488 
490 
491  unsigned int offset = decodeHeader(p, 0);
492  if (offset > m_ROBFragSize) {
493  ATH_MSG_WARNING("Data corruption, offset found at pos 0 (" << offset << ") is larger than the ROB fragment size (" << m_ROBFragSize << "). Ignoring data.");
494  return;
495  }
496 
497  if (m_isAveraged) {
498  m_at0type = m_at0typeRec >> 24;
500  if (m_at0type != (int)MonDataType::Averaged) {
501  ATH_MSG_WARNING(" inconsistant data type with requested averaged decoding at0 type " << m_at0type << " " << m_at0typeRec << " " << std::hex << m_l1ID
502  << " " << sourceID << std::dec);
503  return;
504  }
505  }
506  if (m_isAutoCorr) {
507  m_at0type = m_at0typeRec >> 24;
509  if (m_at0type != (int)MonDataType::AutoCorr) {
510  ATH_MSG_WARNING(" inconsistant data type with requested averaged decoding at0 type " << m_at0type << " " << m_at0typeRec << " " << std::hex << m_l1ID
511  << " " << sourceID << std::dec);
512  return;
513  }
514  }
515 
516  m_packetEnd.push_back(offset);
520  for (unsigned int ip = 1; ip < m_nPackets; ++ip) {
522  m_packetEnd.push_back(offset);
524  }
525 
526  ATH_MSG_DEBUG(" end of header check computed offset=" << std::dec << offset << " nwords in payload=" << n);
527 
529  m_iPacket = 0;
530  if (m_packetEnd[m_nPackets - 1] + m_monTrailerSize != n) {
531  ATH_MSG_WARNING("problem in packet size loop " << m_packetEnd[m_nPackets - 1] << " != " << n);
532  }
533 
534  std::vector<unsigned int> timeslot_nsc = {m_nsc1, m_nsc2, m_nsc3, m_nsc4, m_nsc5, m_nsc6};
535  std::vector<unsigned int> bc_size;
538 
539  short nBC = 0;
540  short nBC1 = 0;
541  short startBC1 = 0;
544 
545  if (m_isAveraged || m_isAutoCorr) {
546  nBC = m_at0nBC;
547  nBC1 = m_at1nBC;
548  m_nBC_Averaged = nBC;
549  startBC1 = 0;
550  type0 = static_cast<MonDataType>(m_at0type);
551  type1 = static_cast<MonDataType>(m_at1type);
552  for (auto& val : m_averagedRawValuesInEvent) {
553  val.sum.resize(m_nBC_Averaged);
554  val.sumSq.resize(m_nBC_Averaged);
555  val.nTrigValid.resize(m_nBC_Averaged);
556  val.latomeChannel = 99999;
557  }
558  } else {
559  if (m_at1nBC == 0) {
561  }
562 
564  if (m_at0nBC >= m_at1nBC) {
565  nBC = m_at0nBC;
566  nBC1 = m_at1nBC;
567  startBC1 = m_at1BC - m_at0BC;
568  type0 = static_cast<MonDataType>(m_at0type);
569  type1 = static_cast<MonDataType>(m_at1type);
570  } else {
571  nBC1 = m_at0nBC;
572  nBC = m_at1nBC;
573  startBC1 = m_at0BC - m_at1BC;
574  type1 = static_cast<MonDataType>(m_at0type);
575  type0 = static_cast<MonDataType>(m_at1type);
576  }
577  } else if (m_at0type != (Word)MonDataType::Invalid) {
578  nBC = m_at0nBC;
579  type0 = static_cast<MonDataType>(m_at0type);
580  } else if (m_at1type != (Word)MonDataType::Invalid) {
581  nBC = m_at1nBC;
582  type0 = static_cast<MonDataType>(m_at1type);
583  } else {
584  ATH_MSG_ERROR("No valid data type in Mon Header");
585  return;
586  }
587 
588  switch (type0) {
589  case MonDataType::RawADC:
590  m_hasRawAdc = true;
591  m_nBC_rawADC = nBC;
592  break;
593  case MonDataType::ADC:
594  m_hasAdc = true;
595  m_nBC_ADC = nBC;
596  break;
597  case MonDataType::Energy:
598  m_hasE = true;
599  m_nBC_E = nBC;
600  break;
602  m_hasEID = true;
603  m_nBC_EID = nBC;
604  break;
606  break;
607  default:
608  ATH_MSG_ERROR("wrong mux0 value " << (Word)type0);
609  return;
610  }
611 
612  switch (type1) {
613  case MonDataType::RawADC:
614  m_hasRawAdc = true;
615  m_nBC_rawADC = nBC1;
616  m_BC_rawADC = startBC1;
617  break;
618  case MonDataType::ADC:
619  m_hasAdc = true;
620  m_nBC_ADC = nBC1;
621  m_BC_ADC = startBC1;
622  break;
623  case MonDataType::Energy:
624  m_hasE = true;
625  m_nBC_E = nBC1;
626  m_BC_E = startBC1;
627  break;
629  m_hasEID = true;
630  m_nBC_EID = nBC1;
631  m_BC_EID = startBC1;
632  break;
634  break;
635  default:
636  ATH_MSG_ERROR("wrong mux1 value " << (Word)type1);
637  return;
638  }
639 
640  for (auto& val : m_rawValuesInEvent) {
641  if (m_hasRawAdc)
642  val.adc.resize(m_nBC_rawADC);
643  if (m_hasAdc)
644  val.adc_bas.resize(m_nBC_ADC);
645  if (m_hasE)
646  val.et.resize(m_nBC_E);
647  if (m_hasEID)
648  val.et_id.resize(m_nBC_EID);
649  if (m_hasEID || m_hasE) {
650  val.saturation.resize(std::max(m_nBC_EID, m_nBC_E));
651  }
652 
653  val.latomeChannel = 99999;
654  }
655  }
656 
657  m_BCIDsInEvent.resize(nBC);
658 
659  unsigned int s = m_monHeaderSize;
660  unsigned int bcid = s_nBunches;
661 
662  for (short iBC = 0; iBC < nBC; ++iBC) {
663  MonDataType at0 = type0;
664  MonDataType at1 = type1;
665  if (type1 != MonDataType::Invalid) {
666  if (iBC < startBC1 || iBC >= startBC1 + nBC1)
667  at1 = MonDataType::Invalid;
668  }
669  unsigned int nbytesPerChannel = bytesPerChannel(at0, at1);
670 
671  int nsc = 0;
672  unsigned int oldipacket = 0;
673  for (unsigned int itimeslot = 0; itimeslot < 6; ++itimeslot) {
674 
675  unsigned int l_bcid = (bswap_32(p[s])) >> 16;
676  if (itimeslot != 0) {
677  if (l_bcid != bcid) {
678  ATH_MSG_WARNING("ERROR: inconsistent BCID between time slots");
679  }
680  } else {
681  if (bcid != s_nBunches) {
682  unsigned int bcid_c = bcid + 1;
684  if (bcid_c == s_nBunches) {
685  bcid = 0;
686  bcid_c = 0;
687  }
688  if (bcid_c != l_bcid) {
689  ATH_MSG_WARNING("ERROR: BCID not increasing properly between samples, L1ID is: "
690  << m_l1ID << ", BCID is from payload: " << l_bcid << ", expected BCID is: " << bcid_c << ", LATOME channel is: " << nsc);
691  }
692  }
693  m_BCIDsInEvent[iBC] = l_bcid;
694  }
695  bcid = l_bcid;
696 
697  unsigned int mux = ((bswap_32(p[s])) >> 8) & 0xff;
701  if (s >= n)
702  break;
703 
704  unsigned int timeslotsize = timeslot_nsc[itimeslot];
705  unsigned int nbytes = timeslotsize * nbytesPerChannel;
706  unsigned int n64word = nbytes / 8;
707  if (nbytes % 8)
708  ++n64word;
709  ATH_MSG_DEBUG(" at BC " << iBC << " timeslot " << itimeslot << " " << bcid << " " << mux << " n64word " << n64word << " at0 " << (int)at0 << " at1 "
710  << (int)at1 << " l_bcid " << bcid);
711 
712  unsigned int wordshift = s;
713  unsigned int byteshift = 0;
714 
716  oldipacket = m_iPacket;
717  for (unsigned int ichan = 0; ichan < timeslotsize; ++ichan) {
718  unsigned int at0Data = 0, at1Data = 0, satData = 0;
719  bool at0val = false, at1val = false;
720 
721  // protection against corrupted bytestream data
722  if (nsc > N_LATOME_CHANNELS - 1) {
723  break;
724  // FIXME: should fill some default data to all channels, because clearly this block is corrupted
725  }
726  if (!m_isAveraged && !m_isAutoCorr) {
727  decodeChannel(wordshift, byteshift, p, at0, at1, at0Data, at1Data, satData, at0val, at1val);
728  ATH_MSG_DEBUG(" wordshift " << wordshift << " byteshift " << byteshift << " at0data " << at0Data << " at1Data " << at1Data << " satData " << satData
729  << " at0val " << at0val << " at1val " << at1val << " nsc " << nsc);
730 
732  const auto SCID = map ? map->getChannelID(m_nthLATOME, nsc) : hwidEmpty;
733  if (SCID == hwidEmpty) {
734  ATH_MSG_DEBUG("No mapping for ch: " << std::dec << nsc);
735  }
736  int RAWValue0 = -999;
737  if (!at0val && SCID != hwidEmpty && at0 != MonDataType::Invalid) {
738  ATH_MSG_DEBUG("at0 bad quality bit for SC:" << nsc << " BC " << iBC << " latome " << robFrag->rod_source_id());
739  } else {
741  RAWValue0 = at0Data;
742  }
743  int defaultADCValue = -1;
744  int defaultEValue = -99999;
745  auto& rawValuesInEvent = m_rawValuesInEvent[nsc];
746  switch (at0) {
747  case MonDataType::RawADC:
748  if ((unsigned)iBC < rawValuesInEvent.adc.size()) {
749  rawValuesInEvent.adc[iBC] = (at0val) ? RAWValue0 : defaultADCValue;
750  }
751  break;
752  case MonDataType::ADC:
753  if ((unsigned)iBC < rawValuesInEvent.adc_bas.size()) {
754  rawValuesInEvent.adc_bas[iBC] = (at0val) ? RAWValue0 : defaultADCValue;
755  }
756  break;
757  case MonDataType::Energy:
758  if ((unsigned)iBC < rawValuesInEvent.et.size()) {
759  rawValuesInEvent.et[iBC] = (at0val) ? signEnergy(RAWValue0) : defaultEValue;
760  rawValuesInEvent.saturation[iBC] = satData;
761  }
762  break;
764  if ((unsigned)iBC < rawValuesInEvent.et_id.size()) {
765  rawValuesInEvent.et_id[iBC] = (at0val) ? signEnergy(RAWValue0) : defaultEValue;
766  rawValuesInEvent.saturation[iBC] = satData;
767  }
768  break;
770  break;
771  default:
772  ATH_MSG_ERROR("wrong at0 value " << (Word)at0);
773  return;
774  }
775 
776  int RAWValue1 = -999;
777  if (!at1val && SCID != hwidEmpty && at1 != MonDataType::Invalid) {
778  ATH_MSG_DEBUG("at1 bad quality bit for SC:" << nsc << " BC " << iBC << " latome " << robFrag->rod_source_id());
779  } else {
781  RAWValue1 = at1Data;
782  }
783 
784  const size_t BCidx = iBC - startBC1;
785  switch (at1) {
786  case MonDataType::RawADC:
787  if (BCidx < rawValuesInEvent.adc.size()) {
788  rawValuesInEvent.adc[BCidx] = (at1val) ? RAWValue1 : defaultADCValue;
789  }
790  break;
791  case MonDataType::ADC:
792  if (BCidx < rawValuesInEvent.adc_bas.size()) {
793  rawValuesInEvent.adc_bas[BCidx] = (at1val) ? RAWValue1 : defaultADCValue;
794  }
795  break;
796  case MonDataType::Energy:
797  if (BCidx < rawValuesInEvent.et.size()) {
798  rawValuesInEvent.et[BCidx] = (at1val) ? signEnergy(RAWValue1) : defaultEValue;
799  rawValuesInEvent.saturation[BCidx] = satData;
800  }
801  break;
803  if (BCidx < rawValuesInEvent.et_id.size()) {
804  m_rawValuesInEvent[nsc].et_id[BCidx] = (at1val) ? signEnergy(RAWValue1) : defaultEValue;
805  m_rawValuesInEvent[nsc].saturation[BCidx] = satData;
806  }
807  break;
809  break;
810  default:
811  ATH_MSG_ERROR("wrong at1 value " << (Word)at1);
812  return;
813  }
814 
815  m_rawValuesInEvent[nsc].latomeChannel = nsc;
816 
817  } else {
818  if (wordshift % 2) {
819  ATH_MSG_ERROR("inconsistant wordshift in decoding everaged data");
820  return;
821  }
822  unsigned int averageword = bswap_32(p[wordshift]);
823  wordshift += 1;
824  unsigned int sumSq = bswap_32(p[wordshift]);
825  wordshift += 1;
826  unsigned long long sumsqMSB = averageword >> 28;
827  sumsqMSB = sumsqMSB << 32;
828 
829  m_averagedRawValuesInEvent[nsc].sum[iBC] = averageword & 0xFFFFF;
830  m_averagedRawValuesInEvent[nsc].sumSq[iBC] = sumSq | sumsqMSB;
831  m_averagedRawValuesInEvent[nsc].nTrigValid[iBC] = (averageword >> 20) & 0xFF;
832  m_averagedRawValuesInEvent[nsc].latomeChannel = nsc;
833  }
834 
835  ++nsc;
836 
837  }
838 
840  if(byteshift!=0){
841  increaseWordShift(wordshift);
842  byteshift=0;
843  }
844  ATH_MSG_DEBUG("wordshift before: " << wordshift << ", s: " << s);
845  if ((wordshift - s) % 2)
846  increaseWordShift(wordshift);
847  ATH_MSG_DEBUG("wordshift after : " << wordshift << ", s: " << s);
848  if ((wordshift - s - ((m_iPacket - oldipacket) * (m_monHeaderSize + m_monTrailerSize))) != n64word * 2) {
849  ATH_MSG_WARNING(" ERROR: time slice end is not padded properly " << (wordshift - s - m_iPacket * (m_monHeaderSize + m_monTrailerSize))
850  << "!=" << n64word * 2 << " m_ipacket " << m_iPacket);
851  }
852  s = wordshift;
853  oldipacket = m_iPacket;
854  }
855 
856  }
857 
858  if (!m_isAveraged && !m_isAutoCorr) {
859  fillRaw(map);
860  } else {
861  if (onoffmap && clmap) {
862  fillCalib(map, onoffmap, clmap);
863  } else {
864  ATH_MSG_ERROR("Do not have mapping !!!");
865  }
866  }
867  fillHeader();
868 }

◆ fillHeader()

void LArLATOMEDecoder::EventProcess::fillHeader ( )
private

Definition at line 1102 of file LArLATOMEDecoder.cxx.

1102  {
1103 
1104  if (m_header_coll) {
1106  m_header_coll->push_back(latome);
1107  }
1108 }

◆ fillRaw()

void LArLATOMEDecoder::EventProcess::fillRaw ( const LArLATOMEMapping map)
private

Pass ADC values from an event.

don't copy vectors for nothing

need to shift the BCID as well do it at the same time

Definition at line 1026 of file LArLATOMEDecoder.cxx.

1026  {
1027  // const CaloGain::CaloGain dummyGain = CaloGain::LARHIGHGAIN;
1028  const HWIdentifier hwidEmpty;
1029  for (SuperCell ch = 0; ch < N_LATOME_CHANNELS; ++ch) {
1030  const auto SCID = map ? map->getChannelID(m_nthLATOME, ch) : hwidEmpty;
1031  if (SCID == hwidEmpty) {
1032  ATH_MSG_DEBUG("No mapping for ch: " << std::dec << ch);
1033  continue;
1034  }
1036  continue;
1038  continue;
1039 
1040  std::vector<short> adcValues_inChannel_inEvent;
1041 
1042  if (m_hasRawAdc) {
1043  adcValues_inChannel_inEvent = m_rawValuesInEvent[ch].adc;
1044  }
1045 
1046  if (m_hasRawAdc && m_adc_coll) {
1049 
1050  std::vector<unsigned short> bcid_in_event;
1051  for (short b = m_BC_rawADC; b < m_BC_rawADC + m_nBC_rawADC; ++b) {
1052  bcid_in_event.push_back(m_BCIDsInEvent[b]);
1053  }
1054 
1055  LArSCDigit* scDigit = new LArSCDigit(SCID, m_rawValuesInEvent[ch].latomeChannel, m_nthLATOME, adcValues_inChannel_inEvent, bcid_in_event);
1056  m_adc_coll->push_back(scDigit);
1057  }
1058 
1059  if (m_hasAdc && m_adc_bas_coll) {
1060  std::vector<unsigned short> bcid_in_event;
1061  if (m_nBC_ADC == (short)m_BCIDsInEvent.size()) {
1062  bcid_in_event = m_BCIDsInEvent;
1063  } else {
1064  for (short b = m_BC_ADC; b < m_BC_ADC + m_nBC_ADC; ++b) {
1065  bcid_in_event.push_back(m_BCIDsInEvent[b]);
1066  }
1067  }
1068  LArSCDigit* scDigit = new LArSCDigit(SCID, m_rawValuesInEvent[ch].latomeChannel, m_nthLATOME, m_rawValuesInEvent[ch].adc_bas, bcid_in_event);
1069  m_adc_bas_coll->push_back(scDigit);
1070  }
1071 
1072  if (m_hasE && m_et_coll) {
1073  std::vector<unsigned short> bcid_in_event;
1074  if (m_nBC_E == (unsigned short)m_BCIDsInEvent.size()) {
1075  bcid_in_event = m_BCIDsInEvent;
1076  } else {
1077  for (short b = m_BC_E; b < m_BC_E + m_nBC_E; ++b) {
1078  bcid_in_event.push_back(m_BCIDsInEvent[b]);
1079  }
1080  }
1081  LArRawSC* scDigit =
1082  new LArRawSC(SCID, m_rawValuesInEvent[ch].latomeChannel, m_nthLATOME, m_rawValuesInEvent[ch].et, bcid_in_event, m_rawValuesInEvent[ch].saturation);
1083  m_et_coll->push_back(scDigit);
1084  }
1085 
1086  if (m_hasEID && m_et_id_coll) {
1087  std::vector<unsigned short> bcid_in_event;
1088  if (m_nBC_EID == (short)m_BCIDsInEvent.size()) {
1089  bcid_in_event = m_BCIDsInEvent;
1090  } else {
1091  for (short b = m_BC_EID; b < m_BC_EID + m_nBC_EID; ++b) {
1092  bcid_in_event.push_back(m_BCIDsInEvent[b]);
1093  }
1094  }
1095  LArRawSC* scDigit =
1096  new LArRawSC(SCID, m_rawValuesInEvent[ch].latomeChannel, m_nthLATOME, m_rawValuesInEvent[ch].et_id, bcid_in_event, m_rawValuesInEvent[ch].saturation);
1097  m_et_id_coll->push_back(scDigit);
1098  }
1099  }
1100 }

◆ increaseByteShift()

void LArLATOMEDecoder::EventProcess::increaseByteShift ( unsigned int &  wordshift,
unsigned int &  byteshift 
)
private

Definition at line 348 of file LArLATOMEDecoder.cxx.

348  {
349  ++byteshift;
350  if (byteshift == 4) {
351  increaseWordShift(wordshift);
352  byteshift = 0;
353  }
354 }

◆ increaseWordShift()

void LArLATOMEDecoder::EventProcess::increaseWordShift ( unsigned int &  wordshift)
private

Definition at line 339 of file LArLATOMEDecoder.cxx.

339  {
340  ++wordshift;
341  if (m_packetEnd[m_iPacket] == wordshift) {
342  ++m_iPacket;
343  wordshift += (m_monHeaderSize + m_monTrailerSize);
344  ATH_MSG_DEBUG("switch packet " << m_iPacket << " " << wordshift);
345  }
346 }

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40 {
42  m_lvl = m_imsg ?
43  static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
44  MSG::INFO;
45 }

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 164 of file AthMessaging.h.

165 {
166  MsgStream* ms = m_msg_tls.get();
167  if (!ms) {
168  if (!m_initialized.test_and_set()) initMessaging();
169  ms = new MsgStream(m_imsg,m_nm);
170  m_msg_tls.reset( ms );
171  }
172 
173  ms->setLevel (m_lvl);
174  return *ms;
175 }

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level  lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 179 of file AthMessaging.h.

180 { return msg() << lvl; }

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152 {
153  if (!m_initialized.test_and_set()) initMessaging();
154  if (m_lvl <= lvl) {
155  msg() << lvl;
156  return true;
157  } else {
158  return false;
159  }
160 }

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level  lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29 {
30  m_lvl = lvl;
31 }

◆ signEnergy()

int LArLATOMEDecoder::EventProcess::signEnergy ( unsigned int  energy)
private

Definition at line 316 of file LArLATOMEDecoder.cxx.

316  {
317 
318  if (energy & (1 << 17))
319  return energy - pow(2, 18);
320  else
321  return energy;
322 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_accdigits

LArAccumulatedDigitContainer* LArLATOMEDecoder::EventProcess::m_accdigits {}
private

Definition at line 239 of file LArLATOMEDecoder.h.

◆ m_activeSC

Word LArLATOMEDecoder::EventProcess::m_activeSC {}
private

Definition at line 207 of file LArLATOMEDecoder.h.

◆ m_adc_bas_coll

LArDigitContainer* LArLATOMEDecoder::EventProcess::m_adc_bas_coll {}
private

Definition at line 236 of file LArLATOMEDecoder.h.

◆ m_adc_coll

LArDigitContainer* LArLATOMEDecoder::EventProcess::m_adc_coll {}
private

Definition at line 235 of file LArLATOMEDecoder.h.

◆ m_at0BC

Word LArLATOMEDecoder::EventProcess::m_at0BC {}
private

Definition at line 205 of file LArLATOMEDecoder.h.

◆ m_at0nBC

Word LArLATOMEDecoder::EventProcess::m_at0nBC {}
private

Definition at line 203 of file LArLATOMEDecoder.h.

◆ m_at0type

Word LArLATOMEDecoder::EventProcess::m_at0type {}
private

Definition at line 201 of file LArLATOMEDecoder.h.

◆ m_at0typeRec

Word LArLATOMEDecoder::EventProcess::m_at0typeRec {}
private

Definition at line 199 of file LArLATOMEDecoder.h.

◆ m_at1BC

Word LArLATOMEDecoder::EventProcess::m_at1BC {}
private

Definition at line 206 of file LArLATOMEDecoder.h.

◆ m_at1nBC

Word LArLATOMEDecoder::EventProcess::m_at1nBC {}
private

Definition at line 204 of file LArLATOMEDecoder.h.

◆ m_at1type

Word LArLATOMEDecoder::EventProcess::m_at1type {}
private

Definition at line 202 of file LArLATOMEDecoder.h.

◆ m_at1typeRec

Word LArLATOMEDecoder::EventProcess::m_at1typeRec {}
private

Definition at line 200 of file LArLATOMEDecoder.h.

◆ m_averagedRawValuesInEvent

std::vector<LatomeAveragedRawData> LArLATOMEDecoder::EventProcess::m_averagedRawValuesInEvent
private

Definition at line 248 of file LArLATOMEDecoder.h.

◆ m_BC_ADC

short LArLATOMEDecoder::EventProcess::m_BC_ADC {}
private

Definition at line 223 of file LArLATOMEDecoder.h.

◆ m_BC_E

short LArLATOMEDecoder::EventProcess::m_BC_E {}
private

Definition at line 224 of file LArLATOMEDecoder.h.

◆ m_BC_EID

short LArLATOMEDecoder::EventProcess::m_BC_EID {}
private

Definition at line 225 of file LArLATOMEDecoder.h.

◆ m_BC_rawADC

short LArLATOMEDecoder::EventProcess::m_BC_rawADC {}
private

Definition at line 222 of file LArLATOMEDecoder.h.

◆ m_BCIDsInEvent

std::vector<unsigned short> LArLATOMEDecoder::EventProcess::m_BCIDsInEvent
private

Definition at line 246 of file LArLATOMEDecoder.h.

◆ m_caccdigits

LArAccumulatedCalibDigitContainer* LArLATOMEDecoder::EventProcess::m_caccdigits {}
private

Definition at line 240 of file LArLATOMEDecoder.h.

◆ m_decoder

const LArLATOMEDecoder* LArLATOMEDecoder::EventProcess::m_decoder {}
private

Definition at line 234 of file LArLATOMEDecoder.h.

◆ m_et_coll

LArRawSCContainer* LArLATOMEDecoder::EventProcess::m_et_coll {}
private

Definition at line 237 of file LArLATOMEDecoder.h.

◆ m_et_id_coll

LArRawSCContainer* LArLATOMEDecoder::EventProcess::m_et_id_coll {}
private

Definition at line 238 of file LArLATOMEDecoder.h.

◆ m_hasAdc

bool LArLATOMEDecoder::EventProcess::m_hasAdc {}
private

Definition at line 228 of file LArLATOMEDecoder.h.

◆ m_hasE

bool LArLATOMEDecoder::EventProcess::m_hasE {}
private

Definition at line 229 of file LArLATOMEDecoder.h.

◆ m_hasEID

bool LArLATOMEDecoder::EventProcess::m_hasEID {}
private

Definition at line 230 of file LArLATOMEDecoder.h.

◆ m_hasRawAdc

bool LArLATOMEDecoder::EventProcess::m_hasRawAdc {}
private

Definition at line 227 of file LArLATOMEDecoder.h.

◆ m_header_coll

LArLATOMEHeaderContainer* LArLATOMEDecoder::EventProcess::m_header_coll {}
private

Definition at line 241 of file LArLATOMEDecoder.h.

◆ m_headerDecoded

bool LArLATOMEDecoder::EventProcess::m_headerDecoded {}
private

Definition at line 214 of file LArLATOMEDecoder.h.

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

◆ m_iPacket

Word LArLATOMEDecoder::EventProcess::m_iPacket {}
private

Definition at line 193 of file LArLATOMEDecoder.h.

◆ m_isAutoCorr

bool LArLATOMEDecoder::EventProcess::m_isAutoCorr {}
private

Definition at line 232 of file LArLATOMEDecoder.h.

◆ m_isAveraged

bool LArLATOMEDecoder::EventProcess::m_isAveraged {}
private

Definition at line 231 of file LArLATOMEDecoder.h.

◆ m_l1ID

Word LArLATOMEDecoder::EventProcess::m_l1ID {}
private

Definition at line 190 of file LArLATOMEDecoder.h.

◆ m_latomeBCID

Word LArLATOMEDecoder::EventProcess::m_latomeBCID {}
private

Definition at line 187 of file LArLATOMEDecoder.h.

◆ m_latomeCalibPatternsInEvent

std::vector<LatomeCalibPatterns> LArLATOMEDecoder::EventProcess::m_latomeCalibPatternsInEvent
private

Definition at line 249 of file LArLATOMEDecoder.h.

◆ m_latomeID

Word LArLATOMEDecoder::EventProcess::m_latomeID {}
private

Definition at line 189 of file LArLATOMEDecoder.h.

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

◆ m_monHeaderSize

Word LArLATOMEDecoder::EventProcess::m_monHeaderSize {}
private

Definition at line 195 of file LArLATOMEDecoder.h.

◆ m_monTrailerSize

const Word LArLATOMEDecoder::EventProcess::m_monTrailerSize =2
staticprivate

some cached info to ease processing reading from data header

Definition at line 181 of file LArLATOMEDecoder.h.

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nBC_ADC

short LArLATOMEDecoder::EventProcess::m_nBC_ADC {}
private

Definition at line 217 of file LArLATOMEDecoder.h.

◆ m_nBC_Averaged

short LArLATOMEDecoder::EventProcess::m_nBC_Averaged {}
private

Definition at line 220 of file LArLATOMEDecoder.h.

◆ m_nBC_E

short LArLATOMEDecoder::EventProcess::m_nBC_E {}
private

Definition at line 218 of file LArLATOMEDecoder.h.

◆ m_nBC_EID

short LArLATOMEDecoder::EventProcess::m_nBC_EID {}
private

Definition at line 219 of file LArLATOMEDecoder.h.

◆ m_nBC_rawADC

short LArLATOMEDecoder::EventProcess::m_nBC_rawADC {}
private

Definition at line 216 of file LArLATOMEDecoder.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_nPackets

Word LArLATOMEDecoder::EventProcess::m_nPackets {}
private

Definition at line 192 of file LArLATOMEDecoder.h.

◆ m_nsc1

Word LArLATOMEDecoder::EventProcess::m_nsc1 {}
private

Definition at line 208 of file LArLATOMEDecoder.h.

◆ m_nsc2

Word LArLATOMEDecoder::EventProcess::m_nsc2 {}
private

Definition at line 209 of file LArLATOMEDecoder.h.

◆ m_nsc3

Word LArLATOMEDecoder::EventProcess::m_nsc3 {}
private

Definition at line 210 of file LArLATOMEDecoder.h.

◆ m_nsc4

Word LArLATOMEDecoder::EventProcess::m_nsc4 {}
private

Definition at line 211 of file LArLATOMEDecoder.h.

◆ m_nsc5

Word LArLATOMEDecoder::EventProcess::m_nsc5 {}
private

Definition at line 212 of file LArLATOMEDecoder.h.

◆ m_nsc6

Word LArLATOMEDecoder::EventProcess::m_nsc6 {}
private

Definition at line 213 of file LArLATOMEDecoder.h.

◆ m_nStreams

Word LArLATOMEDecoder::EventProcess::m_nStreams {}
private

Definition at line 197 of file LArLATOMEDecoder.h.

◆ m_nthLATOME

unsigned int LArLATOMEDecoder::EventProcess::m_nthLATOME = 0
private

Definition at line 244 of file LArLATOMEDecoder.h.

◆ m_nWordsPerPacket

Word LArLATOMEDecoder::EventProcess::m_nWordsPerPacket {}
private

Definition at line 194 of file LArLATOMEDecoder.h.

◆ m_packetEnd

std::vector<Word> LArLATOMEDecoder::EventProcess::m_packetEnd
private

Definition at line 184 of file LArLATOMEDecoder.h.

◆ m_rawValuesInEvent

std::vector<LatomeRawData> LArLATOMEDecoder::EventProcess::m_rawValuesInEvent
private

Definition at line 247 of file LArLATOMEDecoder.h.

◆ m_region

Word LArLATOMEDecoder::EventProcess::m_region {}
private

Definition at line 196 of file LArLATOMEDecoder.h.

◆ m_ROBFragSize

Word LArLATOMEDecoder::EventProcess::m_ROBFragSize {}
private

Definition at line 191 of file LArLATOMEDecoder.h.

◆ m_streamNumber

Word LArLATOMEDecoder::EventProcess::m_streamNumber {}
private

Definition at line 198 of file LArLATOMEDecoder.h.

◆ s_monCheckPoint

const Word LArLATOMEDecoder::EventProcess::s_monCheckPoint =0xdeadbeef
staticprivate

Definition at line 183 of file LArLATOMEDecoder.h.

◆ s_monHeaderMarker

const Word LArLATOMEDecoder::EventProcess::s_monHeaderMarker =0xff1234ff
staticprivate

this is fixed and not read from data

Definition at line 182 of file LArLATOMEDecoder.h.


The documentation for this class was generated from the following files:
LArLATOMEDecoder::EventProcess::m_activeSC
Word m_activeSC
Definition: LArLATOMEDecoder.h:207
LArLATOMEDecoder::EventProcess::m_BC_EID
short m_BC_EID
Definition: LArLATOMEDecoder.h:225
LArLATOMEMapping::getChannelID
HWIdentifier getChannelID(const unsigned int sourceID, const unsigned int chan) const
create a HWIdentifier from an Identifier
Definition: LArLATOMEMapping.h:60
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
LArRawSC
Liquid Argon SuperCell raw data.
Definition: LArRawSC.h:19
LArLATOMEDecoder::EventProcess::m_nsc5
Word m_nsc5
Definition: LArLATOMEDecoder.h:212
LArAccumulatedCalibDigit
Data class for calibration ADC samples preprocessed by the DSP.
Definition: LArAccumulatedCalibDigit.h:42
et
Extra patterns decribing particle interation process.
Amg::compare
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...
Definition: EventPrimitivesHelpers.h:109
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
LArLATOMEDecoder::EventProcess::compareOrSet
bool compareOrSet(Word &param, Word value, bool compare)
Definition: LArLATOMEDecoder.cxx:201
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
LArLATOMEDecoder::m_ignoreBarrelChannels
BooleanProperty m_ignoreBarrelChannels
Definition: LArLATOMEDecoder.h:256
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LArLATOMEDecoder::EventProcess::m_et_coll
LArRawSCContainer * m_et_coll
Definition: LArLATOMEDecoder.h:237
MonDataType::ADC
@ ADC
LArAccumulatedCalibDigitContainer::setDelayScale
void setDelayScale(const double scale)
set the delay Scale
Definition: LArAccumulatedCalibDigitContainer.h:35
max
#define max(a, b)
Definition: cfImp.cxx:41
xAOD::word1
word1
Definition: eFexEMRoI_v1.cxx:82
LArLATOMEDecoder::EventProcess::m_nStreams
Word m_nStreams
Definition: LArLATOMEDecoder.h:197
LArLATOMEDecoder::EventProcess::m_BC_rawADC
short m_BC_rawADC
Definition: LArLATOMEDecoder.h:222
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
LArLATOMEDecoder::EventProcess::m_nWordsPerPacket
Word m_nWordsPerPacket
Definition: LArLATOMEDecoder.h:194
LArLATOMEDecoder::EventProcess::m_hasRawAdc
bool m_hasRawAdc
Definition: LArLATOMEDecoder.h:227
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArLATOMEDecoder::EventProcess::m_hasE
bool m_hasE
Definition: LArLATOMEDecoder.h:229
LArLATOMEDecoder::EventProcess::Word
unsigned int Word
this should be the same as how we get the data, otherwise we will have bugs.
Definition: LArLATOMEDecoder.h:133
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LArLATOMEDecoder::m_onlineId
const LArOnline_SuperCellID * m_onlineId
Definition: LArLATOMEDecoder.h:253
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
LArLATOMEDecoder::EventProcess::m_BCIDsInEvent
std::vector< unsigned short > m_BCIDsInEvent
Definition: LArLATOMEDecoder.h:246
LArLATOMEDecoder::EventProcess::PAYLOAD
@ PAYLOAD
Definition: LArLATOMEDecoder.h:175
MonDataType
MonDataType
Definition: LArLATOMEDecoder.h:51
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
LArLATOMEDecoder::EventProcess::SuperCell
int SuperCell
Definition: LArLATOMEDecoder.h:136
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArLATOMEDecoder::EventProcess::m_region
Word m_region
Definition: LArLATOMEDecoder.h:196
LArLATOMEDecoder::EventProcess::signEnergy
int signEnergy(unsigned int energy)
Definition: LArLATOMEDecoder.cxx:316
LArCalibParams
Definition: LArCalibParams.h:28
MonDataType::SelectedEnergy
@ SelectedEnergy
LArLATOMEDecoder::EventProcess::m_nsc3
Word m_nsc3
Definition: LArLATOMEDecoder.h:210
LArOnlineID_Base::slot
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
Definition: LArOnlineID_Base.cxx:1957
LArLATOMEDecoder::EventProcess::s_monHeaderMarker
static const Word s_monHeaderMarker
this is fixed and not read from data
Definition: LArLATOMEDecoder.h:182
LArLATOMEDecoder::EventProcess::bytesPerChannel
unsigned int bytesPerChannel(MonDataType at0, MonDataType at1)
Definition: LArLATOMEDecoder.cxx:324
LArLATOMEDecoder::EventProcess::m_nsc1
Word m_nsc1
Definition: LArLATOMEDecoder.h:208
athena.value
value
Definition: athena.py:124
LArLATOMEDecoder::EventProcess::m_nsc6
Word m_nsc6
Definition: LArLATOMEDecoder.h:213
LArLATOMEDecoder::EventProcess::m_packetEnd
std::vector< Word > m_packetEnd
Definition: LArLATOMEDecoder.h:184
LArLATOMEDecoder::EventProcess::m_ROBFragSize
Word m_ROBFragSize
Definition: LArLATOMEDecoder.h:191
LArLATOMEDecoder::EventProcess::decodeChannel
void decodeChannel(unsigned int &wordshift, unsigned int &byteshift, const uint32_t *p, MonDataType at0, MonDataType at1, unsigned int &at0Data, unsigned int &at1Data, unsigned int &satData, bool &at0val, bool &at1val)
Definition: LArLATOMEDecoder.cxx:370
LArLATOMEDecoder::EventProcess::m_BC_E
short m_BC_E
Definition: LArLATOMEDecoder.h:224
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LArLATOMEDecoder::EventProcess::m_latomeBCID
Word m_latomeBCID
Definition: LArLATOMEDecoder.h:187
LArLATOMEDecoder::EventProcess::decodeWord
void decodeWord(unsigned int &word, unsigned int &wordshift, unsigned int &byteshift, const uint32_t *p)
Definition: LArLATOMEDecoder.cxx:360
LArOnlineID_Base::barrel_ec
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
Definition: LArOnlineID_Base.cxx:1938
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
LArLATOMEDecoder::EventProcess::m_at1nBC
Word m_at1nBC
Definition: LArLATOMEDecoder.h:204
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
N_LATOME_CHANNELS
#define N_LATOME_CHANNELS
fixed number of channels on one LATOME board
Definition: LArLATOMEMapping.h:22
LArLATOMEDecoder::EventProcess::m_nBC_Averaged
short m_nBC_Averaged
Definition: LArLATOMEDecoder.h:220
LArLATOMEDecoder::EventProcess::m_monHeaderSize
Word m_monHeaderSize
Definition: LArLATOMEDecoder.h:195
LArLATOMEDecoder::EventProcess::m_at1BC
Word m_at1BC
Definition: LArLATOMEDecoder.h:206
LArLATOMEDecoder::EventProcess::m_decoder
const LArLATOMEDecoder * m_decoder
Definition: LArLATOMEDecoder.h:234
MonDataType::AutoCorr
@ AutoCorr
LArLATOMEDecoder::EventProcess::m_nsc4
Word m_nsc4
Definition: LArLATOMEDecoder.h:211
LArLATOMEDecoder::EventProcess::m_isAveraged
bool m_isAveraged
Definition: LArLATOMEDecoder.h:231
LArLATOMEDecoder::EventProcess::m_header_coll
LArLATOMEHeaderContainer * m_header_coll
Definition: LArLATOMEDecoder.h:241
LArLATOMEDecoder::EventProcess::m_adc_coll
LArDigitContainer * m_adc_coll
Definition: LArLATOMEDecoder.h:235
LArLATOMEDecoder::EventProcess::m_at0nBC
Word m_at0nBC
Definition: LArLATOMEDecoder.h:203
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
LArOnline_SuperCellID::isHECchannel
bool isHECchannel(const HWIdentifier id) const override final
Definition: LArOnline_SuperCellID.cxx:362
MonDataType::Invalid
@ Invalid
LArOnlineID_Base::channel
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Definition: LArOnlineID_Base.cxx:1963
LArAccumulatedDigit
Data class for ADC samples and autocorr preprocessed by the DSP.
Definition: LArAccumulatedDigit.h:32
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArLATOMEDecoder::EventProcess::m_monTrailerSize
static const Word m_monTrailerSize
some cached info to ease processing reading from data header
Definition: LArLATOMEDecoder.h:181
LArLATOMEDecoder::EventProcess::decodeByte
void decodeByte(unsigned int &byte, unsigned int wordshift, unsigned int byteshift, const uint32_t *p)
Definition: LArLATOMEDecoder.cxx:356
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArLATOMEDecoder::EventProcess::m_at0BC
Word m_at0BC
Definition: LArLATOMEDecoder.h:205
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
LArLATOMEDecoder::EventProcess::increaseWordShift
void increaseWordShift(unsigned int &wordshift)
Definition: LArLATOMEDecoder.cxx:339
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArLATOMEDecoder::EventProcess::m_caccdigits
LArAccumulatedCalibDigitContainer * m_caccdigits
Definition: LArLATOMEDecoder.h:240
LArLATOMEDecoder::EventProcess::m_nBC_E
short m_nBC_E
Definition: LArLATOMEDecoder.h:218
LArLATOMEDecoder::EventProcess::m_nBC_EID
short m_nBC_EID
Definition: LArLATOMEDecoder.h:219
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LArLATOMEDecoder::EventProcess::s_monCheckPoint
static const Word s_monCheckPoint
Definition: LArLATOMEDecoder.h:183
LArLATOMEDecoder::EventProcess::m_nBC_ADC
short m_nBC_ADC
Definition: LArLATOMEDecoder.h:217
LArLATOMEDecoder::m_ignoreEndcapChannels
BooleanProperty m_ignoreEndcapChannels
Definition: LArLATOMEDecoder.h:257
LArCalibParams::isPulsed
bool isPulsed(const unsigned event, const HWIdentifier calibLineID) const
Definition: LArCalibParams.cxx:151
LArLATOMEDecoder::m_cablingKeySC
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
Definition: LArLATOMEDecoder.h:260
LArLATOMEDecoder::EventProcess::increaseByteShift
void increaseByteShift(unsigned int &wordshift, unsigned int &byteshift)
Definition: LArLATOMEDecoder.cxx:348
LArLATOMEDecoder::EventProcess::m_et_id_coll
LArRawSCContainer * m_et_id_coll
Definition: LArLATOMEDecoder.h:238
MonDataType::RawADC
@ RawADC
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
LArLATOMEDecoder::EventProcess::m_streamNumber
Word m_streamNumber
Definition: LArLATOMEDecoder.h:198
LArLATOMEDecoder::EventProcess::m_rawValuesInEvent
std::vector< LatomeRawData > m_rawValuesInEvent
Definition: LArLATOMEDecoder.h:247
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
LArLATOMEDecoder::EventProcess::decodeTrailer
unsigned int decodeTrailer(const uint32_t *p, unsigned int offset)
Definition: LArLATOMEDecoder.cxx:209
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
LArSCDigit
Base class for LArDigits taken by LATOME.
Definition: LArSCDigit.h:19
fitman.mux
mux
Definition: fitman.py:547
LArLATOMEDecoder::EventProcess::m_at1typeRec
Word m_at1typeRec
Definition: LArLATOMEDecoder.h:200
LArLATOMEDecoder::EventProcess::m_hasEID
bool m_hasEID
Definition: LArLATOMEDecoder.h:230
MonDataType::Energy
@ Energy
LArCalibParams::DAC
unsigned DAC(const unsigned event, const HWIdentifier calibLineID) const
Definition: LArCalibParams.cxx:131
defineDB.ichan
int ichan
Definition: JetTagCalibration/share/defineDB.py:28
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MonDataType::Averaged
@ Averaged
LArLATOMEDecoder::EventProcess::fillCalib
void fillCalib(const LArLATOMEMapping *map, const LArOnOffIdMapping *onoffmap, const LArCalibLineMapping *clmap)
Definition: LArLATOMEDecoder.cxx:870
LArLATOMEDecoder::EventProcess::fillRaw
void fillRaw(const LArLATOMEMapping *map)
Pass ADC values from an event.
Definition: LArLATOMEDecoder.cxx:1026
LArCalibParams::Delay
unsigned Delay(const unsigned event, const HWIdentifier calibLineID) const
Definition: LArCalibParams.cxx:112
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
LArLATOMEDecoder::EventProcess::m_at1type
Word m_at1type
Definition: LArLATOMEDecoder.h:202
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
LArLATOMEDecoder::EventProcess::m_nPackets
Word m_nPackets
Definition: LArLATOMEDecoder.h:192
LArLATOMEDecoder::EventProcess::m_averagedRawValuesInEvent
std::vector< LatomeAveragedRawData > m_averagedRawValuesInEvent
Definition: LArLATOMEDecoder.h:248
LArLATOMEDecoder::EventProcess::m_accdigits
LArAccumulatedDigitContainer * m_accdigits
Definition: LArLATOMEDecoder.h:239
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
LArLATOMEDecoder::EventProcess::m_latomeCalibPatternsInEvent
std::vector< LatomeCalibPatterns > m_latomeCalibPatternsInEvent
Definition: LArLATOMEDecoder.h:249
LArLATOMEHeader
Holds information from the LATOME Header.
Definition: LArLATOMEHeader.h:19
LArOnlineID_Base::feedthrough
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
Definition: LArOnlineID_Base.cxx:1944
LArLATOMEDecoder::EventProcess::m_BC_ADC
short m_BC_ADC
Definition: LArLATOMEDecoder.h:223
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArLATOMEDecoder::EventProcess::m_nthLATOME
unsigned int m_nthLATOME
Definition: LArLATOMEDecoder.h:244
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
DEBUG
#define DEBUG
Definition: page_access.h:11
LArLATOMEDecoder::EventProcess::MON_HEADER
@ MON_HEADER
Definition: LArLATOMEDecoder.h:175
AthCommonMsg::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArLATOMEDecoder::EventProcess::m_at0typeRec
Word m_at0typeRec
Definition: LArLATOMEDecoder.h:199
LArCalibParams::initialize
virtual StatusCode initialize()
Definition: LArCalibParams.cxx:16
LArLATOMEDecoder::EventProcess::fillHeader
void fillHeader()
Definition: LArLATOMEDecoder.cxx:1102
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
LArLATOMEDecoder::EventProcess::m_headerDecoded
bool m_headerDecoded
Definition: LArLATOMEDecoder.h:214
LArLATOMEDecoder::EventProcess::m_l1ID
Word m_l1ID
Definition: LArLATOMEDecoder.h:190
LArLATOMEDecoder::EventProcess::m_iPacket
Word m_iPacket
Definition: LArLATOMEDecoder.h:193
LArLATOMEDecoder::EventProcess::MON_TRAILER
@ MON_TRAILER
Definition: LArLATOMEDecoder.h:175
LArLATOMEDecoder::EventProcess::m_at0type
Word m_at0type
Definition: LArLATOMEDecoder.h:201
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
beamspotnt.nt
def nt
Definition: bin/beamspotnt.py:1063
LArLATOMEDecoder::EventProcess::m_nBC_rawADC
short m_nBC_rawADC
Definition: LArLATOMEDecoder.h:216
LArLATOMEDecoder::EventProcess::decodeHeader
unsigned int decodeHeader(const uint32_t *p, unsigned int offset)
Definition: LArLATOMEDecoder.cxx:219
AthMessaging::m_msg_tls
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
Definition: AthMessaging.h:132
LArLATOMEDecoder::EventProcess::m_hasAdc
bool m_hasAdc
Definition: LArLATOMEDecoder.h:228
LArLATOMEDecoder::EventProcess::m_nsc2
Word m_nsc2
Definition: LArLATOMEDecoder.h:209
LArLATOMEDecoder::s_nBunches
static const int s_nBunches
Maximum value of BCID.
Definition: LArLATOMEDecoder.h:98
LArLATOMEDecoder::EventProcess::m_latomeID
Word m_latomeID
Definition: LArLATOMEDecoder.h:189
LArCalibParams::set
void set(const HWIdentifier CalibModuleID, const unsigned nTrigger, const std::vector< unsigned > &Pattern, const std::vector< unsigned > &DAC, const std::vector< unsigned > &Delay)
Definition: LArCalibParams.cxx:30
LArLATOMEDecoder::m_sc2ccMappingTool
ToolHandle< ICaloSuperCellIDTool > m_sc2ccMappingTool
Definition: LArLATOMEDecoder.h:254
LArLATOMEDecoder::m_keepPulsed
BooleanProperty m_keepPulsed
Definition: LArLATOMEDecoder.h:259
LArLATOMEDecoder::EventProcess::m_isAutoCorr
bool m_isAutoCorr
Definition: LArLATOMEDecoder.h:232
LArLATOMEDecoder::EventProcess::m_adc_bas_coll
LArDigitContainer * m_adc_bas_coll
Definition: LArLATOMEDecoder.h:236
Identifier
Definition: IdentifierFieldParser.cxx:14