ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TileROD_Encoder Class Reference

Provides conversion from TileRawChannel, TileL2 and TMDB (digits,MF raw channel,decision) to ROD format. More...

#include <TileROD_Encoder.h>

Inheritance diagram for TileROD_Encoder:
Collaboration diagram for TileROD_Encoder:

Public Member Functions

 TileROD_Encoder ()
 constructor More...
 
void setTileHWID (const TileHWID *tileHWID, bool verbose, unsigned int type=4)
 set all necessary parameters for the encoder More...
 
void setTileHWID (const TileHWID *tileHWID, int m_runPeriod)
 
void setTypeAndUnit (TileFragHash::TYPE type, TileRawChannelUnit::UNIT unit)
 set OF algorigtm type and amplitude units for a drawer More...
 
void setMaxChannels (int maxChannels)
 set maximum number of channels in a drawer More...
 
 ~TileROD_Encoder ()
 destructor More...
 
void add (const TileFastRawChannel *rc)
 add TileRawChannels to the current list More...
 
void addL2 (const TileL2 *l2)
 add TileL2s to the current list More...
 
void addTileMuRcvObj (const TileMuonReceiverObj *tileMuRcvObj)
 add TMBDs ROD sub-fragmens TileMuRcvObj (type3) to the current list More...
 
void addDigi (const TileDigits *digi)
 add TileDigits to the current list More...
 
void fillROD (std::vector< uint32_t > &v)
 convert all TileRawChannels in the current list to a vector of 32bit words More...
 
void fillROD2 (std::vector< uint32_t > &v)
 
void fillROD3 (std::vector< uint32_t > &v)
 
void fillROD4 (std::vector< uint32_t > &v)
 
void fillROD5 (std::vector< uint32_t > &v)
 
void fillROD10 (std::vector< uint32_t > &v)
 convert all TileL2s in the current list to a vector of 32bit words More...
 
void fillROD12 (std::vector< uint32_t > &v)
 
void fillRODL2 (std::vector< uint32_t > &v)
 
void fillROD1 (std::vector< uint32_t > &v)
 convert all TileDigits in the current list to a vector of 32bit words More...
 
void fillROD5D (std::vector< uint32_t > &v)
 
void fillRODTileMuRcvDigi (std::vector< uint32_t > &v)
 convert the TMDB objects into a vector of 32bit words: 8bit words/digit, 16bit words/RC, 16bit words/decision More...
 
void fillRODTileMuRcvRawChannel (std::vector< uint32_t > &v)
 
void fillRODTileMuRcvObj (std::vector< uint32_t > &v)
 
void dumpROD (const std::vector< uint32_t > &v)
 dump contents of the ROD fragment 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 Member Functions

void setBit (uint32_t *p, int chan)
 set the bitmap for a channel More...
 
bool checkBit (const uint32_t *p, int chan)
 check the bitmap for a channel More...
 
void initMessaging () const
 Initialize our message level and MessageSvc. More...
 

Private Attributes

std::vector< const TileFastRawChannel * > m_vTileRC
 
std::vector< const TileL2 * > m_vTileL2
 
std::vector< const TileDigits * > m_vTileDigi
 
std::vector< const TileMuonReceiverObj * > m_vTileMuRcvObj
 
TileDigits2Bytes m_Digi2bytes
 
TileRawChannel2Bytes2 m_rc2bytes2
 
TileRawChannel2Bytes m_rc2bytes3
 
TileRawChannel2Bytes4 m_rc2bytes4
 
TileRawChannel2Bytes5 m_rc2bytes5
 
const TileHWIDm_tileHWID
 
TileRawDataOrdering m_order
 
bool m_verbose
 
unsigned int m_type
 
unsigned int m_unitType
 
unsigned int m_rChUnit
 
int m_maxChannels
 
int m_runPeriod
 
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...
 

Detailed Description

Provides conversion from TileRawChannel, TileL2 and TMDB (digits,MF raw channel,decision) to ROD format.

Author
A. Solodkov
Version
0-0-1 , Oct 17, 2002

Modified, Jan 20, 2003 Split from TileROD_Decoder.

Definition at line 44 of file TileROD_Encoder.h.

Constructor & Destructor Documentation

◆ TileROD_Encoder()

TileROD_Encoder::TileROD_Encoder ( )

constructor

Definition at line 24 of file TileROD_Encoder.cxx.

24  :
25  AthMessaging ("TileROD_Encoder"),
26  m_tileHWID(0),
27  m_verbose(false),
28  m_type(0),
29  m_unitType(0),
30  m_rChUnit(0),
32  m_runPeriod(0){
33 }

◆ ~TileROD_Encoder()

TileROD_Encoder::~TileROD_Encoder ( )
inline

destructor

Definition at line 69 of file TileROD_Encoder.h.

69 { }

Member Function Documentation

◆ add()

void TileROD_Encoder::add ( const TileFastRawChannel rc)
inline

add TileRawChannels to the current list

Definition at line 73 of file TileROD_Encoder.h.

73 { m_vTileRC.push_back(rc); }

◆ addDigi()

void TileROD_Encoder::addDigi ( const TileDigits digi)
inline

add TileDigits to the current list

Definition at line 85 of file TileROD_Encoder.h.

85 { m_vTileDigi.push_back(digi); }

◆ addL2()

void TileROD_Encoder::addL2 ( const TileL2 l2)
inline

add TileL2s to the current list

Definition at line 77 of file TileROD_Encoder.h.

77 { m_vTileL2.push_back(l2); }

◆ addTileMuRcvObj()

void TileROD_Encoder::addTileMuRcvObj ( const TileMuonReceiverObj tileMuRcvObj)
inline

add TMBDs ROD sub-fragmens TileMuRcvObj (type3) to the current list

Definition at line 81 of file TileROD_Encoder.h.

81 { m_vTileMuRcvObj.push_back(tileMuRcvObj); } // decision (d6 and d5+d6) calculated @ TMDB

◆ checkBit()

bool TileROD_Encoder::checkBit ( const uint32_t *  p,
int  chan 
)
private

check the bitmap for a channel

Definition at line 942 of file TileROD_Encoder.cxx.

942  {
943 // chan = (0,47)
944  int a = chan / 32;
945  int r = chan % 32;
946 // a = (0,1), r = ( 0, 31 )
947  return *(p + a) & (1 << r);
948 
949 }

◆ dumpROD()

void TileROD_Encoder::dumpROD ( const std::vector< uint32_t > &  v)

dump contents of the ROD fragment

Definition at line 951 of file TileROD_Encoder.cxx.

