CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
hcal::AMC13Header Class Reference

#include <AMC13Header.h>

Public Member Functions

int AMC13FormatVersion () const
 
int AMCBlockNumber (int i) const
 
bool AMCCRCOk (int i) const
 
bool AMCDataPresent (int i) const
 
bool AMCDataValid (int i) const
 
bool AMCEnabled (int i) const
 
uint16_t AMCId (int i) const
 
bool AMCLengthOk (int i) const
 
bool AMCMore (int i) const
 
const uint64_t * AMCPayload (int i) const
 
bool AMCSegmented (int i) const
 
int AMCSize (int i) const
 
int AMCSlot (int i) const
 
int bunchId () const
 
int CDFEventType () const
 
int l1aNumber () const
 
int NAMC () const
 
unsigned int orbitNumber () const
 
int sourceId () const
 

Private Attributes

uint64_t amc13Header
 
uint64_t cdfHeader
 
uint64_t modulesHeaders [12]
 

Detailed Description

Interpretive class for the AMC13XG common data format

Definition at line 12 of file AMC13Header.h.

Member Function Documentation

int hcal::AMC13Header::AMC13FormatVersion ( ) const
inline

Get the format version number

Definition at line 27 of file AMC13Header.h.

References amc13Header.

27 { return int((amc13Header>>60)&0xF); }
uint64_t amc13Header
Definition: AMC13Header.h:59
int hcal::AMC13Header::AMCBlockNumber ( int  i) const
inline

Get the block number

Definition at line 35 of file AMC13Header.h.

References modulesHeaders.

35 { return int((modulesHeaders[i]>>20)&0xFF); }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
bool hcal::AMC13Header::AMCCRCOk ( int  i) const
inline

Was the CRC correct as received by the AMC13?

Definition at line 45 of file AMC13Header.h.

References modulesHeaders.

Referenced by HcalUnpacker::unpackUTCA().

