CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
UHTRpacker Class Reference

#include <PackerHelp.h>

Public Types

typedef std::vector< uint16_t > uhtrData
 
typedef std::map< int, uhtrDataUHTRMap
 

Public Member Functions

void addChannel (int uhtrIndex, edm::SortedCollection< HFDataFrame >::const_iterator &qiedf, const HcalElectronicsMap *readoutMap, int verbosity=0)
 
void addChannel (int uhtrIndex, edm::SortedCollection< HBHEDataFrame >::const_iterator qiedf, const HcalElectronicsMap *readoutMap, int verbosity=0)
 
void addChannel (int uhtrIndex, edm::SortedCollection< HcalTriggerPrimitiveDigi >::const_iterator qiedf, int channelid, int verbosity=0)
 
void addChannel (int uhtrIndex, QIE11DataFrame qiedf, const HcalElectronicsMap *readoutMap, int verbosity=0)
 
void addChannel (int uhtrIndex, QIE10DataFrame qiedf, const HcalElectronicsMap *readoutMap, int verbosity=0)
 
bool exist (int uhtrIndex)
 
void finalizeHeadTail (uhtrData *uhtr, bool verbosity)
 
uhtrDatanewUHTR (int uhtrIndex, int ps=0, int orn=0, int bcn=0, uint64_t evt=0)
 
uint16_t packQIE10header (const HcalElectronicsId &eid)
 
uint16_t packQIE11header (const QIE11DataFrame &qiedf, const HcalElectronicsId &eid)
 
uint16_t packQIE8header (const HcalQIESample &qieSample, const HcalElectronicsId &eid)
 
uint16_t packTPheader (const HcalTriggerPrimitiveSample &tpSample, int channelid)
 
 UHTRpacker ()
 

Public Attributes

UHTRMap uhtrs
 

Static Public Attributes

static const int MASK_BCN = 0xFFF
 
static const int MASK_CRATE_ID = 0xFFFFFF
 
static const int MASK_DATA_LENGTH = 0xFFFFF
 
static const int MASK_EVENT_TYPE = 0xF
 
static const int MASK_EVN = 0xFFFFFF
 
static const int MASK_FILED_BY_AMC13 = 0xFF
 
static const int MASK_FW_FLAVOR = 0xFF
 
static const int MASK_FW_VERSION = 0xFFFF
 
static const int MASK_ORN = 0xFFFF
 
static const int MASK_PAYLOAD_FORMAT = 0xF
 
static const int MASK_PRESAMPLES = 0xF
 
static const int MASK_SLOT_ID = 0xF
 
static const int OFFSET_BCN = 20
 
static const int OFFSET_CRATE_ID = 0
 
static const int OFFSET_DATA_LENGTH = 0
 
static const int OFFSET_EVENT_TYPE = 40
 
static const int OFFSET_EVN = 32
 
static const int OFFSET_FILED_BY_AMC13 = 56
 
static const int OFFSET_FW_FLAVOR = 32
 
static const int OFFSET_FW_VERSION = 48
 
static const int OFFSET_ORN = 16
 
static const int OFFSET_PAYLOAD_FORMAT = 44
 
static const int OFFSET_PRESAMPLES = 12
 
static const int OFFSET_SLOT_ID = 8
 

Detailed Description

Definition at line 292 of file PackerHelp.h.

Member Typedef Documentation

typedef std::vector<uint16_t> UHTRpacker::uhtrData

Definition at line 296 of file PackerHelp.h.

typedef std::map<int,uhtrData> UHTRpacker::UHTRMap

Definition at line 297 of file PackerHelp.h.

Constructor & Destructor Documentation

UHTRpacker::UHTRpacker ( )
inline

Definition at line 328 of file PackerHelp.h.

328 {}

Member Function Documentation

void UHTRpacker::addChannel ( int  uhtrIndex,
edm::SortedCollection< HFDataFrame >::const_iterator &  qiedf,
const HcalElectronicsMap readoutMap,
int  verbosity = 0 
)
inline

Definition at line 462 of file PackerHelp.h.

References runTauDisplay::eid, RecoTauValidation_cfi::header, HcalElectronicsMap::lookup(), edm::SortedCollection< T, SORT >::push_back(), and edm::SortedCollection< T, SORT >::size().

Referenced by HcalDigiToRawuHTR::produce().