951  {
952  msg(MSG::VERBOSE) << " Dump of Tile ROD block, size = " << v.size() << endmsg;
953 
954  int count = 0, newCount = 3;
955  for (const uint32_t data : v) {
956  if (count == 0) {
957  msg(MSG::VERBOSE) << "Frag delim = 0x" << std::hex << data << std::dec << endmsg;
958  } else if (count == -1) {
959  newCount = data;
960  msg(MSG::VERBOSE) << "Word count = " << newCount << endmsg;
961  } else if (count == -2) {
962  count += newCount;
963  msg(MSG::VERBOSE) << "Frag ID = 0x" << std::hex << data << std::dec << endmsg;
964  } else {
965  msg(MSG::VERBOSE) << " WORD[" << newCount - count << "] = "
966  << data << " = 0x" << std::hex << data
967  << std::dec << endmsg;
968  }
969  --count;
970  }
971 }

◆ fillROD()

void TileROD_Encoder::fillROD ( std::vector< uint32_t > &  v)

convert all TileRawChannels in the current list to a vector of 32bit words

Definition at line 113 of file TileROD_Encoder.cxx.

113  {
114  switch (m_type) {
115  case 4:
116  fillROD4(v);
117  break;
118  case 5:
119  fillROD5(v);
120  break;
121  case 3:
122  fillROD3(v);
123  break;
124  case 2:
125  fillROD2(v);
126  break;
127  case 1:
128  fillROD1(v);
129  break;
130  case 0x10:
131  fillROD10(v);
132  break;
133  case 0x12:
134  fillROD12(v);
135  break;
136  default:
137  ATH_MSG_ERROR( "fillROD -> Unknown packing type " << m_type );
138  assert(0);
139  break;
140  // return;
141  }
142 }

◆ fillROD1()

void TileROD_Encoder::fillROD1 ( std::vector< uint32_t > &  v)

convert all TileDigits in the current list to a vector of 32bit words

Definition at line 471 of file TileROD_Encoder.cxx.

471  {
472 
473  std::sort(m_vTileDigi.begin(), m_vTileDigi.end(), m_order);
474 
475  int currentFrag = -1, pos = 0, size = 0;
476  for (const TileDigits* digi : m_vTileDigi) {
477 
478  HWIdentifier adcID = digi->adc_HWID();
479  int frag = m_tileHWID->frag(adcID) | (0x01 << 16); // FRAG TYPE = 1 in upper half of the word
480  if (frag != currentFrag) {
481  if (currentFrag != -1) v[pos] = size;
482  currentFrag = frag;
483  // first word is start of fragment identifier
484  v.push_back(0xFF1234FF);
485  // next word is frag size
486  pos = v.size();
487  v.push_back(0);
488  // next word is frag ID
489  v.push_back(frag);
490  size = 3;
491  }
493  }
494  if (currentFrag != -1) v[pos] = size;
495  return;
496 }

◆ fillROD10()

void TileROD_Encoder::fillROD10 ( std::vector< uint32_t > &  v)

convert all TileL2s in the current list to a vector of 32bit words

Definition at line 145 of file TileROD_Encoder.cxx.

145  {
146 
147  int currentFrag(-1);
148  std::vector<uint32_t>::size_type start = 0;
149 
150  int NMuons1 = 0, NMuons2 = 0, frag = 0;
151 
152  for (const TileL2* l2 : m_vTileL2) {
153 
154  int ros = ((l2->identify()) | 0xff) >> 8;
155  int drawer = (l2->identify()) & 0xff;
156 
157  if ((drawer % 2) == 0) frag = 0x00100000 + (ros << 12) + ((drawer + 1) << 6) + drawer;
158 
159  if (frag != currentFrag) { // superdrawer is even
160 
161  currentFrag = frag;
162 
163  // fragment marker
164  v.push_back(0xff1234ff);
165 
166  // fragment size (variable depending on the number of muons found)
167  v.push_back(5);
168 
169  // fragment ID
170  v.push_back(frag);
171 
172  // first word after fragment header
173  start = v.size();
174 
175  // reserve 2 words for Et
176  for (int i = 0; i < 2; ++i)
177  v.push_back(0);
178 
179  // Et superdrawer #1
180  int wet = (int) round(l2->sumEt());
181  v[start] = (unsigned int) (wet + 9000); // shift by 9000 to be compatible with frag 0x10 format
182 
183  // MTag superdrawer #1
184  NMuons1 = l2->NMuons();
185  for (int i = 0; i < 2 * NMuons1; ++i)
186  v.push_back(l2->val(i));
187 
188  } else { // superdrawer is odd
189 
190  // Et superdrawer #2
191  int wet = (int) round(l2->sumEt());
192  v[start + 1] = (unsigned int) (wet + 9000); // shift by 9000 to be compatible with frag 0x10 format
193 
194  // MTag superdrawer #2
195  NMuons2 = l2->NMuons();
196  for (int i = 0; i < 2 * NMuons2; ++i)
197  v.push_back(l2->val(i));
198 
199  // re-write fragment size
200  v[start - 2] = 5 + 2 * NMuons1 + 2 * NMuons2;
201 
202  }
203 
204  }
205 
206  //assert(0);
207 }

◆ fillROD12()

void TileROD_Encoder::fillROD12 ( std::vector< uint32_t > &  v)

Definition at line 209 of file TileROD_Encoder.cxx.

209  {
210 
211  int currentFrag(-1);
212  std::vector<uint32_t>::size_type start = 0;
213 
214  int frag = 0;
215 
216  for (const TileL2* l2 : m_vTileL2) {
217 
218  int ros = (l2->identify()) >> 8;
219  int drawer = (l2->identify()) & 0xff;
220 
221  if ((drawer % 2) == 0)
222  frag = 0x120000 + (ros << 12) + ((drawer + 1) << 6) + drawer;
223  else
224  frag = 0x120000 + (ros << 12) + (drawer << 6) + (drawer - 1);
225 
226  if (frag != currentFrag) { // superdrawer is even
227 
228  currentFrag = frag;
229 
230  // fragment marker
231  v.push_back(0xff1234ff);
232 
233  // fragment size (variable depending on the number of muons found)
234  v.push_back(3);
235 
236  // fragment ID
237  v.push_back(frag);
238 
239  // first word after fragment header
240  start = v.size();
241  }
242 
243  // MTag data
244  int Ndata = l2->Ndata();
245  if (Ndata) {
246  for (int i = 0; i < Ndata; ++i)
247  v.push_back(l2->val(i));
248 
249  // re-write fragment size
250  v[start - 2] += Ndata;
251  }
252  }
253 
254  //assert(0);
255 }

◆ fillROD2()

void TileROD_Encoder::fillROD2 ( std::vector< uint32_t > &  v)

Definition at line 257 of file TileROD_Encoder.cxx.

