src
EventFilter
EcalTBRawToDigi
src
CamacTBDataFormatter.h
Go to the documentation of this file.
1
#ifndef CamacTBDataFormatter_H
2
#define CamacTBDataFormatter_H
3
9
#include <vector>
10
#include <iostream>
11
12
#include "
FWCore/ServiceRegistry/interface/Service.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
15
#include <
TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopePlaneRawHits.h
>
16
#include <
TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopeRawInfo.h
>
17
#include <
TBDataFormats/EcalTBObjects/interface/EcalTBTDCRawInfo.h
>
18
#include <
TBDataFormats/EcalTBObjects/interface/EcalTBEventHeader.h
>
19
#include <
DataFormats/FEDRawData/interface/FEDRawData.h
>
20
21
#include "
TBDataFormats/EcalTBObjects/interface/EcalTBTDCSample.h
"
22
23
class
CamacTBDataFormatter
{
24
public
:
25
CamacTBDataFormatter
();
26
virtual
~CamacTBDataFormatter
() {
27
LogDebug
(
"EcalTBRawToDigi"
) <<
"@SUB=CamacTBDataFormatter"
28
<<
"\n"
;
29
};
30
31
void
interpretRawData
(
const
FEDRawData
&
data
,
32
EcalTBEventHeader
& tbEventHeader,
33
EcalTBHodoscopeRawInfo
& hodoRaw,
34
EcalTBTDCRawInfo
& tdcRawInfo);
35
36
// for tests based on standalone file
37
/* void interpretRawData(unsigned long * buffer, unsigned long bufferSize, */
38
/* EcalTBEventHeader& tbEventHeader, */
39
/* EcalTBHodoscopeRawInfo & hodo, */
40
/* EcalTBTDCRawInfo & tdc); */
41
42
private
:
43
bool
checkStatus
(
unsigned
long
word
,
int
wordNumber);
44
45
int
nWordsPerEvent
;
// Number of fibers per hodoscope plane
46
47
static
const
int
nHodoFibers
= 64;
// Number of fibers per hodoscope plane
48
static
const
int
nHodoscopes
= 2;
// Number of different mappings between fiber and electronics
49
static
const
int
nHodoPlanes
= 4;
// Number of hodoscopes along the beam
50
static
const
int
hodoRawLen
= 4;
// The raw data is stored as 4 integers for each hodo plane
51
52
int
nHodoHits
[
nHodoPlanes
];
53
int
hodoHits
[
nHodoPlanes
][
nHodoFibers
];
54
int
hodoAll
[
nHodoPlanes
*
nHodoFibers
];
55
bool
statusWords
[148 + 4];
56
57
std::vector<int>
scalers_
;
58
};
59
#endif
EcalTBTDCRawInfo.h
CamacTBDataFormatter::nHodoHits
int nHodoHits[nHodoPlanes]
Definition:
CamacTBDataFormatter.h:52
MessageLogger.h
EcalTBHodoscopeRawInfo.h
CamacTBDataFormatter::scalers_
std::vector< int > scalers_
Definition:
CamacTBDataFormatter.h:57
EcalTBHodoscopePlaneRawHits.h
EcalTBTDCRawInfo
Definition:
EcalTBTDCRawInfo.h:13
CamacTBDataFormatter::hodoAll
int hodoAll[nHodoPlanes *nHodoFibers]
Definition:
CamacTBDataFormatter.h:54
word
uint64_t word
Definition:
CTPPSTotemDataFormatter.cc:29
FEDRawData
Definition:
FEDRawData.h:19
EcalTBHodoscopeRawInfo
Definition:
EcalTBHodoscopeRawInfo.h:13
CamacTBDataFormatter::checkStatus
bool checkStatus(unsigned long word, int wordNumber)
Definition:
CamacTBDataFormatter.cc:479
CamacTBDataFormatter
Definition:
CamacTBDataFormatter.h:23
Service.h
EcalTBEventHeader
Definition:
EcalTBEventHeader.h:14
CamacTBDataFormatter::nHodoFibers
static const int nHodoFibers
Definition:
CamacTBDataFormatter.h:47
EcalTBEventHeader.h
CamacTBDataFormatter::hodoHits
int hodoHits[nHodoPlanes][nHodoFibers]
Definition:
CamacTBDataFormatter.h:53
CamacTBDataFormatter::nHodoscopes
static const int nHodoscopes
Definition:
CamacTBDataFormatter.h:48
CamacTBDataFormatter::nHodoPlanes
static const int nHodoPlanes
Definition:
CamacTBDataFormatter.h:49
data
char data[epos_bytes_allocation]
Definition:
EPOS_Wrapper.h:80
FEDRawData.h
CamacTBDataFormatter::~CamacTBDataFormatter
virtual ~CamacTBDataFormatter()
Definition:
CamacTBDataFormatter.h:26
CamacTBDataFormatter::CamacTBDataFormatter
CamacTBDataFormatter()
Definition:
CamacTBDataFormatter.cc:160
CamacTBDataFormatter::hodoRawLen
static const int hodoRawLen
Definition:
CamacTBDataFormatter.h:50
EcalTBTDCSample.h
CamacTBDataFormatter::nWordsPerEvent
int nWordsPerEvent
Definition:
CamacTBDataFormatter.h:45
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:241
CamacTBDataFormatter::interpretRawData
void interpretRawData(const FEDRawData &data, EcalTBEventHeader &tbEventHeader, EcalTBHodoscopeRawInfo &hodoRaw, EcalTBTDCRawInfo &tdcRawInfo)
Definition:
CamacTBDataFormatter.cc:162
CamacTBDataFormatter::statusWords
bool statusWords[148+4]
Definition:
CamacTBDataFormatter.h:55
Generated for CMSSW Reference Manual by
1.8.14