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