257  {
258  //std::sort(m_vTileRC.begin(), m_vTileRC.end(), m_order);
259 
260  int currentFrag(-1);
261  std::vector<uint32_t>::size_type start = 0;
262 
263  for (const TileFastRawChannel* rc : m_vTileRC) {
264 
265  int frag = rc->frag() | m_unitType; // FRAG TYPE in upper half of the word
266 
267  if (frag != currentFrag) {
268  currentFrag = frag;
269 
270  // very first word is size of the fragment, which is 50 words
271  v.push_back(50);
272  // next word is frag ID
273  v.push_back(frag);
274 
275  // remember where is the first channel
276  start = v.size();
277  // reserve maximum number of channels in a drawer words
278  // for all channels in the drawer
279  v.resize(start + m_maxChannels, 0);
280 
281  }
282 
283  // FIXME:: protection against both low and high gain amplitude
284  // for the same raw channel,
285  // if this is the case all channels should have both
286  // low and high gain and we should use different fragment type
287 
288  int chan = rc->channel();
289  int gain = rc->adc();
290  if (chan < m_maxChannels) {
291  v[start + chan] = m_rc2bytes2.getWord(rc, gain);
292  }
293 
294  } // end of all TileRawChannel
295 
296  // dumpROD (v) ;
297 
298  return;
299 }

◆ fillROD3()

void TileROD_Encoder::fillROD3 ( std::vector< uint32_t > &  v)

Definition at line 301 of file TileROD_Encoder.cxx.

301  {
302  // get a reference to vector<short>, through static_cast
303  // be very careful with v16... make sure it is aligned
304  std::vector<short>* p16;
305  p16 = (std::vector<short>*) (&v);
306  std::vector<short>& v16 = *p16;
307 
308  //std::sort(m_vTileRC.begin(), m_vTileRC.end(), m_order);
309 
310  int currentFrag(-1);
311  bool first = true;
312  short wc16 = 0;
313  std::vector<uint32_t>::size_type head = 0;
314  std::vector<uint32_t>::size_type count = 0;
315 
316  for (const TileFastRawChannel* rc : m_vTileRC) {
317 
318 
319  int frag = rc->frag() | m_unitType; // FRAG TYPE in upper half of the word
320  int chan = rc->channel();
321  int gain = rc->adc();
322 
323  if (frag != currentFrag) {
324  currentFrag = frag;
325  // a new frag
326  if (!first) {
327  // close the current frag
328  if ((v16.size() % 2) == 1) {
329  v16.push_back(0);
330  ++wc16;
331  }
332  // inclusive word (32bit) for this frag
333  v[count] = wc16 / 2;
334  } else
335  first = false;
336 
337  // very first word is size of the fragment
338  // remember where it is
339  count = v.size();
340  v.push_back(0);
341  // add frag ID
342  v.push_back(frag);
343 
344  // remember where map starts
345  head = v.size();
346  // 2 words (64 bits) for channel map
347  v.push_back(0);
348  v.push_back(0);
349  wc16 = 8; // we stored 4 full words (8 shorts) already
350  }
351 
352  // FIXME:: protection against both low and high gain amplitude
353  // for the same raw channel,
354  // if this is the case all channels should have both
355  // low and high gain and we should use different fragment type
356 
357  if (checkBit(&(v[head]), chan)) {
358  // the same channel with another gain alreay exists, ignore second one
359  } else {
360  // get the shorts, and increment wc16 by number of shorts written.
361  wc16 += m_rc2bytes3.getBytes(rc, gain, v16);
362  // set bitmap for this channel
363  setBit(&(v[head]), chan);
364  }
365 
366  } // end of all TileRawChannel
367 
368  if (!first) {
369  // close the last Frag
370  if ((v16.size() % 2) == 1) {
371  v16.push_back(0);
372  ++wc16;
373  }
374  // inclusive word (32bit) for this frag
375  v[count] = wc16 / 2;
376  }
377 
378  // dumpROD (v) ;
379 
380  return;
381 }

◆ fillROD4()

void TileROD_Encoder::fillROD4 ( std::vector< uint32_t > &  v)

Definition at line 383 of file TileROD_Encoder.cxx.

383  {
384  //std::sort(m_vTileRC.begin(), m_vTileRC.end(), m_order);
385 
386  int currentFrag(-1);
387  std::vector<uint32_t>::size_type start = 0;
388 
389  for (const TileFastRawChannel* rc : m_vTileRC) {
390 
391  int frag = rc->frag() | m_unitType; // FRAG TYPE in upper half of the word
392 
393  if (frag != currentFrag) {
394  currentFrag = frag;
395 
396  // very first word is start fragment identifier
397  v.push_back(0xff1234ff);
398  // next word is frag size:
399  // (maximum number of channels in a drawer) + ...
400  // ... + (6 = start frag + frag size + frag ID + 3 sumE words)
401  v.push_back(m_maxChannels + 6);
402  // next word is frag ID
403  v.push_back(frag);
404 
405  // remember where is the first channel
406  start = v.size();
407 
408  // reserve (maximum number of channels in a drawer) words
409  // for all channels in the drawer and 3 sumE words
410  v.resize(start + m_maxChannels + 3, 0);
411 
412  }
413 
414  // FIXME:: protection against both low and high gain amplitude
415  // for the same raw channel,
416  // if this is the case all channels should have both
417  // low and high gain and we should use different fragment type
418 
419  int chan = rc->channel();
420  int gain = rc->adc();
421  if (chan < m_maxChannels) {
423  }
424 
425  } // end of all TileRawChannel
426 
427  // dumpROD (v) ;
428 
429  return;
430 }

◆ fillROD5()

void TileROD_Encoder::fillROD5 ( std::vector< uint32_t > &  v)

Definition at line 498 of file TileROD_Encoder.cxx.

498  {
499  ATH_MSG_ERROR( "fillROD5 -> store raw channels in frag5 - not yet implemented " );
500 }

◆ fillROD5D()

void TileROD_Encoder::fillROD5D ( std::vector< uint32_t > &  v)

Definition at line 502 of file TileROD_Encoder.cxx.

502  {
503  ATH_MSG_ERROR( "fillROD5D -> store digits in frag5 - not yet implemented " );
504 }

◆ fillRODL2()

void TileROD_Encoder::fillRODL2 ( std::vector< uint32_t > &  v)

Definition at line 432 of file TileROD_Encoder.cxx.

432  {
433 
434  std::map<int, const TileL2*> l2_map;
435 
436  for (const TileL2* l2 : m_vTileL2) {
437  l2_map[l2->identify()] = l2;
438  //std::cout << "l2 id=0x"<<std::hex<<l2->identify()<<std::dec<<std::endl;
439  }
440 
441  std::vector<uint32_t>::size_type start = 3;
442 
443  while (start <= v.size()) {
444  uint32_t size = v[start - 2];
445  uint32_t fragtype = v[start - 1];
446  int type = (fragtype >> 16) & 0xFF;
447  //std::cout <<std::hex<<"frag 0x"<<fragtype<<std::dec<<" size "<<size<<std::endl;
448  if ((type == 4 && size > 53) || (type == 5 && ((fragtype >> 27) & 7) > 2)) {
449  int frag = fragtype & 0xFFFF;
450  std::map<int, const TileL2*>::const_iterator l2_it = l2_map.find(frag);
451  if (l2_it != l2_map.end()) {
452  int unit = (fragtype >> 30);
453  const TileL2* l2 = l2_it->second;
454  int et = round(l2->sumEt() * AMPLITUDE_FACTOR5_HG[unit]);
455  v[start + 48] = (uint32_t) et;
456  int ez = round(l2->sumEz() * AMPLITUDE_FACTOR5_HG[unit]);
457  v[start + 49] = (uint32_t) ez;
458  int e = round(l2->sumE() * AMPLITUDE_FACTOR5_HG[unit]);
459  v[start + 50] = (uint32_t) e;
460  //std::cout << "Found "<<et<<","<<ez<<","<<e<<std::endl;
461  }
462  }
463  start += size;
464  }
465 
466  if (msgLvl(MSG::VERBOSE)) dumpROD(v);
467 
468  return;
469 }

