Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
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
20
class
HcalDTCHeader
{
21
public
:
22
static
const
int
SLOT_COUNT
;
23
static
const
int
MINIMUM_SLOT
;
24
static
const
int
MAXIMUM_SLOT
;
25
26
HcalDTCHeader
();
27
29
unsigned
int
getTotalLengthBytes
()
const
;
30
32
33
inline
bool
thereIsASecondCDFHeaderWord
()
const
{
return
((
commondataformat0
>>3) & 0x0001); }
35
inline
short
getCDFversionNumber
()
const
{
return
((
commondataformat0
>>4) & 0x0F); }
37
inline
int
getSourceId
()
const
{
return
(
commondataformat0
>>8)&0xFFF; }
39
inline
int
getBunchId
()
const
{
return
(
commondataformat0
>>20)&0xFFF; }
41
inline
unsigned
long
getDTCEventNumber
()
const
{
return
(
commondataformat1
& 0x00FFFFFF); }
43
inline
unsigned
short
getCDFEventType
()
const
{
return
( (
commondataformat1
>>24) & 0x0F ); }
45
inline
unsigned
short
BOEshouldBe5Always
()
const
{
return
( (
commondataformat1
>>28) & 0x0F ); }
46
48
49
inline
bool
thereIsAThirdCDFHeaderWord
()
const
{
return
((
commondataformat2
>>3) & 0x0001); }
51
inline
unsigned
int
getOrbitNumber
()
const
{
return
( ((
commondataformat3
&& 0xF) << 28) + (
commondataformat2
>>4) ); }
53
inline
unsigned
int
getSlink64ReservedBits
()
const
{
return
( (
commondataformat3
>>4)&0x00FFFFFF ); }
55
inline
short
BOEshouldBeZeroAlways
()
const
{
return
( (
commondataformat3
>>28) & 0x0F); }
56
58
inline
bool
isCalibType
()
const
{
return
( 0 !=
getCalibType
());}
59
inline
HcalCalibrationEventType
getCalibType
()
const
{
return
HcalCalibrationEventType
((
commondataformat3
>>24)&0x0000000F);}
60
62
inline
short
getDTCDataFormatVersion
()
const
{
return
(
dcch0
& 0xFF); }
63
inline
int
nSlotWords
()
const
{
return
((
dcch0
>>20)& 0x0000000F); }
64
inline
int
nDTCWords
()
const
{
return
((
dcch0
>>8)& 0x00000FFF); }
65
67
inline
int
getSlotSummary
(
int
nslot)
const
{
return
slotInfo
[nslot]; }
68
73
int
getSlotData
(
int
nslot,
HcalHTRData
& decodeTool,
int
validSize)
const
;
74
75
77
inline
unsigned
int
getSlotDataLength
(
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(0):(
slotInfo
[nslot-1]&0xfff); }
78
80
inline
bool
getSlotEnabled
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x8000); }
82
inline
bool
getSlotPresent
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x4000); }
84
inline
bool
getSlotValid
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x2000); }
86
inline
bool
getSlotCRCError
(
unsigned
int
nslot)
const
{
return
(nslot<1 || nslot>12)?(
false
):(
slotInfo
[nslot-1]&0x1000); }
87
88
/* (for packing only) */
95
void
copySlotData
(
unsigned
int
slot_id,
const
HcalHTRData
&
data
,
bool
valid
=
true
);
96
98
void
clear
();
100
void
setHeader
(
int
sourceid,
int
bcn,
int
l1aN,
int
orbN);
101
102
private
:
103
// CURRENTLY VALID FOR LITTLE-ENDIAN (LINUX/x86) ONLY
104
uint32_t
commondataformat0
;
105
uint32_t
commondataformat1
;
106
uint32_t
commondataformat2
;
107
uint32_t
commondataformat3
;
108
uint32_t
dcch0
;
109
uint32_t
dcch1
;
110
uint16_t
slotInfo
[12];
111
112
};
113
114
std::ostream&
operator<<
(std::ostream&,
const
HcalDTCHeader
& head);
115
116
#endif
TrackValidation_HighPurity_cff.valid
tuple valid
Definition:
TrackValidation_HighPurity_cff.py:20
HcalDTCHeader::getSourceId
int getSourceId() const
Definition:
HcalDTCHeader.h:37
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:53
HcalDTCHeader::getSlink64ReservedBits
unsigned int getSlink64ReservedBits() const
Definition:
HcalDTCHeader.h:53
HcalDTCHeader::getCDFEventType
unsigned short getCDFEventType() const
Definition:
HcalDTCHeader.h:43
HcalDTCHeader::thereIsAThirdCDFHeaderWord
bool thereIsAThirdCDFHeaderWord() const
Definition:
HcalDTCHeader.h:49
HcalDTCHeader
Definition:
HcalDTCHeader.h:20
HcalDTCHeader::HcalDTCHeader
HcalDTCHeader()
Definition:
HcalDTCHeader.cc:15
HcalDTCHeader::getDTCEventNumber
unsigned long getDTCEventNumber() const
Definition:
HcalDTCHeader.h:41
HcalDTCHeader::slotInfo
uint16_t slotInfo[12]
Definition:
HcalDTCHeader.h:110
HcalDTCHeader::MINIMUM_SLOT
static const int MINIMUM_SLOT
Definition:
HcalDTCHeader.h:23
HcalHTRData
Definition:
HcalHTRData.h:18
HcalDTCHeader::getCDFversionNumber
short getCDFversionNumber() const
Definition:
HcalDTCHeader.h:35
HcalDTCHeader::clear
void clear()
Definition:
HcalDTCHeader.cc:37
HcalDTCHeader::thereIsASecondCDFHeaderWord
bool thereIsASecondCDFHeaderWord() const
Definition:
HcalDTCHeader.h:33
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:104
HcalDTCHeader::BOEshouldBeZeroAlways
short BOEshouldBeZeroAlways() const
Definition:
HcalDTCHeader.h:55
HcalDTCHeader::nSlotWords
int nSlotWords() const
Definition:
HcalDTCHeader.h:63
HcalDTCHeader::commondataformat2
uint32_t commondataformat2
Definition:
HcalDTCHeader.h:106
HcalCalibrationEventTypes.h
HcalDTCHeader::BOEshouldBe5Always
unsigned short BOEshouldBe5Always() const
Definition:
HcalDTCHeader.h:45
HcalDTCHeader::getBunchId
int getBunchId() const
Definition:
HcalDTCHeader.h:39
HcalDTCHeader::dcch1
uint32_t dcch1
Definition:
HcalDTCHeader.h:109
HcalDTCHeader::getSlotValid
bool getSlotValid(unsigned int nslot) const
Read the "VALID" bit for this slot; TTC EvN matched HTR EvN.
Definition:
HcalDTCHeader.h:84
HcalDTCHeader::nDTCWords
int nDTCWords() const
Definition:
HcalDTCHeader.h:64
HcalDTCHeader::getSlotPresent
bool getSlotPresent(unsigned int nslot) const
Read the "PRESENT" bit for this slot.
Definition:
HcalDTCHeader.h:82
HcalDTCHeader::getTotalLengthBytes
unsigned int getTotalLengthBytes() const
Definition:
HcalDTCHeader.cc:17
HcalDTCHeader::getSlotEnabled
bool getSlotEnabled(unsigned int nslot) const
Read the "ENABLED" bit for this slot.
Definition:
HcalDTCHeader.h:80
HcalDTCHeader::commondataformat1
uint32_t commondataformat1
Definition:
HcalDTCHeader.h:105
HcalDTCHeader::getOrbitNumber
unsigned int getOrbitNumber() const
Definition:
HcalDTCHeader.h:51
HcalDTCHeader::dcch0
uint32_t dcch0
Definition:
HcalDTCHeader.h:108
HcalDTCHeader::getCalibType
HcalCalibrationEventType getCalibType() const
Definition:
HcalDTCHeader.h:59
HcalDTCHeader::getDTCDataFormatVersion
short getDTCDataFormatVersion() const
Definition:
HcalDTCHeader.h:62
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:82
HcalDTCHeader::getSlotData
int getSlotData(int nslot, HcalHTRData &decodeTool, int validSize) const
Definition:
HcalDTCHeader.cc:24
HcalDTCHeader::getSlotDataLength
unsigned int getSlotDataLength(int nslot) const
Definition:
HcalDTCHeader.h:77
HcalDTCHeader::commondataformat3
uint32_t commondataformat3
Definition:
HcalDTCHeader.h:107
HcalDTCHeader::isCalibType
bool isCalibType() const
Definition:
HcalDTCHeader.h:58
HcalDTCHeader::getSlotSummary
int getSlotSummary(int nslot) const
Definition:
HcalDTCHeader.h:67
HcalDTCHeader::SLOT_COUNT
static const int SLOT_COUNT
Definition:
HcalDTCHeader.h:22
HcalDTCHeader::MAXIMUM_SLOT
static const int MAXIMUM_SLOT
Definition:
HcalDTCHeader.h:24
HcalDTCHeader::setHeader
void setHeader(int sourceid, int bcn, int l1aN, int orbN)
Definition:
HcalDTCHeader.cc:48
HcalDTCHeader::getSlotCRCError
bool getSlotCRCError(unsigned int nslot) const
Read the "CRC-Mismatch" bit for this slot.
Definition:
HcalDTCHeader.h:86
Generated for CMSSW Reference Manual by
1.8.5