CMS 3D CMS Logo

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

◆ AMC13FormatVersion()

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

Get the format version number

Definition at line 27 of file AMC13Header.h.

References amc13Header, and createfilelist::int.

27 { return int((amc13Header >> 60) & 0xF); }
uint64_t amc13Header
Definition: AMC13Header.h:58

◆ AMCBlockNumber()

int hcal::AMC13Header::AMCBlockNumber ( int  i) const
inline

Get the block number

Definition at line 35 of file AMC13Header.h.

References mps_fire::i, createfilelist::int, and modulesHeaders.

35 { return int((modulesHeaders[i] >> 20) & 0xFF); }
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:59

◆ AMCCRCOk()

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 mps_fire::i, and modulesHeaders.

◆ AMCDataPresent()

bool hcal::AMC13Header::AMCDataPresent ( int  i) const
inline

Is there data for this AMC?

Definition at line 47 of file AMC13Header.h.

References mps_fire::i, and modulesHeaders.

◆ AMCDataValid()

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 mps_fire::i, and modulesHeaders.

◆ AMCEnabled()

bool hcal::AMC13Header::AMCEnabled ( int  i) const
inline

Is this AMC input enabled?

Definition at line 51 of file AMC13Header.h.

References mps_fire::i, and modulesHeaders.

◆ AMCId()

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 mps_fire::i, and modulesHeaders.

Referenced by RawTask::_process().

31 { return uint16_t(modulesHeaders[i] & 0xFFFF); }
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:59

◆ AMCLengthOk()

bool hcal::AMC13Header::AMCLengthOk ( int  i) const
inline

Was the length as expected?

Definition at line 43 of file AMC13Header.h.

References mps_fire::i, and modulesHeaders.

◆ AMCMore()

bool hcal::AMC13Header::AMCMore ( int  i) const
inline

More blocks?

Definition at line 39 of file AMC13Header.h.

References mps_fire::i, and modulesHeaders.

◆ AMCPayload()

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, mps_fire::i, dqmiolumiharvest::j, and NAMC().

Referenced by RawTask::_process(), and HLTHcalCalibTypeFilter::filter().

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 AMCSize(int i) const
Definition: AMC13Header.h:37
unsigned long long uint64_t
Definition: Time.h:13
int NAMC() const
Definition: AMC13Header.h:25
uint64_t cdfHeader
Definition: AMC13Header.h:57

◆ AMCSegmented()

bool hcal::AMC13Header::AMCSegmented ( int  i) const
inline

Segmented data?

Definition at line 41 of file AMC13Header.h.

References mps_fire::i, and modulesHeaders.

◆ AMCSize()

int hcal::AMC13Header::AMCSize ( int  i) const
inline

Get the size

Definition at line 37 of file AMC13Header.h.

References mps_fire::i, createfilelist::int, and modulesHeaders.

Referenced by RawTask::_process(), AMCPayload(), and HLTHcalCalibTypeFilter::filter().

37 { return int((modulesHeaders[i] >> 32) & 0xFFFFFF); }
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:59

◆ AMCSlot()

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 mps_fire::i, createfilelist::int, and modulesHeaders.

Referenced by RawTask::_process().

33 { return int((modulesHeaders[i] >> 16) & 0xF); }
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:59

◆ bunchId()

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

get the bunch id from the CDF header

Definition at line 17 of file AMC13Header.h.

References cdfHeader, and createfilelist::int.

Referenced by RawTask::_process().

17 { return int(cdfHeader >> 20) & 0xFFF; }
uint64_t cdfHeader
Definition: AMC13Header.h:57

◆ CDFEventType()

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:57

◆ l1aNumber()

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

get the Event Number from the CDF header

Definition at line 19 of file AMC13Header.h.

References cdfHeader, and createfilelist::int.

Referenced by RawTask::_process().

19 { return int((cdfHeader >> 32) & 0x00FFFFFF); }
uint64_t cdfHeader
Definition: AMC13Header.h:57

◆ NAMC()

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

Get the number of modules in the payload

Definition at line 25 of file AMC13Header.h.

References amc13Header, and createfilelist::int.

Referenced by RawTask::_process(), AMCPayload(), and HLTHcalCalibTypeFilter::filter().

25 { return int((amc13Header >> 52) & 0xF); }
uint64_t amc13Header
Definition: AMC13Header.h:58

◆ orbitNumber()

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:58

◆ sourceId()

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

get the source id from the CDF header

Definition at line 15 of file AMC13Header.h.

References cdfHeader, and createfilelist::int.

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

Member Data Documentation

◆ amc13Header

uint64_t hcal::AMC13Header::amc13Header
private

Definition at line 58 of file AMC13Header.h.

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

◆ cdfHeader

uint64_t hcal::AMC13Header::cdfHeader
private

Definition at line 57 of file AMC13Header.h.

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

◆ modulesHeaders

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