◆ fillRODTileMuRcvDigi()

void TileROD_Encoder::fillRODTileMuRcvDigi ( std::vector< uint32_t > &  v)

convert the TMDB objects into a vector of 32bit words: 8bit words/digit, 16bit words/RC, 16bit words/decision

Definition at line 510 of file TileROD_Encoder.cxx.

510  {
511 
512  ATH_MSG_DEBUG( "TMDB encoding sub-fragment 0x40: loop over " << m_vTileDigi.size() << " objects" );
513 
514  // sub-fragment marker
515  //
516  v.push_back(0xff1234ff);
517 
518  // sub-fragment size
519  // set the size for the sub-fragment (3 [header] + 8 [# 32bit word/digit/pmt/module] x N [# digit/pmt/module])
520  uint32_t size = m_vTileDigi.size() * 7; // assume 7 samples
521  size = (size+3)>>2; // convert numner of bytes into number of 32bit words
522  v.push_back(3+size);
523  uint savepos=v.size()-1;
524 
525  // type & version: the version is a 16-bit number and is set by fixing the 3th hexadecimal digit (8-12 in bits) to 5 and leaving all other free
526  //
527  uint32_t verfrag = 0x500;
528  uint32_t type_version = (0x40 << 16) + verfrag;
529  v.push_back(type_version);
530 
531  v.resize(v.size()+size); // prepare place for extra words
532 
533  // counters and temporary words
534  //
535  int word8bit_cnt = 0;// number of 8bit words collected 1..4
536  int wc = 0;// number of blocks of 7 32-bit words saved in ROD fragment 1..8
537  int chc = 0;// number of digits inside the tile digits collection
538  int nwc = (m_vTileDigi.size() + 3)>>2; // convert number of channels into number of 4-byte blocks
539  uint nsamp = 7;
540  uint32_t word[7];
541  memset(word, 0, sizeof(word));
542 
543  for (const TileDigits* digi : m_vTileDigi) {
544 
545  if (wc==nwc) {
546  ATH_MSG_WARNING( "Too many channels per fragment for TMDB frag 0x40 - ignoring all the rest" );
547  break;
548  }
549 
550  // Get identifier(s) and digits for later usage
551  //
552  std::vector<float> digits = digi->samples();
553  nsamp = digits.size();
554  if (nsamp>7) {
555  ATH_MSG_WARNING( "Too many samples in digits for TMDB frag 0x40, using first 7 instead of "<<nsamp );
556  nsamp=7;
557  digits.resize(nsamp);
558  }
559 
560  // Digits from TMDB come to fragment in the reverse order i.e. s1->s7 ... s7->s1
561  //
562  std::reverse(digits.begin(),digits.end());
563 
564  // Define two counters: (a) to count for the 8bit sub-fragments (each word has 4 8bit sub-fragments)
565  // (b) to count for the 32bit words (each digit has 7 32bit words)
566  //
567  // | s(i)-m(j)-d6r | s(i)-m(j)-d6l | s(i)-m(j)-d5r | s(i)-m(j)-d5l |
568  //
569  int shift = word8bit_cnt * 8;
570  for ( uint i=0; i<nsamp; ++i ) {
571  word[i] += ((int) digits[i]) << shift;
572  }
573 
574  if (msgLvl(MSG::DEBUG)) {
575  HWIdentifier hwid = digi->adc_HWID();
576  int ros = m_tileHWID->ros(hwid);
577  int drawer = m_tileHWID->drawer(hwid);
578  int channel = m_tileHWID->channel(hwid);
579  const char * strchannel[5] = {" d5L "," d5R "," d6L "," d6R ", " xxx "};
580  int j=std::min(channel,4);
581  if (ros<3) j=4;
582  for ( uint i=0; i<nsamp; ++i ) {
583  msg(MSG::DEBUG) << ros << "/" << drawer << "/" << channel << strchannel[j]
584  <<"\tSample "<<7-i<<" bits |" << std::setfill('0') << std::setw(2)
585  << shift << "-" << std::setw(2) << shift+7 << std::setfill('0')
586  << "| of 32-bit word "<<3 + nwc*i + wc<<" "<<digits[i]
587  <<" "<<MSG::hex<<word[i]<<MSG::dec << endmsg;
588  }
589  }
590 
591  ++word8bit_cnt;
592 
593  // When word8bit_cnt=4 a set of 32bit words word[0..6] are completed and are saved at a position inside the ROD fragment vector:
594  //
595  // 1st 32 bit word holds : | digit0 pmt3 mod0 | digit0 pmt2 mod0 | digit0 pmt1 mod0 | digit0 pmt0 mod0 |
596  // 2nd 32 bit word holds : | digit0 pmt3 mod1 | digit0 pmt2 mod1 | digit0 pmt1 mod1 | digit0 pmt0 mod1 |
597  // ...
598  // 8th 32 bit word holds : | digit0 pmt3 mod7 | digit0 pmt2 mod7 | digit0 pmt1 mod7 | digit0 pmt0 mod7 |
599  // ...
600  //
601  // word8bit_cnt is reset to 0 and a new set of words[0..6] is restarted.
602  //
603  if ( word8bit_cnt == 4 ) {
604  for ( uint i=0; i<nsamp; ++i ) {
605  v.at( 3 + nwc*i + wc ) = word[i];
606  }
607  ++wc;
608  word8bit_cnt=0;
609  memset(word, 0, sizeof(word));
610  }
611  ++chc;
612  }
613 
614  if ( word8bit_cnt != 0 && wc<nwc ) { // some extra channels
615  ATH_MSG_WARNING( "Unexpected number of channels for TMDB frag 0x40" << wc*4 + word8bit_cnt );
616  for ( uint i=0; i<nsamp; ++i ) {
617  v.at( 3 + nwc*i + wc ) = word[i];
618  }
619  ++wc;
620  word8bit_cnt=0;
621  memset(word, 0 ,sizeof(word));
622  }
623 
624  v.at(savepos)=3+size; // not actually needed - size was already set correctly
625 
626  ATH_MSG_DEBUG( "Check version and counters: "<<MSG::hex<< verfrag <<MSG::dec<<" "<< chc <<" "<< wc << " save in position: " << savepos );
627 
628  // dump fragment
629  //
630  if (msgLvl(MSG::VERBOSE)) {
631  msg(MSG::VERBOSE) << "Check content of ROD fragment after including sub-fragment (0x40)... " << v.size() << endmsg;
632  for (size_t i=0; i<v.size(); ++i)
633  msg(MSG::VERBOSE) << i << "\t" << v.at(i) << MSG::hex << " 0x" << v.at(i) << MSG::dec << endmsg;
634  }
635 
636  return;
637 }