462  {
463  if( qiedf->size() == 0 ) return;
464  DetId detid = qiedf->id();
465  HcalElectronicsId eid(readoutMap->lookup(detid));
466  uint16_t header = packQIE8header(qiedf->sample(0), eid);
467  uhtrs[uhtrIndex].push_back(header);
468  // loop over words in dataframe
469  for(int iTS = 0; iTS < qiedf->size(); iTS +=2 ){
470  uint16_t cont =0;
471  int adc0 = qiedf->sample(iTS).adc();
472  int adc1 = qiedf->sample(iTS+1).adc();
473  cont |= adc0&0xFF;
474  cont |= (adc1&0xFF)<<8;
475  uhtrs[uhtrIndex].push_back(cont);
476  }// end loop over dataframe words
477  };
uint16_t packQIE8header(const HcalQIESample &qieSample, const HcalElectronicsId &eid)
Definition: PackerHelp.h:334
UHTRMap uhtrs
Definition: PackerHelp.h:299
Definition: DetId.h:18
size_type size() const
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void UHTRpacker::addChannel ( int  uhtrIndex,
edm::SortedCollection< HBHEDataFrame >::const_iterator  qiedf,
const HcalElectronicsMap readoutMap,
int  verbosity = 0 
)
inline

Definition at line 479 of file PackerHelp.h.

References runTauDisplay::eid, RecoTauValidation_cfi::header, HcalElectronicsMap::lookup(), edm::SortedCollection< T, SORT >::push_back(), and edm::SortedCollection< T, SORT >::size().

479  {
480  if( qiedf->size() == 0 ) return;
481  DetId detid = qiedf->id();
482  HcalElectronicsId eid(readoutMap->lookup(detid));
483  uint16_t header = packQIE8header(qiedf->sample(0), eid);
484  uhtrs[uhtrIndex].push_back(header);
485  // loop over words in dataframe
486  for(int iTS = 0; iTS < qiedf->size(); iTS +=2 ){
487  uint16_t cont =0;
488  int adc0 = qiedf->sample(iTS).adc();
489  int adc1 = qiedf->sample(iTS+1).adc();
490  cont |= adc0&0xFF;
491  cont |= (adc1&0xFF)<<8;
492  uhtrs[uhtrIndex].push_back(cont);
493  }// end loop over dataframe words
494  };
uint16_t packQIE8header(const HcalQIESample &qieSample, const HcalElectronicsId &eid)
Definition: PackerHelp.h:334
UHTRMap uhtrs
Definition: PackerHelp.h:299
Definition: DetId.h:18
size_type size() const
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void UHTRpacker::addChannel ( int  uhtrIndex,
edm::SortedCollection< HcalTriggerPrimitiveDigi >::const_iterator  qiedf,
int  channelid,
int  verbosity = 0 
)
inline

Definition at line 496 of file PackerHelp.h.

References RecoTauValidation_cfi::header, and edm::SortedCollection< T, SORT >::size().

496  {
497  if( qiedf->size() ==0 ) return;
498  uint16_t header = packTPheader(qiedf->sample(0), channelid);
499  uhtrs[uhtrIndex].push_back(header);
500  // loop over words in dataframe
501  for( int iTS = 0 ; iTS < qiedf->size() ; iTS++ ){
502  // push data into uhtr data container
503  uhtrs[uhtrIndex].push_back(qiedf->sample(iTS).raw());
504  }// end loop over dataframe words
505  };
uint16_t packTPheader(const HcalTriggerPrimitiveSample &tpSample, int channelid)
Definition: PackerHelp.h:352
UHTRMap uhtrs
Definition: PackerHelp.h:299
size_type size() const
void UHTRpacker::addChannel ( int  uhtrIndex,
QIE11DataFrame  qiedf,
const HcalElectronicsMap readoutMap,
int  verbosity = 0 
)
inline

Definition at line 507 of file PackerHelp.h.

References QIE11DataFrame::begin(), QIE11DataFrame::detid(), runTauDisplay::eid, QIE11DataFrame::end(), QIE11DataFrame::FLAG_WORDS, RecoTauValidation_cfi::header, QIE11DataFrame::HEADER_WORDS, and HcalElectronicsMap::lookup().

