src
EventFilter
CSCRawToDigi
src
CSCDCCHeader.cc
Go to the documentation of this file.
1
#include "
EventFilter/CSCRawToDigi/interface/CSCDCCHeader.h
"
2
#include "
DataFormats/FEDRawData/interface/FEDHeader.h
"
3
#include <iostream>
4
#include <cassert>
5
#include <cstring>
6
7
CSCDCCHeader::CSCDCCHeader
(
int
bx
,
int
l1a,
int
sourceId
,
int
version
) {
8
word
[0] = 0x5100000000000008
LL
;
9
word
[1] = 0xD900000000000000
LL
;
11
FEDHeader::set
(reinterpret_cast<unsigned char *>(
data
()), 1, l1a,
bx
,
sourceId
,
version
,
true
);
12
}
13
14
CSCDCCHeader::CSCDCCHeader
() {
15
word
[0] = 0x5100000000000008
LL
;
16
word
[1] = 0xD900000000000000
LL
;
17
}
18
19
CSCDCCHeader::CSCDCCHeader
(
const
CSCDCCStatusDigi
&digi) { memcpy(
this
, digi.
header
(),
sizeInWords
() * 2); }
20
21
int
CSCDCCHeader::getCDFEventNumber
()
const
{
return
((
word
[0] >> 32) & 0x00FFFFFF); }
22
23
int
CSCDCCHeader::getCDFBunchCounter
()
const
{
return
((
word
[0] >> 20) & 0xFFF); }
24
int
CSCDCCHeader::getCDFSourceId
()
const
{
return
((
word
[0] >> 8) & 0xFFF); }
25
int
CSCDCCHeader::getCDFFOV
()
const
{
return
((
word
[0] >> 4) & 0xF); }
26
int
CSCDCCHeader::getCDFEventType
()
const
{
return
((
word
[0] >> 56) & 0xF); }
27
28
void
CSCDCCHeader::setDAV
(
int
slot) {
29
/* Bits 7,6,5,4,2 to indicate available DDU.
30
For slink0, the DDU slots are 5, 12, 4, 13, 3 (same as Fifo_in_use[4:0]);
31
for slink1, the DDU slots are 9, 7, 10, 6, 11
32
*/
33
assert
(slot >= 3 && slot <= 13);
34
int
bit
[] = {0, 0, 0, 2, 5, 7, 4, 6, 0, 7, 5, 2, 6, 4};
35
word
[0] |= 1 <<
bit
[slot];
36
}
37
38
std::ostream &
operator<<
(std::ostream &os,
const
CSCDCCHeader
&hdr) {
39
os <<
"DCC Header"
<< std::endl;
40
return
os;
41
}
CSCDCCHeader::setDAV
void setDAV(int dduSlot)
Definition:
CSCDCCHeader.cc:28
CSCDCCHeader::CSCDCCHeader
CSCDCCHeader()
Definition:
CSCDCCHeader.cc:14
CSCDCCHeader::getCDFSourceId
int getCDFSourceId() const
Definition:
CSCDCCHeader.cc:24
operator<<
std::ostream & operator<<(std::ostream &os, const CSCDCCHeader &hdr)
Definition:
CSCDCCHeader.cc:38
FEDHeader.h
L1DTConfigBti_cff.LL
LL
Definition:
L1DTConfigBti_cff.py:25
cms::cuda::assert
assert(be >=bs)
simKBmtfDigis_cfi.bx
bx
Definition:
simKBmtfDigis_cfi.py:55
word
uint64_t word
Definition:
CTPPSTotemDataFormatter.cc:29
CSCDCCHeader
Definition:
CSCDCCHeader.h:13
BeamSplash_cfg.version
version
Definition:
BeamSplash_cfg.py:45
CSCDCCStatusDigi::header
const uint16_t * header() const
data accessors
Definition:
CSCDCCStatusDigi.h:25
objects.autophobj.sourceId
sourceId
Definition:
autophobj.py:239
CSCDCCHeader::getCDFFOV
int getCDFFOV() const
Definition:
CSCDCCHeader.cc:25
CSCDCCHeader::getCDFBunchCounter
int getCDFBunchCounter() const
Definition:
CSCDCCHeader.cc:23
CSCDCCHeader::sizeInWords
static unsigned sizeInWords()
Definition:
CSCDCCHeader.h:29
triggerObjects_cff.bit
bit
Definition:
triggerObjects_cff.py:262
FEDHeader::set
static void set(unsigned char *header, uint8_t triggerType, uint32_t lvl1ID, uint16_t bxID, uint16_t sourceID, uint8_t version=0, bool moreHeaders=false)
Set all fields in the header.
Definition:
FEDHeader.cc:25
CSCDCCHeader::getCDFEventType
int getCDFEventType() const
Definition:
CSCDCCHeader.cc:26
CSCDCCStatusDigi
Definition:
CSCDCCStatusDigi.h:15
CSCDCCHeader::data
unsigned short * data()
Definition:
CSCDCCHeader.h:28
CSCDCCHeader::getCDFEventNumber
int getCDFEventNumber() const
Definition:
CSCDCCHeader.cc:21
CSCDCCHeader.h
Generated for CMSSW Reference Manual by
1.8.14