◆ fillRODTileMuRcvObj()

void TileROD_Encoder::fillRODTileMuRcvObj ( std::vector< uint32_t > &  v)

Definition at line 765 of file TileROD_Encoder.cxx.

765  {
766 
767  // this is the subfragment type 0x42
768 
769  ATH_MSG_INFO( "TMDB encoding sub-fragment 0x42: loop over " << m_vTileMuRcvObj.size() << " objects" );
770 
771  // sub-fragment marker
772  //
773  v.push_back(0xff1234ff);
774 
775  // type & version
776  //
777  v.push_back(5);
778  uint savepos = v.size()-1;
779  uint32_t verfrag = 0x500;
780  uint32_t type_version = (0x42 << 16) + verfrag;
781  v.push_back(type_version);
782 
783  // counters and temporary words
784  //
785  int wc = 0;
786  int chc= 0;
787  uint32_t result1 = 0x0;
788  uint32_t result2 = 0x0;
789  uint32_t result3 = 0x0;
790 
791  switch (m_runPeriod) {
792 
793  case 2:// RUN2
794 
795  msg(MSG::INFO) << "Going trough RUN2 encoding procedure for TMDB data" << endmsg;
796 
797  for (const TileMuonReceiverObj* tmurcv : m_vTileMuRcvObj) {
798 
799  // VERSION RUN2: results are hold in 3 16-bit words. Two 32 bit words.
800  //
801  // 32nd bit -> | results2 || results1 | <- 1st bit
802  // | 0x0 || results3 |
803  //
804  // 32nd bit -> | m-5 | m-4 | m-3 | m-2 || m-2 | m-1 | m-0 | 0x0 | <- 1st bit
805  // | 0x0 || 0x0 | m-7 | m-6 | m-5 |
806  //
807  // each 4 bit word is
808  //
809  // 0 1 2 3 <-- in Obj
810  // | d56h | d56l | d6h | d6l |
811  // bit3 bit2 bit1 bit0
812  //
813 
814  int modid = tmurcv->identify() & 0xff;
815 
816  const std::vector<bool> & slin = tmurcv->GetDecision();
817  int imax = std::min((int)slin.size(),4);
818  uint32_t word4b = 0x0;
819  for (int i=0;i<imax;++i){
820  if (slin[i]) word4b |= 1 << (3-i);
821  }
822 
823  if (msgLvl(MSG::INFO)) {
824  std::stringstream ss;
825  for (const bool val : slin) {
826  ss<<std::setw(2)<<val;
827  }
828  msg(MSG::INFO) << "Result for module: "<<modid<<" in TMDB board "<<modid%8<<MSG::hex<<": 0x"<<word4b<<MSG::dec<<" from "<<ss.str() << endmsg;
829  }
830 
831  switch (modid%8) {
832  case 0: result1 |= word4b << 4 ; break;
833  case 1: result1 |= word4b << 8 ; break;
834  case 2: result1 |= word4b << 12 ; result2 |= word4b; break;
835  case 3: result2 |= word4b << 4 ; break;
836  case 4: result2 |= word4b << 8 ; break;
837  case 5: result2 |= word4b << 12 ; result3 |= word4b; break;
838  case 6: result3 |= word4b << 4 ; break;
839  case 7: result3 |= word4b << 8 ; break;
840  }
841  ++chc;
842  }
843 
844  ATH_MSG_INFO( "Summary : "<<MSG::hex<<" Results 1: 0x"<<result1<<" Results 2: 0x"<<result2<<" Results 3: 0x"<<result3<< MSG::dec );
845 
846  v.push_back( result1 | (result2 << 16) ); ++wc;// | 5 4 3 2 | 2 1 0 - |
847  v.push_back( result3 ); ++wc; // | - - - - | - 7 6 5 | '-' means free/not set/0x0
848  v.at(savepos)=3+wc;
849 
850  break;
851 
852  case 3:// RUN3
853 
854  msg(MSG::INFO) << "Going trough RUN3 encoding procedure for TMDB data" << endmsg;
855 
856  for (const TileMuonReceiverObj* tmurcv : m_vTileMuRcvObj) {
857  // VERSION RUN3: results are hold in two 32-bit word to cover a TMDB board holding 8 TileCal modules.
858  //
859  // 32nd bit -> | results2 [16:31] || results1 [0:15] | <- 1st bit
860  // 32nd bit -> | 0x0 [16:31] || results3 [0:15] | <- 1st bit
861  //
862  // 32nd bit -> | 0x0 [12:15] | m-5 | m-4 | m-3 | m-2 || 0x0 [12:15] | m-3 | m-2 | m-1 | m-0 | <- 1st bit
863  // | 0x0 [16:31] || 0x0 [12:15] | m-7 | m-6 | m-5 | m-4 |
864  //
865  // For each module m-X there is a 3-bit word with the result for a threshold
866  //
867  // | d5+d6 | d6 | d5 |
868  // | bit2 | bit1 | bit0 |
869  //
870 
871  // counters and temporary words
872  //
873 
874 /*
875  *
876  * Comment on implementation...
877  * In Athena the container size is kept to 4. It is fully used for run2 but for run3 the first position is left empty.
878  * The most significative bit is placed in first position [0] of a container so the position reverse while encoding.
879  *
880  * */
881 
882  int modid = tmurcv->identify() & 0xff;
883  const std::vector<bool> & slin = tmurcv->GetDecision();
884  int imax = std::min((int)slin.size(),4);
885  uint32_t word3b = 0x0;
886  for (int i=1;i<imax;++i) {
887  // slin d56 d6 d5
888  // word3b bit2 bit1 bit0
889  // bit 4 is always 0 since iteration starts at 1
890  if (slin[i]) word3b |= 1 << (3-i);
891  }
892 
893  switch (modid%8) {
894  case 0: result1 |= word3b ; break;
895  case 1: result1 |= word3b << 3 ; break;
896  case 2: result1 |= word3b << 6 ; result2 |= word3b ; break;
897  case 3: result1 |= word3b << 9 ; result2 |= word3b << 3 ; break;
898  case 4: result2 |= word3b << 6 ; result3 |= word3b ; break;
899  case 5: result2 |= word3b << 9 ; result3 |= word3b << 3 ; break;
900  case 6: result3 |= word3b << 6 ; break;
901  case 7: result3 |= word3b << 9 ; break;
902  }
903  ++chc;
904  }
905 
906  ATH_MSG_INFO( "Summary : "<<MSG::hex<<" Results 1: 0x"<<result1<<" Results 2: 0x"<<result2<<" Results 3: 0x"<<result3<< MSG::dec );
907 
908  v.push_back( result1 | (result2 << 16) ); ++wc;
909  v.push_back( result3 ); ++wc;
910  v.at(savepos) = 3+wc;
911 
912  break;
913 
914  case 0://not defined
915  ATH_MSG_INFO("Tile Muon Decision Board (TMDB) fragment versions are only available for RUN2 and RUN3");
916  break;
917  }
918  if (msgLvl(MSG::INFO)){
919  msg(MSG::INFO) << "Check version and counters: "<<MSG::hex<<verfrag<<MSG::dec<<" "<<chc<<" "<<wc<<" save in position: "<<savepos<<endmsg;
920  msg(MSG::INFO) << "Check content of ROD fragment after including sub-fragment (0x42)... " << v.size() << endmsg;
921  for (size_t i=0; i<v.size(); ++i) {
922  msg(MSG::INFO) << i << "\t" << v.at(i) << MSG::hex << " 0x" << v.at(i) << MSG::dec << endmsg;
923  }
924  }
925  return;
926 }