507  {
508  DetId detid = qiedf.detid();
509  HcalElectronicsId eid(readoutMap->lookup(detid));
510  // loop over words in dataframe
511  for(edm::DataFrame::iterator dfi=qiedf.begin() ; dfi!=qiedf.end(); ++dfi){
512  if( dfi >= qiedf.end()-QIE11DataFrame::FLAG_WORDS ){
513  continue;
514  }
515  if( dfi == qiedf.begin() && QIE11DataFrame::HEADER_WORDS == 1 ){
516  uint16_t header = packQIE11header(qiedf, eid);
517  uhtrs[uhtrIndex].push_back(header);
518  continue;
519  }
520  // push data into uhtr data container
521  uhtrs[uhtrIndex].push_back(dfi[0]);
522  }// end loop over dataframe words
523  };
DetId detid() const
Get the detector id.
static const int FLAG_WORDS
static const int HEADER_WORDS
uint16_t packQIE11header(const QIE11DataFrame &qiedf, const HcalElectronicsId &eid)
Definition: PackerHelp.h:381
UHTRMap uhtrs
Definition: PackerHelp.h:299
Definition: DetId.h:18
data_type * iterator
Definition: DataFrame.h:21
edm::DataFrame::iterator begin()
iterators
edm::DataFrame::iterator end()
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
void UHTRpacker::addChannel ( int  uhtrIndex,
QIE10DataFrame  qiedf,
const HcalElectronicsMap readoutMap,
int  verbosity = 0 
)
inline

Definition at line 525 of file PackerHelp.h.

References QIE10DataFrame::begin(), QIE10DataFrame::detid(), runTauDisplay::eid, QIE10DataFrame::end(), QIE10DataFrame::FLAG_WORDS, RecoTauValidation_cfi::header, QIE10DataFrame::HEADER_WORDS, and HcalElectronicsMap::lookup().

525  {
526  DetId detid = qiedf.detid();
527  HcalElectronicsId eid(readoutMap->lookup(detid));
528  // loop over words in dataframe
529  for(edm::DataFrame::iterator dfi=qiedf.begin() ; dfi!=qiedf.end(); ++dfi){
530  if( dfi >= qiedf.end()-QIE10DataFrame::FLAG_WORDS ){
531  continue;
532  }
533  if( dfi == qiedf.begin() && QIE10DataFrame::HEADER_WORDS == 1 ){
534  uint16_t header = packQIE10header(eid);
535  uhtrs[uhtrIndex].push_back(header);
536  continue;
537  }
538  // push data into uhtr data container
539  uhtrs[uhtrIndex].push_back(dfi[0]);
540  }// end loop over dataframe words
541  };
edm::DataFrame::iterator begin()
iterators
uint16_t packQIE10header(const HcalElectronicsId &eid)
Definition: PackerHelp.h:364
DetId detid() const
Get the detector id.
edm::DataFrame::iterator end()
UHTRMap uhtrs
Definition: PackerHelp.h:299
Definition: DetId.h:18
static const int FLAG_WORDS
static const int HEADER_WORDS
data_type * iterator
Definition: DataFrame.h:21
Readout chain identification for Hcal.
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool UHTRpacker::exist ( int  uhtrIndex)
inline

Definition at line 330 of file PackerHelp.h.

Referenced by HcalDigiToRawuHTR::produce().

330  {
331  return uhtrs.count(uhtrIndex) != 0 ;
332  };
UHTRMap uhtrs
Definition: PackerHelp.h:299
void UHTRpacker::finalizeHeadTail ( uhtrData uhtr,
bool  verbosity 
)
inline

Definition at line 439 of file PackerHelp.h.

References pfDeepCMVAJetTags_cfi::toAdd.

Referenced by HcalDigiToRawuHTR::produce().

439  {
440 
441  uint64_t uhtr_size = uhtr->size()-8;
442 
443  // adjust the size bits
444  uhtr->at(0) = uhtr_size&0xFFFF ;
445  uhtr->at(1) |= (uhtr_size>>16)&0xF ;
446 
447  unsigned int toAdd = 4-uhtr->size()%4;
448  for(unsigned int ia=0; ia<toAdd; ia++){
449  uhtr->push_back(0xD07F);
450  }
451 
452  // add trailer
453  uhtr->push_back( uhtr_size&0xFFFF );
454  uhtr->push_back( (uhtr_size>>16)&0xF );
455  // this is ignoring the event number... I am not sure what this should be
456 
457  // adding some blank stuff for the CRC bits
458  uhtr->push_back( 0 );
459  uhtr->push_back( 0 );
460  };
unsigned long long uint64_t
Definition: Time.h:15
uhtrData* UHTRpacker::newUHTR ( int  uhtrIndex,
int  ps = 0,
int  orn = 0,
int  bcn = 0,
uint64_t  evt = 0 
)
inline

