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.

27 { return int((amc13Header >> 60) & 0xF); }

References amc13Header, and createfilelist::int.

◆ AMCBlockNumber()

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

Get the block number

Definition at line 35 of file AMC13Header.h.

35 { return int((modulesHeaders[i] >> 20) & 0xFF); }

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

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

45 { return ((modulesHeaders[i] >> 56) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

◆ AMCDataPresent()

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

Is there data for this AMC?

Definition at line 47 of file AMC13Header.h.

47 { return ((modulesHeaders[i] >> 58) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

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

49 { return ((modulesHeaders[i] >> 57) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

◆ AMCEnabled()

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

Is this AMC input enabled?

Definition at line 51 of file AMC13Header.h.

51 { return ((modulesHeaders[i] >> 59) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

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

31 { return uint16_t(modulesHeaders[i] & 0xFFFF); }

References mps_fire::i, and modulesHeaders.

Referenced by RawTask::_process().

◆ AMCLengthOk()

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

Was the length as expected?

Definition at line 43 of file AMC13Header.h.

43 { return ((modulesHeaders[i] >> 62) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

◆ AMCMore()

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

More blocks?

Definition at line 39 of file AMC13Header.h.

39 { return ((modulesHeaders[i] >> 61) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

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

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  }

References AMCSize(), cdfHeader, mps_fire::i, dqmiolumiharvest::j, and NAMC().

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

◆ AMCSegmented()

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

Segmented data?

Definition at line 41 of file AMC13Header.h.

41 { return ((modulesHeaders[i] >> 60) & 0x1) != 0; }

References mps_fire::i, modulesHeaders, and testProducerWithPsetDescEmpty_cfi::x1.

◆ AMCSize()

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

Get the size

Definition at line 37 of file AMC13Header.h.

37 { return int((modulesHeaders[i] >> 32) & 0xFFFFFF); }

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

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

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

33 { return int((modulesHeaders[i] >> 16) & 0xF); }

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

Referenced by RawTask::_process().

◆ bunchId()

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

get the bunch id from the CDF header

Definition at line 17 of file AMC13Header.h.

17 { return int(cdfHeader >> 20) & 0xFFF; }

References cdfHeader, and createfilelist::int.

Referenced by RawTask::_process().

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

21 { return (int(cdfHeader >> 56) & 0x0F); }

References cdfHeader.

◆ l1aNumber()

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

get the Event Number from the CDF header

Definition at line 19 of file AMC13Header.h.

19 { return int((cdfHeader >> 32) & 0x00FFFFFF); }

References cdfHeader, and createfilelist::int.

Referenced by RawTask::_process().

◆ NAMC()

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

Get the number of modules in the payload

Definition at line 25 of file AMC13Header.h.

25 { return int((amc13Header >> 52) & 0xF); }

References amc13Header, and createfilelist::int.

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

◆ orbitNumber()

unsigned int hcal::AMC13Header::orbitNumber ( ) const
inline

Get the Orbit Number from the CDF.

Definition at line 23 of file AMC13Header.h.

23 { return (unsigned int)((amc13Header >> 4) & 0xFFFFFFFFu); }

References amc13Header.

Referenced by RawTask::_process().

◆ sourceId()

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

get the source id from the CDF header

Definition at line 15 of file AMC13Header.h.

15 { return int(cdfHeader >> 8) & 0xFFF; }

References cdfHeader, and createfilelist::int.

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
mps_fire.i
i
Definition: mps_fire.py:355
hcal::AMC13Header::cdfHeader
uint64_t cdfHeader
Definition: AMC13Header.h:57
hcal::AMC13Header::amc13Header
uint64_t amc13Header
Definition: AMC13Header.h:58
hcal::AMC13Header::AMCSize
int AMCSize(int i) const
Definition: AMC13Header.h:37
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
hcal::AMC13Header::modulesHeaders
uint64_t modulesHeaders[12]
Definition: AMC13Header.h:59
createfilelist.int
int
Definition: createfilelist.py:10
hcal::AMC13Header::NAMC
int NAMC() const
Definition: AMC13Header.h:25
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66