◆ fillRODTileMuRcvRawChannel()

void TileROD_Encoder::fillRODTileMuRcvRawChannel ( std::vector< uint32_t > &  v)

Definition at line 641 of file TileROD_Encoder.cxx.

641  {
642 
643  ATH_MSG_DEBUG( "TMDB encoding sub-fragment 0x41: loop over " << m_vTileRC.size() << " objects" );
644 
645  const float TMDB_AMPLITUDE_FACTOR = 1.0;
646 
647  // sub-fragment marker
648  //
649  v.push_back(0xff1234ff);
650 
651  // sub-fragment size
652  //
653  v.push_back(3);
654  uint savepos=v.size()-1;
655 
656  // type & version: the version is a 16-bit number and is set by fixing the 3th hexadecimal digit (8-12 in bits) to 5 and leaving all other free
657  //
658  uint32_t verfrag = 0x500;
659  // FIXME: for the moment (July 2015) we use 32-bit packing only, so we hide 16-bit version under ifdef
660  // if we decide to use 16-bit version, additional flag for encoder should be passed from top-level algorithm
661 #ifdef ALLOW16BIT
662  if (use_16bit_packing) verfrag += 2;
663  int32_t word16 = 0x0;
664 #endif
665  uint32_t type_version = (0x41 << 16) + verfrag;
666  v.push_back(type_version);
667 
668  // counters and temporary words
669  //
670  int wc = 0;
671  int chc = 0;
672  uint32_t word = 0x0;
673 
674  for (const TileFastRawChannel* rc : m_vTileRC) {
675 
676  // energies of individual pmts 2 words per module | d5r(16) | d5l(17) |
677  // | d6r(37) | d6l(38) |
678  //
679  float f_amp = rc -> amplitude();
680  int32_t i_amp = lround(f_amp*TMDB_AMPLITUDE_FACTOR) ;
681 
682  // FIXME: for the moment (July 2015) we use 32-bit packing only, so we hide 16-bit version under ifdef
683 #ifdef ALLOW16BIT
684  switch (verfrag){
685  case 0x502:
686  // 2's complement (binary conversion for negative numbers)
687  // x in R and bin_x the binary conversion of x ; (if x<0) then bin_x = 0xffff - abs(x) + 1 (else) bin_x = abs(x)
688  //
689  // v0 : - Feb'15: each 32-bit words holds a cell of a module 16-bit for left side PMT 16 bit for right side pmt
690  //
691  // 1st 32 bit word holds : | d5r m0 | d5l m0 |
692  // 2nd 32 bit word holds : | d6r m0 | d6l m0 |
693  // ...
694  // 7th 32 bit word holds : | d5r m3 | d5l m3 |
695  // 8th 32 bit word holds : | d6r m3 | d6l m3 |
696  // ...
697  // - While reading the FPGA it was noticed a longer word coming out larger that 16-bit
698  // - Keep this (for now) just for history but it may be that later we understand better the FPGA output
699  //
700  //limit to the range of 16-bit integer
701  if (i_amp>0x7FFF) word16 = 0x7FFF;
702  else if (i_amp<-0x8000) word16 = -0x8000;
703  else word16 = i_amp;
704 
705  if (chc&1) {
706  word |= word16 << 16;
707  v.push_back(word);
708  ++wc;
709  } else {
710  word = word16 & 0xFFFF;
711  }
712  break;
713 
714  //case 0x500:
715  default:
716 #else
717  {
718 #endif
719  // vMay'15 current version each 32-bit word is a channel
720  word = (uint32_t)i_amp;
721  v.push_back(word);
722  ++wc;
723  }
724 
725  if (msgLvl(MSG::DEBUG)) {
726  int frag_id = rc->frag();
727  int drawer = (frag_id&0xFF);
728  int ros = frag_id>>8;
729  int channel = rc->channel();
730  const char * strchannel[5] = {" d5L "," d5R "," d6L "," d6R ", " xxx "};
731  int j=std::min(channel,4);
732  if (ros<3) j=4;
733  msg(MSG::DEBUG) << ros << "/" << drawer << "/" << channel << strchannel[j]
734  <<"\tAmp " << f_amp << " " << i_amp << " "
735  <<" ch cnt " << chc << " word cnt " << wc
736  << " word 0x" <<MSG::hex<< word <<MSG::dec<<endmsg;
737  }
738 
739  ++chc;
740  }
741 
742  // FIXME: for the moment (July 2015) we use 32-bit packing only, so we hide 16-bit version under ifdef
743 #ifdef ALLOW16BIT
744  if (verfrag==0x502 && wc*2 != chc) { // odd number of channels for 16-bit frags
745  v.push_back(word); // saving last channel
746  ++wc;
747  }
748 #endif
749 
750  v.at(savepos)=3+wc;
751 
752  ATH_MSG_DEBUG("Check version and counters: "<<MSG::hex<< verfrag <<MSG::dec<<" "<< chc <<" "<< wc <<" save in position: "<< savepos );
753 
754  if (msgLvl(MSG::VERBOSE)) {
755  msg(MSG::VERBOSE) << "Check content of ROD fragment after including sub-fragment (0x41)... "<< m_vTileRC.size() <<" "<< v.size() << endmsg;
756  for (size_t i=0; i<v.size(); ++i) {
757  msg(MSG::VERBOSE) << i <<"\t"<< v.at(i) << MSG::hex << " 0x" << v.at(i) << MSG::dec << endmsg;
758  }
759  }
760  return;
761 }

◆ 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 }

◆ setBit()

void TileROD_Encoder::setBit ( uint32_t *  p,
int  chan 
)
private

set the bitmap for a channel

Definition at line 932 of file TileROD_Encoder.cxx.

932  {
933 // chan = (0,47)
934  int a = chan / 32;
935  int r = chan % 32;
936 // a = (0,1), r = ( 0, 31 )
937  *(p + a) |= (1 << r);
938  return;
939 }

◆ 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 }

◆ setMaxChannels()

void TileROD_Encoder::setMaxChannels ( int  maxChannels)

set maximum number of channels in a drawer

Definition at line 105 of file TileROD_Encoder.cxx.