Definition at line 398 of file PackerHelp.h.

References hgcalDigitizer_cfi::fwVersion, mps_fire::i, AMCHeaderSpec::MASK_CRATE_ID, AMC13HeaderSpec::MASK_ORN, AMCHeaderSpec::MASK_PRESAMPLES, AMCHeaderSpec::MASK_SLOT_ID, hpstanc_transforms::max, and hcalTTPDigis_cfi::presamples.

Referenced by HcalDigiToRawuHTR::produce().

398  {
399 
400  // initialize vector of 16-bit words
401  uhtrs[uhtrIndex] = uhtrData(8);
402  // build header -- some information will be updated at the end
403 
404  uint64_t presamples = std::max(ps,0);
405  uint64_t uhtrCrate = uhtrIndex&0xFF;
406  uint64_t uhtrSlot = (uhtrIndex&0xF00)>>8;
407 // From Jeremy:
408 // Set the firmware to zero, the firmware flavor to 0, the payload format to 1, and the event type to 1.
409  uint64_t fwFlavor = 0;
410  uint64_t eventType = 1;
411  uint64_t payloadFormat = 1;
412  uint64_t fwVersion = 0;
413 
414  uint64_t uhtrHeader1 = 0;
415  uhtrHeader1 |= (uint64_t(0x0)&MASK_DATA_LENGTH)<<OFFSET_DATA_LENGTH;
416  uhtrHeader1 |= (bcn&MASK_BCN)<<OFFSET_BCN;
417  uhtrHeader1 |= (evt&MASK_EVN)<<OFFSET_EVN;
418  uhtrHeader1 |= (uint64_t(0x0)&MASK_FILED_BY_AMC13)<<OFFSET_FILED_BY_AMC13;
419 
420  uint64_t uhtrHeader2 = 0;
421  uhtrHeader2 |= (uhtrCrate&MASK_CRATE_ID)<<OFFSET_CRATE_ID;
422  uhtrHeader2 |= (uhtrSlot&MASK_SLOT_ID)<<OFFSET_SLOT_ID;
423  uhtrHeader2 |= (presamples&MASK_PRESAMPLES)<<OFFSET_PRESAMPLES;
424  uhtrHeader2 |= (orn&MASK_ORN)<<OFFSET_ORN;
425  uhtrHeader2 |= (fwFlavor&MASK_FW_FLAVOR)<<OFFSET_FW_FLAVOR;
426  uhtrHeader2 |= (eventType&MASK_EVENT_TYPE)<<OFFSET_EVENT_TYPE;
427  uhtrHeader2 |= (payloadFormat&MASK_PAYLOAD_FORMAT)<<OFFSET_PAYLOAD_FORMAT;
428  uhtrHeader2 |= (fwVersion&MASK_FW_VERSION)<<OFFSET_FW_VERSION;
429 
430  // push header into vector of 16-bit words
431  for (unsigned int i = 0; i< 4; ++i){
432  uhtrs[uhtrIndex][i] = ( uhtrHeader1>>(i*16) )&0xFFFF ;
433  uhtrs[uhtrIndex][i+4] = ( uhtrHeader2>>(i*16) )&0xFFFF ;
434  }
435 
436  return &(uhtrs[uhtrIndex]);
437  };
static const int OFFSET_PRESAMPLES
Definition: PackerHelp.h:315
static const int OFFSET_ORN
Definition: PackerHelp.h:317
static const int OFFSET_PAYLOAD_FORMAT
Definition: PackerHelp.h:323
static const int MASK_ORN
Definition: PackerHelp.h:318
static const int OFFSET_EVENT_TYPE
Definition: PackerHelp.h:321
static const int MASK_SLOT_ID
Definition: PackerHelp.h:314
static const int OFFSET_FILED_BY_AMC13
Definition: PackerHelp.h:308
static const int MASK_FW_VERSION
Definition: PackerHelp.h:326
static const int OFFSET_CRATE_ID
Definition: PackerHelp.h:311
static const int MASK_PRESAMPLES
Definition: PackerHelp.h:316
std::vector< uint16_t > uhtrData
Definition: PackerHelp.h:296
static const int OFFSET_FW_FLAVOR
Definition: PackerHelp.h:319
static const int MASK_PAYLOAD_FORMAT
Definition: PackerHelp.h:324
static const int MASK_EVN
Definition: PackerHelp.h:307
static const int OFFSET_FW_VERSION
Definition: PackerHelp.h:325
UHTRMap uhtrs
Definition: PackerHelp.h:299
unsigned long long uint64_t
Definition: Time.h:15
static const int MASK_BCN
Definition: PackerHelp.h:305
static const int OFFSET_SLOT_ID
Definition: PackerHelp.h:313
static const int MASK_FILED_BY_AMC13
Definition: PackerHelp.h:309
static const int OFFSET_EVN
Definition: PackerHelp.h:306
static const int OFFSET_BCN
Definition: PackerHelp.h:304
static const int OFFSET_DATA_LENGTH
Definition: PackerHelp.h:302
static const int MASK_EVENT_TYPE
Definition: PackerHelp.h:322
static const int MASK_FW_FLAVOR
Definition: PackerHelp.h:320
static const int MASK_CRATE_ID
Definition: PackerHelp.h:312
static const int MASK_DATA_LENGTH
Definition: PackerHelp.h:303
uint16_t UHTRpacker::packQIE10header ( const HcalElectronicsId eid)
inline

