EventFilter
CTPPSRawToDigi
interface
CTPPSTotemDataFormatter.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* This is a part of the TOTEM offline software.
4
* Authors:
5
*
6
****************************************************************************/
7
8
#ifndef EventFilter_CTPPSRawToDigi_CTPPSTotemDataFormatter_h
9
#define EventFilter_CTPPSRawToDigi_CTPPSTotemDataFormatter_h
10
11
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
12
#include "
DataFormats/Common/interface/DetSetVector.h
"
13
14
#include "
CondFormats/PPSObjects/interface/TotemDAQMapping.h
"
15
16
#include "
DataFormats/CTPPSDigi/interface/TotemRPDigi.h
"
17
#include "
DataFormats/CTPPSDigi/interface/TotemVFATStatus.h
"
18
#include "
DataFormats/CTPPSDigi/interface/CTPPSDiamondDigi.h
"
19
20
#include "
FWCore/Utilities/interface/typedefs.h
"
21
#include "
DataFormats/FEDRawData/interface/FEDRawData.h
"
22
#include "
DataFormats/FEDRawData/interface/FEDHeader.h
"
23
#include "
DataFormats/FEDRawData/interface/FEDTrailer.h
"
24
#include <cstdint>
25
#include <vector>
26
#include <map>
27
#include "
FWCore/Framework/interface/ESHandle.h
"
28
#include "
DataFormats/CTPPSDigi/interface/TotemVFATStatus.h
"
29
#include "
EventFilter/CTPPSRawToDigi/interface/VFATFrame.h
"
30
#include "
FWCore/Framework/interface/EventSetup.h
"
31
32
//brief Collection of code to convert TOTEM raw data into digi.
33
34
class
FEDRawData
;
35
class
CTPPSTotemDigiToRaw
;
36
37
class
CTPPSTotemDataFormatter
{
38
private
:
39
typedef
uint16_t
Word16
;
40
typedef
uint32_t
Word32
;
41
typedef
uint64_t
Word64
;
42
43
int
m_WordCounter
;
44
int
m_DigiCounter
;
45
46
public
:
47
typedef
std::unordered_map<int, FEDRawData>
RawData
;
48
typedef
std::vector<TotemRPDigi>
DetDigis
;
49
typedef
std::unordered_map<cms_uint32_t, DetDigis>
Digis
;
50
51
CTPPSTotemDataFormatter
(std::map<TotemFramePosition, TotemVFATInfo>
const
&
mapping
);
52
53
int
nWords
()
const
{
return
m_WordCounter
; }
54
int
nDigis
()
const
{
return
m_DigiCounter
; }
55
56
struct
PPSStripIndex
{
57
uint32_t
id
;
58
unsigned
int
hwid
;
59
short
unsigned
int
fedid
;
60
short
unsigned
int
idxinfiber
;
61
short
unsigned
int
gohid
;
62
};
63
64
void
formatRawData
(
unsigned
int
lvl1_ID,
65
RawData
&
fedRawData
,
66
const
Digis
& digis,
67
std::vector<PPSStripIndex> v_iDdet2fed);
68
69
static
bool
compare
(
const
PPSStripIndex
&
a
,
const
PPSStripIndex
&
b
) {
return
a
.id <
b
.id; }
70
71
std::string
print
(
const
Word64
&
word
)
const
;
72
};
73
74
#endif
CTPPSTotemDataFormatter::CTPPSTotemDataFormatter
CTPPSTotemDataFormatter(std::map< TotemFramePosition, TotemVFATInfo > const &mapping)
Definition:
CTPPSTotemDataFormatter.cc:31
CTPPSTotemDataFormatter::PPSStripIndex::idxinfiber
short unsigned int idxinfiber
Definition:
CTPPSTotemDataFormatter.h:60
ESHandle.h
CTPPSTotemDigiToRaw
Definition:
CTPPSTotemDigiToRaw.cc:59
TotemDAQMapping.h
CTPPSTotemDataFormatter::PPSStripIndex::gohid
short unsigned int gohid
Definition:
CTPPSTotemDataFormatter.h:61
CTPPSTotemDataFormatter::nDigis
int nDigis() const
Definition:
CTPPSTotemDataFormatter.h:54
CTPPSTotemDataFormatter::Digis
std::unordered_map< cms_uint32_t, DetDigis > Digis
Definition:
CTPPSTotemDataFormatter.h:49
CTPPSTotemDataFormatter::PPSStripIndex
Definition:
CTPPSTotemDataFormatter.h:56
CTPPSTotemDataFormatter::PPSStripIndex::hwid
unsigned int hwid
Definition:
CTPPSTotemDataFormatter.h:58
FEDRawData.h
FEDRawData
Definition:
FEDRawData.h:19
word
uint64_t word
Definition:
CTPPSTotemDataFormatter.cc:29
CTPPSTotemDataFormatter::m_DigiCounter
int m_DigiCounter
Definition:
CTPPSTotemDataFormatter.h:44
l1t_dqm_sourceclient-live_cfg.fedRawData
fedRawData
Definition:
l1t_dqm_sourceclient-live_cfg.py:188
CTPPSDiamondDigi.h
typedefs.h
b
double b
Definition:
hdecay.h:118
CTPPSTotemDataFormatter::RawData
std::unordered_map< int, FEDRawData > RawData
Definition:
CTPPSTotemDataFormatter.h:47
TotemVFATStatus.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSTotemDataFormatter::Word32
uint32_t Word32
Definition:
CTPPSTotemDataFormatter.h:40
a
double a
Definition:
hdecay.h:119
CTPPSTotemDataFormatter::print
std::string print(const Word64 &word) const
CTPPSTotemDataFormatter::m_WordCounter
int m_WordCounter
Definition:
CTPPSTotemDataFormatter.h:43
Word64
uint64_t Word64
Definition:
RPCUnpackingModule.cc:38
VFATFrame.h
CTPPSTotemDataFormatter::compare
static bool compare(const PPSStripIndex &a, const PPSStripIndex &b)
Definition:
CTPPSTotemDataFormatter.h:69
CTPPSTotemDataFormatter::Word16
uint16_t Word16
Definition:
CTPPSTotemDataFormatter.h:39
CTPPSTotemDataFormatter::PPSStripIndex::fedid
short unsigned int fedid
Definition:
CTPPSTotemDataFormatter.h:59
CTPPSTotemDataFormatter::nWords
int nWords() const
Definition:
CTPPSTotemDataFormatter.h:53
CTPPSTotemDataFormatter::DetDigis
std::vector< TotemRPDigi > DetDigis
Definition:
CTPPSTotemDataFormatter.h:48
DetSetVector.h
CTPPSTotemDataFormatter::Word64
uint64_t Word64
Definition:
CTPPSTotemDataFormatter.h:41
CTPPSTotemDataFormatter::PPSStripIndex::id
uint32_t id
Definition:
CTPPSTotemDataFormatter.h:57
EventSetup.h
cond::uint64_t
unsigned long long uint64_t
Definition:
Time.h:13
CTPPSTotemDataFormatter
Definition:
CTPPSTotemDataFormatter.h:37
ParameterSet.h
TotemRPDigi.h
FEDHeader.h
taus_updatedMVAIds_cff.mapping
mapping
Definition:
taus_updatedMVAIds_cff.py:28
CTPPSTotemDataFormatter::formatRawData
void formatRawData(unsigned int lvl1_ID, RawData &fedRawData, const Digis &digis, std::vector< PPSStripIndex > v_iDdet2fed)
Definition:
CTPPSTotemDataFormatter.cc:43
FEDTrailer.h
Generated for CMSSW Reference Manual by
1.8.16