105  {
106  m_maxChannels = maxChannels;
107 }

◆ setTileHWID() [1/2]

void TileROD_Encoder::setTileHWID ( const TileHWID tileHWID,
bool  verbose,
unsigned int  type = 4 
)

set all necessary parameters for the encoder

Definition at line 36 of file TileROD_Encoder.cxx.

36  {
37  m_tileHWID = tileHWID;
39  m_type = type;
40  m_unitType = (m_type << 16);
41 
42  switch (type) {
43  case 4:
45  break;
46  case 5:
48  break;
49  case 3:
51  break;
52  case 2:
54  break;
55  default:
56  break;
57  }
58 }

◆ setTileHWID() [2/2]

void TileROD_Encoder::setTileHWID ( const TileHWID tileHWID,
int  m_runPeriod 
)

Definition at line 60 of file TileROD_Encoder.cxx.

60  {
61  m_tileHWID = tileHWID;
62  m_runPeriod = runPeriod;
63 }

◆ setTypeAndUnit()

void TileROD_Encoder::setTypeAndUnit ( TileFragHash::TYPE  type,
TileRawChannelUnit::UNIT  unit 
)

set OF algorigtm type and amplitude units for a drawer

Definition at line 65 of file TileROD_Encoder.cxx.

65  {
66 
67  unsigned int OFType = (unsigned int) type;
68  if (OFType > 7) {
69  OFType = 0;
70  ATH_MSG_ERROR( "setTypeAndUnit Incorrect raw data type =" << type
71  << " using type=0 instead " );
72  }
73 
74  unsigned int rChUnit = (unsigned int) unit % (unsigned int) TileRawChannelUnit::OnlineOffset;
75  if (rChUnit > 3) {
76  rChUnit = 0;
77  ATH_MSG_ERROR( "setTypeAndUnit Incorrect raw data unit =" << unit
78  << " assuming ADC counts (0) " );
79  }
80 
81  // make sure that we use frag type 4 for units which are not ADC counts
82  if (rChUnit != 0 && m_type < 4) m_type = 4;
83  if (m_type == 4) { // new fragments have non-zero upper byte
84  // 8 upper bits:
85  // UUPPSTTT
86  // 31,30 - units
87  // 29,28 - pulse type ( = 3 for simulated data)
88  // 27 - 7(=0) or 9(=1) samples (assume 7 samples for now)
89  // 24,25,26 - OF type
90  // next 8 bits - frag type ( 2,3,4, ... )
91  m_unitType = (rChUnit << 30) | (3 << 28) | (0 << 27) | (OFType << 24) | (m_type << 16);
92  m_rChUnit = rChUnit;
93  } else if (m_type == 5) {
94  // 8 upper bits:
95  // UULLLTTT
96  // 31,30 - units
97  // 29,28,27 - length of Level2 part ( = 3 - sumEt, sumEz, sumE )
98  // 24,25,26 - OF type
99  m_unitType = (rChUnit << 30) | (3 << 27) | (OFType << 24) | (m_type << 16);
100  m_rChUnit = rChUnit;
101  }
102 
103 }

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_Digi2bytes

TileDigits2Bytes TileROD_Encoder::m_Digi2bytes
private

Definition at line 132 of file TileROD_Encoder.h.

◆ m_imsg

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

MessageSvc pointer.

Definition at line 135 of file AthMessaging.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_maxChannels

int TileROD_Encoder::m_maxChannels
private

Definition at line 149 of file TileROD_Encoder.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_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_order

TileRawDataOrdering TileROD_Encoder::m_order
private

Definition at line 142 of file TileROD_Encoder.h.

◆ m_rc2bytes2

TileRawChannel2Bytes2 TileROD_Encoder::m_rc2bytes2
private

Definition at line 133 of file TileROD_Encoder.h.

◆ m_rc2bytes3

TileRawChannel2Bytes TileROD_Encoder::m_rc2bytes3
private

Definition at line 134 of file TileROD_Encoder.h.

◆ m_rc2bytes4

TileRawChannel2Bytes4 TileROD_Encoder::m_rc2bytes4
private

Definition at line 135 of file TileROD_Encoder.h.

◆ m_rc2bytes5

TileRawChannel2Bytes5 TileROD_Encoder::m_rc2bytes5
private

Definition at line 136 of file TileROD_Encoder.h.

◆ m_rChUnit

unsigned int TileROD_Encoder::m_rChUnit
private

Definition at line 147 of file TileROD_Encoder.h.

◆ m_runPeriod

int TileROD_Encoder::m_runPeriod
private

Definition at line 150 of file TileROD_Encoder.h.

◆ m_tileHWID

const TileHWID* TileROD_Encoder::m_tileHWID
private

Definition at line 138 of file TileROD_Encoder.h.

◆ m_type

unsigned int TileROD_Encoder::m_type
private

Definition at line 145 of file TileROD_Encoder.h.

◆ m_unitType

unsigned int TileROD_Encoder::m_unitType
private

Definition at line 146 of file TileROD_Encoder.h.

◆ m_verbose

bool TileROD_Encoder::m_verbose
private

Definition at line 144 of file TileROD_Encoder.h.

◆ m_vTileDigi

std::vector<const TileDigits*> TileROD_Encoder::m_vTileDigi
private

Definition at line 128 of file TileROD_Encoder.h.

◆ m_vTileL2

std::vector<const TileL2*> TileROD_Encoder::m_vTileL2
private

Definition at line 127 of file TileROD_Encoder.h.

◆ m_vTileMuRcvObj

std::vector<const TileMuonReceiverObj*> TileROD_Encoder::m_vTileMuRcvObj
private

Definition at line 130 of file TileROD_Encoder.h.

◆ m_vTileRC

std::vector<const TileFastRawChannel*> TileROD_Encoder::m_vTileRC
private

Definition at line 126 of file TileROD_Encoder.h.