Definition at line 364 of file PackerHelp.h.

References HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), RecoTauValidation_cfi::header, QIE10HeaderSpec::MASK_FIBER, QIE10HeaderSpec::MASK_FIBERCHAN, QIE10HeaderSpec::MASK_FLAVOR, QIE10HeaderSpec::MASK_HEADER_BIT, QIE10HeaderSpec::MASK_LE, QIE10HeaderSpec::MASK_MP, QIE10HeaderSpec::MASK_RESERV, QIE10HeaderSpec::OFFSET_FIBER, QIE10HeaderSpec::OFFSET_FIBERCHAN, QIE10HeaderSpec::OFFSET_FLAVOR, QIE10HeaderSpec::OFFSET_HEADER_BIT, QIE10HeaderSpec::OFFSET_LE, QIE10HeaderSpec::OFFSET_MP, and QIE10HeaderSpec::OFFSET_RESERV.

364  {
365  uint16_t header =0;
366 
367  int fiber = eid.fiberIndex();
368  int fiberchan = eid.fiberChanId();
369 
377 
378  return header;
379  }
static const int OFFSET_FLAVOR
Definition: PackerHelp.h:109
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
static const int MASK_RESERV
Definition: PackerHelp.h:106
static const int OFFSET_HEADER_BIT
Definition: PackerHelp.h:111
static const int MASK_MP
Definition: PackerHelp.h:104
static const int MASK_FIBER
Definition: PackerHelp.h:102
static const int MASK_FIBERCHAN
Definition: PackerHelp.h:100
static const int OFFSET_LE
Definition: PackerHelp.h:107
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
static const int OFFSET_RESERV
Definition: PackerHelp.h:105
static const int MASK_HEADER_BIT
Definition: PackerHelp.h:112
static const int MASK_LE
Definition: PackerHelp.h:108
static const int OFFSET_MP
Definition: PackerHelp.h:103
static const int MASK_FLAVOR
Definition: PackerHelp.h:110
static const int OFFSET_FIBERCHAN
Definition: PackerHelp.h:99
static const int OFFSET_FIBER
Definition: PackerHelp.h:101
uint16_t UHTRpacker::packQIE11header ( const QIE11DataFrame qiedf,
const HcalElectronicsId eid 
)
inline

Definition at line 381 of file PackerHelp.h.

References HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), RecoTauValidation_cfi::header, QIE11HeaderSpec::MASK_CAPID, QIE11HeaderSpec::MASK_FIBER, QIE11HeaderSpec::MASK_FIBERCHAN, QIE11HeaderSpec::MASK_FIBERERR, QIE11HeaderSpec::MASK_FLAVOR, QIE11HeaderSpec::MASK_HEADER_BIT, QIE8HeaderSpec::OFFSET_CAPID, QIE11HeaderSpec::OFFSET_FIBER, QIE11HeaderSpec::OFFSET_FIBERCHAN, QIE8HeaderSpec::OFFSET_FIBERERR, QIE11HeaderSpec::OFFSET_FLAVOR, QIE11HeaderSpec::OFFSET_HEADER_BIT, and QIE11DataFrame::samples().

