Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
EventFilter
HcalRawToDigi
interface
HcalDTCHeader.h
Go to the documentation of this file.
1
/* -*- C++ -*- */
2
#ifndef HcalDTCHeader_H
3
#define HcalDTCHeader_H
4
5
#include <iostream>
6
#include <stdint.h>
7
#include "
DataFormats/HcalDigi/interface/HcalCalibrationEventTypes.h
"
8
class
HcalHTRData
;
9
18
class
HcalDTCHeader
{
19
public
:
20
static
const
int
SLOT_COUNT
;
21
static
const
int
MINIMUM_SLOT
;
22
static
const
int
MAXIMUM_SLOT
;
23
24
HcalDTCHeader
();
25
27
unsigned
int
getTotalLengthBytes
()
const
;
28
30
31
inline
bool
thereIsASecondCDFHeaderWord
()
const
{
return
((
commondataformat0
>>3) & 0x0001); }
33
inline
short
getCDFversionNumber
()
const
{
return
((
commondataformat0
>>4) & 0x0F); }
35
inline
int
getSourceId
()
const
{
return
(
commondataformat0
>>8)&0xFFF; }
37
inline
int
getBunchId
()
const
{
return
(
commondataformat0
>>20)&0xFFF; }
39
inline
unsigned
long
getDTCEventNumber
()
const
{
return
(
commondataformat1
& 0x00FFFFFF); }
41
inline
unsigned
short
getCDFEventType
()
const
{
return
( (
commondataformat1
>>24) & 0x0F ); }
43
inline
unsigned
short
BOEshouldBe5Always
()
const
{
return
( (
commondataformat1
>>28) & 0x0F ); }
44
46
47
inline
bool
thereIsAThirdCDFHeaderWord
()
const
{
return
((
commondataformat2
>>3) & 0x0001); }
49
inline
unsigned
int
getOrbitNumber
()
const
{
return
( ((
commondataformat3
&& 0xF) << 28) + (
commondataformat2
>>4) ); }
51
inline
unsigned
int
getSlink64ReservedBits
()
const
{
return
( (
commondataformat3
>>4)&0x00FFFFFF ); }
53
inline
short
BOEshouldBeZeroAlways
()
const
{
return
( (
commondataformat3
>>28) & 0x0F); }
54
56
inline
bool
isCalibType
()
const
{
return
( 0 !=
getCalibType
());}
57
inline
HcalCalibrationEventType
getCalibType
()
const
{
return
HcalCalibrationEventType
((
commondataformat3
>>24)&0x0000000F);}
58
60
inline
short
getDTCDataFormatVersion
()
const
{
return
(
dcch0
& 0xFF); }
61
inline
int
nSlotWords
()
const
{
return
((
dcch0
>>20)& 0x0000000F); }
62
inline
int
nDTCWords
()
const
{
return
((
dcch0
>>8)& 0x00000FFF); }
63
65
inline
int
getSlotSummary
(
int
nslot)
const
{
return
slotInfo
[nslot]; }
66
71
int
getSlotData
(
int
nslot,
HcalHTRData
& decodeTool,
int
validSize)
const
;
72
73
75
inline
unsigned
int
getSlotDataLength
(
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(0):(
slotInfo
[nslot-1]&0xfff); }
76
78
inline
bool
getSlotEnabled
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x8000); }
80
inline
bool
getSlotPresent
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x4000); }
82
inline
bool
getSlotValid
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x2000); }
84
inline
bool
getSlotCRCError
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x1000); }
85
86
/* (for packing only) */
93
void
copySlotData
(
unsigned
int
slot_id,
const
HcalHTRData
&
data
,
bool
valid=
true
);
94
96
void
clear
();
98
void
setHeader
(
int
sourceid,
int
bcn,
int
l1aN,
int
orbN);
99
100
private
:
101
// CURRENTLY VALID FOR LITTLE-ENDIAN (LINUX/x86) ONLY
102
uint32_t
commondataformat0
;
103
uint32_t
commondataformat1
;
104
uint32_t
commondataformat2
;
105
uint32_t
commondataformat3
;
106
uint32_t
dcch0
;
107
uint32_t
dcch1
;
108
uint16_t
slotInfo
[12];
109
110
};
111
112
std::ostream&
operator<<
(std::ostream&,
const
HcalDTCHeader
& head);
113
114
#endif
HcalDTCHeader::getSourceId
int getSourceId() const
Definition:
HcalDTCHeader.h:35
HcalDTCHeader::copySlotData
void copySlotData(unsigned int slot_id, const HcalHTRData &data, bool valid=true)
Add the given HcalHTRData as the given slot's data. This should be done in increasing slot order! ...
Definition:
HcalDTCHeader.cc:51
HcalDTCHeader::getSlink64ReservedBits
unsigned int getSlink64ReservedBits() const
Definition:
HcalDTCHeader.h:51
HcalDTCHeader::getCDFEventType
unsigned short getCDFEventType() const
Definition:
HcalDTCHeader.h:41
HcalDTCHeader::thereIsAThirdCDFHeaderWord
bool thereIsAThirdCDFHeaderWord() const
Definition:
HcalDTCHeader.h:47
HcalDTCHeader
Definition:
HcalDTCHeader.h:18
HcalDTCHeader::HcalDTCHeader
HcalDTCHeader()
Definition:
HcalDTCHeader.cc:13
HcalDTCHeader::getDTCEventNumber
unsigned long getDTCEventNumber() const
Definition:
HcalDTCHeader.h:39
HcalDTCHeader::slotInfo
uint16_t slotInfo[12]
Definition:
HcalDTCHeader.h:108
HcalDTCHeader::MINIMUM_SLOT
static const int MINIMUM_SLOT
Definition:
HcalDTCHeader.h:21
HcalHTRData
Definition:
HcalHTRData.h:16
HcalDTCHeader::getCDFversionNumber
short getCDFversionNumber() const
Definition:
HcalDTCHeader.h:33
HcalDTCHeader::clear
void clear()
Definition:
HcalDTCHeader.cc:35
HcalDTCHeader::thereIsASecondCDFHeaderWord
bool thereIsASecondCDFHeaderWord() const
Definition:
HcalDTCHeader.h:31
HcalCalibrationEventType
HcalCalibrationEventType
Definition:
HcalCalibrationEventTypes.h:4
operator<<
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition:
ALILine.cc:187
HcalDTCHeader::commondataformat0
uint32_t commondataformat0
Definition:
HcalDTCHeader.h:102
HcalDTCHeader::BOEshouldBeZeroAlways
short BOEshouldBeZeroAlways() const
Definition:
HcalDTCHeader.h:53
HcalDTCHeader::nSlotWords
int nSlotWords() const
Definition:
HcalDTCHeader.h:61
HcalDTCHeader::commondataformat2
uint32_t commondataformat2
Definition:
HcalDTCHeader.h:104
HcalCalibrationEventTypes.h
HcalDTCHeader::BOEshouldBe5Always
unsigned short BOEshouldBe5Always() const
Definition:
HcalDTCHeader.h:43
HcalDTCHeader::getBunchId
int getBunchId() const
Definition:
HcalDTCHeader.h:37
HcalDTCHeader::dcch1
uint32_t dcch1
Definition:
HcalDTCHeader.h:107
HcalDTCHeader::getSlotValid
bool getSlotValid(unsigned int nslot) const
Read the "VALID" bit for this slot; TTC EvN matched HTR EvN.
Definition:
HcalDTCHeader.h:82
HcalDTCHeader::nDTCWords
int nDTCWords() const
Definition:
HcalDTCHeader.h:62
HcalDTCHeader::getSlotPresent
bool getSlotPresent(unsigned int nslot) const
Read the "PRESENT" bit for this slot.
Definition:
HcalDTCHeader.h:80
HcalDTCHeader::getTotalLengthBytes
unsigned int getTotalLengthBytes() const
Definition:
HcalDTCHeader.cc:15
HcalDTCHeader::getSlotEnabled
bool getSlotEnabled(unsigned int nslot) const
Read the "ENABLED" bit for this slot.
Definition:
HcalDTCHeader.h:78
HcalDTCHeader::commondataformat1
uint32_t commondataformat1
Definition:
HcalDTCHeader.h:103
HcalDTCHeader::getOrbitNumber
unsigned int getOrbitNumber() const
Definition:
HcalDTCHeader.h:49
HcalDTCHeader::dcch0
uint32_t dcch0
Definition:
HcalDTCHeader.h:106
HcalDTCHeader::getCalibType
HcalCalibrationEventType getCalibType() const
Definition:
HcalDTCHeader.h:57
HcalDTCHeader::getDTCDataFormatVersion
short getDTCDataFormatVersion() const
Definition:
HcalDTCHeader.h:60
HcalDTCHeader::getSlotData
int getSlotData(int nslot, HcalHTRData &decodeTool, int validSize) const
Definition:
HcalDTCHeader.cc:22
HcalDTCHeader::getSlotDataLength
unsigned int getSlotDataLength(int nslot) const
Definition:
HcalDTCHeader.h:75
HcalDTCHeader::commondataformat3
uint32_t commondataformat3
Definition:
HcalDTCHeader.h:105
HcalDTCHeader::isCalibType
bool isCalibType() const
Definition:
HcalDTCHeader.h:56
HcalDTCHeader::getSlotSummary
int getSlotSummary(int nslot) const
Definition:
HcalDTCHeader.h:65
HcalDTCHeader::SLOT_COUNT
static const int SLOT_COUNT
Definition:
HcalDTCHeader.h:20
HcalDTCHeader::MAXIMUM_SLOT
static const int MAXIMUM_SLOT
Definition:
HcalDTCHeader.h:22
HcalDTCHeader::setHeader
void setHeader(int sourceid, int bcn, int l1aN, int orbN)
Definition:
HcalDTCHeader.cc:46
AlCaHLTBitMon_QueryRunRegistry.data
tuple data
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:288
HcalDTCHeader::getSlotCRCError
bool getSlotCRCError(unsigned int nslot) const
Read the "CRC-Mismatch" bit for this slot.
Definition:
HcalDTCHeader.h:84
Generated for CMSSW Reference Manual by
1.8.5