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