381  {
382  uint16_t header =0;
383 
384  int fiber = eid.fiberIndex();
385  int fiberchan = eid.fiberChanId();
386  int capid0 = qiedf.samples() == 0? 0 : qiedf[0].capid(); // capacitor id for the first sample
387 
394 
395  return header;
396  }
static const int MASK_CAPID
Definition: PackerHelp.h:121
static const int MASK_FIBERERR
Definition: PackerHelp.h:123
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
static const int MASK_FIBER
Definition: PackerHelp.h:119
static const int MASK_FLAVOR
Definition: PackerHelp.h:125
static const int MASK_HEADER_BIT
Definition: PackerHelp.h:127
static const int OFFSET_FIBER
Definition: PackerHelp.h:118
static const int MASK_FIBERCHAN
Definition: PackerHelp.h:117
static const int OFFSET_HEADER_BIT
Definition: PackerHelp.h:126
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
static const int OFFSET_FIBERCHAN
Definition: PackerHelp.h:116
static const int OFFSET_FLAVOR
Definition: PackerHelp.h:124
static const int OFFSET_CAPID
Definition: PackerHelp.h:88
static const int OFFSET_FIBERERR
Definition: PackerHelp.h:90
int samples() const
total number of samples in the digi
uint16_t UHTRpacker::packQIE8header ( const HcalQIESample qieSample,
const HcalElectronicsId eid 
)
inline

Definition at line 334 of file PackerHelp.h.

References HcalQIESample::capid(), HcalQIESample::er(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), RecoTauValidation_cfi::header, QIE8HeaderSpec::MASK_CAPID, QIE8HeaderSpec::MASK_FIBER, QIE8HeaderSpec::MASK_FIBERCHAN, QIE8HeaderSpec::MASK_FIBERERR, QIE8HeaderSpec::MASK_FLAVOR, QIE8HeaderSpec::MASK_HEADER_BIT, QIE8HeaderSpec::OFFSET_CAPID, QIE8HeaderSpec::OFFSET_FIBER, QIE8HeaderSpec::OFFSET_FIBERCHAN, QIE8HeaderSpec::OFFSET_FIBERERR, QIE8HeaderSpec::OFFSET_FLAVOR, and QIE8HeaderSpec::OFFSET_HEADER_BIT.

334  {
335  uint16_t header =0;
336 
337  int fiber = eid.fiberIndex()+1;
338  int fiberchan = eid.fiberChanId();
339  int fiberErr = qieSample.er();
340  int capid0 = qieSample.capid();
341 
348 
349  return header;
350  }
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
static const int MASK_HEADER_BIT
Definition: PackerHelp.h:95
static const int MASK_FIBER
Definition: PackerHelp.h:87
static const int OFFSET_FIBER
Definition: PackerHelp.h:86
static const int MASK_FIBERERR
Definition: PackerHelp.h:91
static const int MASK_FLAVOR
Definition: PackerHelp.h:93
static const int MASK_CAPID
Definition: PackerHelp.h:89
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
static const int OFFSET_FLAVOR
Definition: PackerHelp.h:92
int capid() const
get the Capacitor id
Definition: HcalQIESample.h:26
static const int OFFSET_HEADER_BIT
Definition: PackerHelp.h:94
static const int OFFSET_FIBERCHAN
Definition: PackerHelp.h:84
static const int OFFSET_CAPID
Definition: PackerHelp.h:88
static const int OFFSET_FIBERERR
Definition: PackerHelp.h:90
static const int MASK_FIBERCHAN
Definition: PackerHelp.h:85
bool er() const
is the error bit set?
Definition: HcalQIESample.h:30
uint16_t UHTRpacker::packTPheader ( const HcalTriggerPrimitiveSample tpSample,
int  channelid 
)
inline

Definition at line 352 of file PackerHelp.h.

References RecoTauValidation_cfi::header, TPHeaderSpec::MASK_CHANID, TPHeaderSpec::MASK_FLAVOR, TPHeaderSpec::MASK_HEADER_BIT, TPHeaderSpec::MASK_RESV, TPHeaderSpec::MASK_TPERR, TPHeaderSpec::OFFSET_CHANID, TPHeaderSpec::OFFSET_FLAVOR, TPHeaderSpec::OFFSET_HEADER_BIT, TPHeaderSpec::OFFSET_RESV, and TPHeaderSpec::OFFSET_TPERR.