45 { return ((modulesHeaders[i]>>56)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
bool hcal::AMC13Header::AMCDataPresent ( int  i) const
inline

Is there data for this AMC?

Definition at line 47 of file AMC13Header.h.

References modulesHeaders.

Referenced by HcalUnpacker::unpackUTCA().

47 { return ((modulesHeaders[i]>>58)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
bool hcal::AMC13Header::AMCDataValid ( int  i) const
inline

Does the EvN and BCN match for this AMC?

Definition at line 49 of file AMC13Header.h.

References modulesHeaders.

49 { return ((modulesHeaders[i]>>57)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
bool hcal::AMC13Header::AMCEnabled ( int  i) const
inline

Is this AMC input enabled?

Definition at line 51 of file AMC13Header.h.

References modulesHeaders.

Referenced by HcalUnpacker::unpackUTCA().

51 { return ((modulesHeaders[i]>>59)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
uint16_t hcal::AMC13Header::AMCId ( int  i) const
inline

Get the board identifier for the given module (sequential)

Definition at line 31 of file AMC13Header.h.

References modulesHeaders.

Referenced by RawTask::_process(), and HcalUnpacker::unpackUTCA().

31 { return uint16_t(modulesHeaders[i]&0xFFFF); }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
bool hcal::AMC13Header::AMCLengthOk ( int  i) const
inline

Was the length as expected?

Definition at line 43 of file AMC13Header.h.

References modulesHeaders.

43 { return ((modulesHeaders[i]>>62)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
bool hcal::AMC13Header::AMCMore ( int  i) const
inline

More blocks?

Definition at line 39 of file AMC13Header.h.

References modulesHeaders.

39 { return ((modulesHeaders[i]>>61)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
const uint64_t * hcal::AMC13Header::AMCPayload ( int  i) const

Get the pointer to the beginning of the data for the given AMC

Definition at line 4 of file AMC13Header.cc.

References AMCSize(), cdfHeader, i, j, and NAMC().

Referenced by RawTask::_process(), and HcalUnpacker::unpackUTCA().

4  {
5  const uint64_t* ptr=(&cdfHeader)+2+NAMC();
6  for (int j=0; j<i; j++)
7  ptr+=AMCSize(j);
8  return ptr;
9  }
int i
Definition: DBlmapReader.cc:9
int AMCSize(int i) const
Definition: AMC13Header.h:37
int j
Definition: DBlmapReader.cc:9
unsigned long long uint64_t
Definition: Time.h:15
int NAMC() const
Definition: AMC13Header.h:25
uint64_t cdfHeader
Definition: AMC13Header.h:58
bool hcal::AMC13Header::AMCSegmented ( int  i) const
inline

Segmented data?

Definition at line 41 of file AMC13Header.h.

References modulesHeaders.

Referenced by HcalUnpacker::unpackUTCA().

41 { return ((modulesHeaders[i]>>60)&0x1)!=0; }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
int hcal::AMC13Header::AMCSize ( int  i) const
inline

Get the size

Definition at line 37 of file AMC13Header.h.

References modulesHeaders.

Referenced by RawTask::_process(), AMCPayload(), and HcalUnpacker::unpackUTCA().

37 { return int((modulesHeaders[i]>>32)&0xFFFFFF); }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
int hcal::AMC13Header::AMCSlot ( int  i) const
inline

Get the slot for the given module (sequential)

Definition at line 33 of file AMC13Header.h.

References modulesHeaders.

Referenced by RawTask::_process(), and HcalUnpacker::unpackUTCA().

33 { return int((modulesHeaders[i]>>16)&0xF); }
int i
Definition: DBlmapReader.cc:9
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:60
int hcal::AMC13Header::bunchId ( ) const
inline

get the bunch id from the CDF header

Definition at line 17 of file AMC13Header.h.

References cdfHeader.

Referenced by RawTask::_process().

17 { return int(cdfHeader>>20)&0xFFF; }
uint64_t cdfHeader
Definition: AMC13Header.h:58
int hcal::AMC13Header::CDFEventType ( ) const
inline

Get the Event Type value (2007.11.03 - Not defined, but should stay consistent among events.)

Definition at line 21 of file AMC13Header.h.

References cdfHeader.

21 { return ( int(cdfHeader>>56) & 0x0F ); }
uint64_t cdfHeader
Definition: AMC13Header.h:58
int hcal::AMC13Header::l1aNumber ( ) const
inline

get the Event Number from the CDF header

Definition at line 19 of file AMC13Header.h.

References cdfHeader.

Referenced by RawTask::_process().

19 { return int((cdfHeader>>32) & 0x00FFFFFF); }
uint64_t cdfHeader
Definition: AMC13Header.h:58
int hcal::AMC13Header::NAMC ( ) const
inline

Get the number of modules in the payload

Definition at line 25 of file AMC13Header.h.

References amc13Header.

Referenced by RawTask::_process(), AMCPayload(), and HcalUnpacker::unpackUTCA().

25 { return int((amc13Header>>52)&0xF); }
uint64_t amc13Header
Definition: AMC13Header.h:59
unsigned int hcal::AMC13Header::orbitNumber ( ) const
inline

Get the Orbit Number from the CDF.

Definition at line 23 of file AMC13Header.h.

References amc13Header.

Referenced by RawTask::_process().

23 { return (unsigned int)((amc13Header>>4)&0xFFFFFFFFu); }
uint64_t amc13Header
Definition: AMC13Header.h:59
int hcal::AMC13Header::sourceId ( ) const
inline

get the source id from the CDF header

Definition at line 15 of file AMC13Header.h.

References cdfHeader.

Referenced by HcalUnpacker::unpackUTCA().

15 { return int(cdfHeader>>8)&0xFFF; }
uint64_t cdfHeader
Definition: AMC13Header.h:58

Member Data Documentation

uint64_t hcal::AMC13Header::amc13Header
private

Definition at line 59 of file AMC13Header.h.

Referenced by AMC13FormatVersion(), NAMC(), and orbitNumber().

uint64_t hcal::AMC13Header::cdfHeader
private

Definition at line 58 of file AMC13Header.h.

Referenced by AMCPayload(), bunchId(), CDFEventType(), l1aNumber(), and sourceId().

uint64_t hcal::AMC13Header::modulesHeaders[12]
private