Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
EventFilter
CSCRawToDigi
interface
CSCDMBHeader.h
Go to the documentation of this file.
1
#ifndef CSCDMBHeader_h
2
#define CSCDMBHeader_h
3
4
#include <cassert>
5
#include <iosfwd>
6
#include <string.h>
// bzero
7
#include "
FWCore/Utilities/interface/Exception.h
"
8
#include "
DataFormats/CSCDigi/interface/CSCDMBStatusDigi.h
"
9
#include "
EventFilter/CSCRawToDigi/interface/CSCVDMBHeaderFormat.h
"
10
#include <boost/shared_ptr.hpp>
11
12
class
CSCDMBHeader2005
;
13
class
CSCDMBHeader2013
;
14
15
class
CSCDMBHeader
{
16
public
:
17
18
CSCDMBHeader
(uint16_t firmware_version = 2005);
19
20
CSCDMBHeader
(
unsigned
short
* buf, uint16_t firmware_version = 2005);
21
22
CSCDMBHeader
(
const
CSCDMBStatusDigi
& digi)
23
{
24
memcpy(
this
, digi.
header
(),
sizeInWords
()*2);
25
}
26
27
28
29
bool
cfebAvailable
(
unsigned
icfeb) {
30
assert
(icfeb < (
theFirmwareVersion
==2013)?7:5);
31
return
(
theHeaderFormat
->cfebAvailable() >> icfeb) & 1;
32
}
33
34
void
addCFEB
(
int
icfeb) {
theHeaderFormat
->addCFEB(icfeb); }
35
void
addNCLCT
() {
theHeaderFormat
->addNCLCT();};
36
37
void
addNALCT
() {
theHeaderFormat
->addNALCT(); };
38
void
setBXN
(
int
bxn
) {
theHeaderFormat
->setBXN(bxn); };
39
void
setL1A
(
int
l1a
) {
theHeaderFormat
->setL1A(l1a); };
40
void
setL1A24
(
int
l1a
) {
theHeaderFormat
->setL1A24(l1a); };
41
void
setCrateAddress
(
int
crate,
int
dmbId) {
theHeaderFormat
->setCrateAddress(crate, dmbId); };
42
void
setdmbID
(
int
newDMBID) {
theHeaderFormat
->setdmbID(newDMBID); };
43
void
setdmbVersion
(
unsigned
int
version
) {
theHeaderFormat
->setdmbVersion(version); };
44
45
unsigned
cfebActive
()
const
{
return
theHeaderFormat
->cfebActive(); };
46
unsigned
crateID
()
const
{
return
theHeaderFormat
->crateID(); };
47
unsigned
dmbID
()
const
{
return
theHeaderFormat
->dmbID(); };
48
unsigned
bxn
()
const
{
return
theHeaderFormat
->bxn(); };
49
unsigned
bxn12
()
const
{
return
theHeaderFormat
->bxn12(); };
50
unsigned
l1a
()
const
{
return
theHeaderFormat
->l1a(); };
51
unsigned
l1a24
()
const
{
return
theHeaderFormat
->l1a24(); };
52
unsigned
cfebAvailable
()
const
{
return
theHeaderFormat
->cfebAvailable(); };
53
unsigned
nalct
()
const
{
return
theHeaderFormat
->nalct(); };
54
unsigned
nclct
()
const
{
return
theHeaderFormat
->nclct(); };
55
unsigned
cfebMovlp
()
const
{
return
theHeaderFormat
->cfebMovlp(); };
56
unsigned
dmbCfebSync
()
const
{
return
theHeaderFormat
->dmbCfebSync(); };
57
unsigned
activeDavMismatch
()
const
{
return
theHeaderFormat
->activeDavMismatch(); };
58
59
unsigned
sizeInWords
()
const
{
return
theHeaderFormat
->sizeInWords(); };
60
unsigned
format_version
()
const
{
return
theHeaderFormat
->format_version(); };
61
62
bool
check
()
const
{
return
theHeaderFormat
->check(); };
63
64
unsigned
short
*
data
() {
return
theHeaderFormat
->data(); };
65
unsigned
short
*
data
()
const
{
return
theHeaderFormat
->data(); };
66
67
68
//ostream & operator<<(ostream &, const CSCDMBHeader &);
69
71
CSCDMBHeader2005
dmbHeader2005
()
const
;
72
CSCDMBHeader2013
dmbHeader2013
()
const
;
73
74
75
private
:
76
77
boost::shared_ptr<CSCVDMBHeaderFormat>
theHeaderFormat
;
78
int
theFirmwareVersion
;
79
80
81
};
82
83
#endif
84
CSCDMBHeader::theFirmwareVersion
int theFirmwareVersion
Definition:
CSCDMBHeader.h:78
CSCDMBHeader::check
bool check() const
Definition:
CSCDMBHeader.h:62
CSCDMBHeader2013
Definition:
CSCDMBHeader2013.h:44
CSCDMBHeader::l1a
unsigned l1a() const
Definition:
CSCDMBHeader.h:50
CSCDMBHeader::l1a24
unsigned l1a24() const
Definition:
CSCDMBHeader.h:51
CSCDMBHeader::nclct
unsigned nclct() const
Definition:
CSCDMBHeader.h:54
CSCDMBHeader::cfebActive
unsigned cfebActive() const
Definition:
CSCDMBHeader.h:45
CSCDMBHeader::addNCLCT
void addNCLCT()
Definition:
CSCDMBHeader.h:35
CSCVDMBHeaderFormat.h
relval_steps.version
string version
Definition:
relval_steps.py:1415
assert
assert(m_qm.get())
CSCDMBHeader::nalct
unsigned nalct() const
Definition:
CSCDMBHeader.h:53
CSCDMBHeader::setdmbVersion
void setdmbVersion(unsigned int version)
Definition:
CSCDMBHeader.h:43
CSCDMBHeader::setL1A
void setL1A(int l1a)
Definition:
CSCDMBHeader.h:39
CSCDMBHeader::cfebMovlp
unsigned cfebMovlp() const
Definition:
CSCDMBHeader.h:55
CSCDMBHeader::theHeaderFormat
boost::shared_ptr< CSCVDMBHeaderFormat > theHeaderFormat
Definition:
CSCDMBHeader.h:77
CSCDMBHeader::setBXN
void setBXN(int bxn)
Definition:
CSCDMBHeader.h:38
CSCDMBHeader::dmbHeader2005
CSCDMBHeader2005 dmbHeader2005() const
will throw if the cast fails
Definition:
CSCDMBHeader.cc:30
CSCDMBStatusDigi
Definition:
CSCDMBStatusDigi.h:15
CSCDMBHeader::CSCDMBHeader
CSCDMBHeader(const CSCDMBStatusDigi &digi)
Definition:
CSCDMBHeader.h:22
CSCDMBHeader::sizeInWords
unsigned sizeInWords() const
Definition:
CSCDMBHeader.h:59
CSCDMBHeader::dmbHeader2013
CSCDMBHeader2013 dmbHeader2013() const
Definition:
CSCDMBHeader.cc:40
CSCDMBHeader::addCFEB
void addCFEB(int icfeb)
Definition:
CSCDMBHeader.h:34
CSCDMBStatusDigi.h
CSCDMBHeader::bxn12
unsigned bxn12() const
Definition:
CSCDMBHeader.h:49
CSCDMBHeader::setCrateAddress
void setCrateAddress(int crate, int dmbId)
Definition:
CSCDMBHeader.h:41
CSCDMBHeader::format_version
unsigned format_version() const
Definition:
CSCDMBHeader.h:60
CSCDMBHeader::crateID
unsigned crateID() const
Definition:
CSCDMBHeader.h:46
CSCDMBHeader::bxn
unsigned bxn() const
Definition:
CSCDMBHeader.h:48
Exception.h
CSCDMBHeader::data
unsigned short * data()
Definition:
CSCDMBHeader.h:64
CSCDMBHeader::CSCDMBHeader
CSCDMBHeader(uint16_t firmware_version=2005)
Definition:
CSCDMBHeader.cc:8
CSCDMBHeader::setL1A24
void setL1A24(int l1a)
Definition:
CSCDMBHeader.h:40
CSCDMBHeader::cfebAvailable
unsigned cfebAvailable() const
Definition:
CSCDMBHeader.h:52
CSCDMBHeader::data
unsigned short * data() const
Definition:
CSCDMBHeader.h:65
CSCDMBHeader::dmbID
unsigned dmbID() const
Definition:
CSCDMBHeader.h:47
CSCDMBHeader::activeDavMismatch
unsigned activeDavMismatch() const
Definition:
CSCDMBHeader.h:57
CSCDMBHeader2005
Definition:
CSCDMBHeader2005.h:10
CSCDMBHeader::addNALCT
void addNALCT()
Definition:
CSCDMBHeader.h:37
CSCDMBHeader::dmbCfebSync
unsigned dmbCfebSync() const
Definition:
CSCDMBHeader.h:56
CSCDMBHeader::cfebAvailable
bool cfebAvailable(unsigned icfeb)
Definition:
CSCDMBHeader.h:29
CSCDMBHeader::setdmbID
void setdmbID(int newDMBID)
Definition:
CSCDMBHeader.h:42
CSCDMBStatusDigi::header
const uint16_t * header() const
Data Accessors.
Definition:
CSCDMBStatusDigi.h:26
CSCDMBHeader
Definition:
CSCDMBHeader.h:15
Generated for CMSSW Reference Manual by
1.8.5