352  {
353  uint16_t header =0;
354 
358  header |= (0x4 & TPHeaderSpec::MASK_FLAVOR)<<TPHeaderSpec::OFFSET_FLAVOR; //flavor
360 
361  return header;
362  }
static const int OFFSET_TPERR
Definition: PackerHelp.h:139
static const int OFFSET_FLAVOR
Definition: PackerHelp.h:141
static const int MASK_TPERR
Definition: PackerHelp.h:140
static const int OFFSET_CHANID
Definition: PackerHelp.h:135
static const int MASK_FLAVOR
Definition: PackerHelp.h:142
static const int MASK_CHANID
Definition: PackerHelp.h:136
static const int OFFSET_RESV
Definition: PackerHelp.h:137
static const int MASK_RESV
Definition: PackerHelp.h:138
static const int OFFSET_HEADER_BIT
Definition: PackerHelp.h:143
static const int MASK_HEADER_BIT
Definition: PackerHelp.h:144

Member Data Documentation

const int UHTRpacker::MASK_BCN = 0xFFF
static

Definition at line 305 of file PackerHelp.h.

const int UHTRpacker::MASK_CRATE_ID = 0xFFFFFF
static

Definition at line 312 of file PackerHelp.h.

const int UHTRpacker::MASK_DATA_LENGTH = 0xFFFFF
static

Definition at line 303 of file PackerHelp.h.

const int UHTRpacker::MASK_EVENT_TYPE = 0xF
static

Definition at line 322 of file PackerHelp.h.

const int UHTRpacker::MASK_EVN = 0xFFFFFF
static

Definition at line 307 of file PackerHelp.h.

const int UHTRpacker::MASK_FILED_BY_AMC13 = 0xFF
static

Definition at line 309 of file PackerHelp.h.

const int UHTRpacker::MASK_FW_FLAVOR = 0xFF
static

Definition at line 320 of file PackerHelp.h.

const int UHTRpacker::MASK_FW_VERSION = 0xFFFF
static

Definition at line 326 of file PackerHelp.h.

const int UHTRpacker::MASK_ORN = 0xFFFF
static

Definition at line 318 of file PackerHelp.h.

const int UHTRpacker::MASK_PAYLOAD_FORMAT = 0xF
static

Definition at line 324 of file PackerHelp.h.

const int UHTRpacker::MASK_PRESAMPLES = 0xF
static

Definition at line 316 of file PackerHelp.h.

const int UHTRpacker::MASK_SLOT_ID = 0xF
static

Definition at line 314 of file PackerHelp.h.

const int UHTRpacker::OFFSET_BCN = 20
static

Definition at line 304 of file PackerHelp.h.

const int UHTRpacker::OFFSET_CRATE_ID = 0
static

Definition at line 311 of file PackerHelp.h.

const int UHTRpacker::OFFSET_DATA_LENGTH = 0
static

Definition at line 302 of file PackerHelp.h.

const int UHTRpacker::OFFSET_EVENT_TYPE = 40
static

Definition at line 321 of file PackerHelp.h.

const int UHTRpacker::OFFSET_EVN = 32
static

Definition at line 306 of file PackerHelp.h.

const int UHTRpacker::OFFSET_FILED_BY_AMC13 = 56
static

Definition at line 308 of file PackerHelp.h.

const int UHTRpacker::OFFSET_FW_FLAVOR = 32
static

Definition at line 319 of file PackerHelp.h.

const int UHTRpacker::OFFSET_FW_VERSION = 48
static

Definition at line 325 of file PackerHelp.h.

const int UHTRpacker::OFFSET_ORN = 16
static

Definition at line 317 of file PackerHelp.h.

const int UHTRpacker::OFFSET_PAYLOAD_FORMAT = 44
static

Definition at line 323 of file PackerHelp.h.

const int UHTRpacker::OFFSET_PRESAMPLES = 12
static

Definition at line 315 of file PackerHelp.h.

const int UHTRpacker::OFFSET_SLOT_ID = 8
static

Definition at line 313 of file PackerHelp.h.

UHTRMap UHTRpacker::uhtrs

Definition at line 299 of file PackerHelp.h.

Referenced by HcalDigiToRawuHTR::produce().