The documentation for this class was generated from the following files:
TileROD_Encoder::m_order
TileRawDataOrdering m_order
Definition: TileROD_Encoder.h:142
AthMessaging::m_lvl
std::atomic< MSG::Level > m_lvl
Current logging level.
Definition: AthMessaging.h:138
beamspotman.r
def r
Definition: beamspotman.py:676
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
et
Extra patterns decribing particle interation process.
TileROD_Encoder::fillROD3
void fillROD3(std::vector< uint32_t > &v)
Definition: TileROD_Encoder.cxx:301
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TileRawChannel2Bytes::setVerbose
void setVerbose(bool verbose)
Sets verbose mode true or false.
Definition: TileRawChannel2Bytes.h:64
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileROD_Encoder::dumpROD
void dumpROD(const std::vector< uint32_t > &v)
dump contents of the ROD fragment
Definition: TileROD_Encoder.cxx:951
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
TileROD_Encoder::fillROD4
void fillROD4(std::vector< uint32_t > &v)
Definition: TileROD_Encoder.cxx:383
TileROD_Encoder::fillROD1
void fillROD1(std::vector< uint32_t > &v)
convert all TileDigits in the current list to a vector of 32bit words
Definition: TileROD_Encoder.cxx:471
TileRawChannel2Bytes4::setVerbose
void setVerbose(bool)
Sets verbose mode true or false.
Definition: TileRawChannel2Bytes4.h:91
TileROD_Encoder::m_rc2bytes5
TileRawChannel2Bytes5 m_rc2bytes5
Definition: TileROD_Encoder.h:136
TileHWID::frag
int frag(const HWIdentifier &id) const
extract frag field from HW identifier
Definition: TileHWID.h:181
TileROD_Encoder::m_runPeriod
int m_runPeriod
Definition: TileROD_Encoder.h:150
TileROD_Encoder::setBit
void setBit(uint32_t *p, int chan)
set the bitmap for a channel
Definition: TileROD_Encoder.cxx:932
HWIdentifier
Definition: HWIdentifier.h:13
AthMessaging::m_imsg
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
Definition: AthMessaging.h:135
python.SystemOfUnits.ms
int ms
Definition: SystemOfUnits.py:132
TileDigits2Bytes::getBytes
int getBytes(const TileDigits *digi, const TileHWID *tileHWID, std::vector< unsigned int > &v)
Definition: TileDigits2Bytes.cxx:12
TileROD_Encoder::checkBit
bool checkBit(const uint32_t *p, int chan)
check the bitmap for a channel
Definition: TileROD_Encoder.cxx:942
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
TileROD_Encoder::m_verbose
bool m_verbose
Definition: TileROD_Encoder.h:144
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
TileHWID::ros
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition: TileHWID.h:167
TileRawChannel2Bytes2::getWord
unsigned int getWord(const TileFastRawChannel *rc, int gain)
Returns a single 32-bit word which encodes the TileRawChannel information (gain,amplitude,...
Definition: TileRawChannel2Bytes2.cxx:18
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
AthMessaging::AthMessaging
AthMessaging()
Default constructor:
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
TileROD_Encoder::fillROD5
void fillROD5(std::vector< uint32_t > &v)
Definition: TileROD_Encoder.cxx:498
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthMessaging::msgLvl
bool msgLvl(const MSG::Level lvl) const
Test the output level.
Definition: AthMessaging.h:151
TileROD_Encoder::m_maxChannels
int m_maxChannels
Definition: TileROD_Encoder.h:149
TileROD_Encoder::fillROD10
void fillROD10(std::vector< uint32_t > &v)
convert all TileL2s in the current list to a vector of 32bit words
Definition: TileROD_Encoder.cxx:145
lumiFormat.i
int i
Definition: lumiFormat.py:92
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
TileROD_Encoder::m_type
unsigned int m_type
Definition: TileROD_Encoder.h:145
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TileRawChannelUnit::OnlineOffset
@ OnlineOffset
Definition: TileRawChannelUnit.h:25
TileROD_Encoder::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileROD_Encoder.h:138
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
imax
int imax(int i, int j)
Definition: TileLaserTimingTool.cxx:33
TileROD_Encoder::m_unitType
unsigned int m_unitType
Definition: TileROD_Encoder.h:146
TileROD_Encoder::m_rc2bytes2
TileRawChannel2Bytes2 m_rc2bytes2
Definition: TileROD_Encoder.h:133
AthMessaging::msg
MsgStream & msg() const
The standard message stream.
Definition: AthMessaging.h:164
min
#define min(a, b)
Definition: cfImp.cxx:40
TileRawChannel2Bytes::getBytes
int getBytes(const TileFastRawChannel *rc, int gain, std::vector< short > &v)
Pack TileRawChannel information (gain, amplitude, phase and quality) in 3 16-bit words.
Definition: TileRawChannel2Bytes.cxx:10
head
std::string head(std::string s, const std::string &pattern)
head of a string
Definition: computils.cxx:310
TileROD_Encoder::m_vTileRC
std::vector< const TileFastRawChannel * > m_vTileRC
Definition: TileROD_Encoder.h:126
TileROD_Encoder::m_rChUnit
unsigned int m_rChUnit
Definition: TileROD_Encoder.h:147
TileDigits
Definition: TileDigits.h:30
TileROD_Encoder::m_vTileMuRcvObj
std::vector< const TileMuonReceiverObj * > m_vTileMuRcvObj
Definition: TileROD_Encoder.h:130
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.PyAthena.v
v
Definition: PyAthena.py:157
TileMuonReceiverObj
Definition: TileMuonReceiverObj.h:28
TileRawChannel2Bytes4::getWord
unsigned int getWord(const TileFastRawChannel &rc, unsigned int unit, int gain) const
Returns a single 32-bit word which encodes the TileRawChannel information (gain,amplitude,...
Definition: TileRawChannel2Bytes4.cxx:21
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
TileHWID::drawer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition: TileHWID.h:171
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TileRawChannel2Bytes5::setVerbose
void setVerbose(bool)
Sets verbose mode true or false.
Definition: TileRawChannel2Bytes5.h:103
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition: AmgMatrixBasePlugin.h:20
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileROD_Encoder::m_Digi2bytes
TileDigits2Bytes m_Digi2bytes
Definition: TileROD_Encoder.h:132
AthMessaging::m_nm
std::string m_nm
Message source name.
Definition: AthMessaging.h:129
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
TileROD_Encoder::m_vTileDigi
std::vector< const TileDigits * > m_vTileDigi
Definition: TileROD_Encoder.h:128
AMPLITUDE_FACTOR5_HG
const double AMPLITUDE_FACTOR5_HG[4]
Definition: TileRawChannel2Bytes5.h:33
TileROD_Encoder::fillROD2
void fillROD2(std::vector< uint32_t > &v)
Definition: TileROD_Encoder.cxx:257
TileROD_Encoder::m_rc2bytes3
TileRawChannel2Bytes m_rc2bytes3
Definition: TileROD_Encoder.h:134
TileFastRawChannel
Definition: TileFastRawChannel.h:17
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
AthMessaging::initMessaging
void initMessaging() const
Initialize our message level and MessageSvc.
Definition: AthMessaging.cxx:39
TileCalibUtils::MAX_CHAN
static const unsigned int MAX_CHAN
Number of channels in drawer.
Definition: TileCalibUtils.h:141
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
TileROD_Encoder::m_rc2bytes4
TileRawChannel2Bytes4 m_rc2bytes4
Definition: TileROD_Encoder.h:135
TileROD_Encoder::m_vTileL2
std::vector< const TileL2 * > m_vTileL2
Definition: TileROD_Encoder.h:127
TileRawChannel2Bytes2::setVerbose
void setVerbose(bool verbose)
Sets verbose mode true or false.
Definition: TileRawChannel2Bytes2.h:82
TileL2
Class to store TileMuId and Et quantities computed at the TileCal ROD DSPs.
Definition: TileL2.h:33
TileROD_Encoder::fillROD12
void fillROD12(std::vector< uint32_t > &v)
Definition: TileROD_Encoder.cxx:209
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:350