src
EventFilter
CSCTFRawToDigi
src
CSCTFEvent.h
Go to the documentation of this file.
1
#ifndef CSCTFEvent_h
2
#define CSCTFEvent_h
3
4
#include "
EventFilter/CSCTFRawToDigi/src/CSCSPEvent.h
"
5
#include <vector>
6
7
class
CSCTFEvent
{
8
private
:
9
CSCSPEvent
sp
[12];
10
int
nRecords
;
11
12
public
:
13
// Before we do unpacking, we need to do basic TF format checks (TF Binary Examiner)
14
enum
{
15
MISSING_HEADER
= 0x2,
16
MISSING_TRAILER
= 0x4,
17
OUT_OF_BUFFER
= 0x8,
18
WORD_COUNT
= 0x10,
19
CONFIGURATION
= 0x20,
20
NONSENSE
= 0x40
21
};
22
23
std::vector<CSCSPEvent>
SPs
(
void
)
const
throw
() {
24
std::vector<CSCSPEvent>
result
;
25
result
.reserve(
nRecords
);
26
for
(
int
spNum = 0; spNum <
nRecords
; spNum++)
27
result
.push_back(
sp
[spNum]);
28
return
result
;
29
}
30
31
// Faster analog of the previous function:
32
std::vector<const CSCSPEvent *>
SPs_fast
(
void
)
const
throw
() {
33
std::vector<const CSCSPEvent *> retval;
34
retval.clear();
35
retval.reserve(
nRecords
);
36
for
(
int
spNum = 0; spNum <
nRecords
; spNum++)
37
retval.push_back(
sp
+ spNum);
38
return
retval;
39
}
40
41
unsigned
int
unpack
(
const
unsigned
short
*
buf
,
unsigned
int
length);
42
43
CSCTFEvent
(
void
) {}
44
};
45
46
#endif
CSCTFEvent::WORD_COUNT
Definition:
CSCTFEvent.h:18
CSCTFEvent::unpack
unsigned int unpack(const unsigned short *buf, unsigned int length)
Definition:
CSCTFEvent.cc:6
CSCTFEvent::SPs_fast
std::vector< const CSCSPEvent * > SPs_fast(void) const
Definition:
CSCTFEvent.h:32
CSCTFEvent::MISSING_TRAILER
Definition:
CSCTFEvent.h:16
mps_fire.result
result
Definition:
mps_fire.py:311
CSCTFEvent::SPs
std::vector< CSCSPEvent > SPs(void) const
Definition:
CSCTFEvent.h:23
CSCTFEvent::CSCTFEvent
CSCTFEvent(void)
Definition:
CSCTFEvent.h:43
visDQMUpload.buf
buf
Definition:
visDQMUpload.py:153
CSCSPEvent.h
CSCTFEvent::MISSING_HEADER
Definition:
CSCTFEvent.h:15
CSCTFEvent::OUT_OF_BUFFER
Definition:
CSCTFEvent.h:17
CSCTFEvent
Definition:
CSCTFEvent.h:7
CSCTFEvent::NONSENSE
Definition:
CSCTFEvent.h:20
CSCTFEvent::sp
CSCSPEvent sp[12]
Definition:
CSCTFEvent.h:9
CSCTFEvent::CONFIGURATION
Definition:
CSCTFEvent.h:19
CSCTFEvent::nRecords
int nRecords
Definition:
CSCTFEvent.h:10
CSCSPEvent
Definition:
CSCSPEvent.h:9
Generated for CMSSW Reference Manual by
1.8.14