ATLAS Offline Software
Loading...
Searching...
No Matches
L1CaloBsDecoderRun3.h
Go to the documentation of this file.
1
2#ifndef L1CALO_BS_DECODER_RUN3_H
3#define L1CALO_BS_DECODER_RUN3_H
4
5#include <list>
6#include <stdint.h>
7
9#include <memory>
10#include <sstream>
11
14class L1CaloRdoGfexTob;
15class L1CaloRdoGfexTower;
16class L1CaloRdoJfexTob;
17class L1CaloRdoJfexTower;
18class L1CaloRdoMuonTob; // **FIXME** Different class for run 3?
19class L1CaloRdoPh1TopoHit;
21
23{
24public:
26
31 class Logging {
32 public:
33 virtual ~Logging() = default;
34 virtual void err(const std::string& location, const std::string& title, const std::string& detail) const {
35 std::cerr << "L1CaloBsDecoderRun3::" << location << " : " << title << " - " << detail << std::endl;
36 }
37 };
38
39 void setVerbosity( bool verbosity );
40 void setLogger( std::unique_ptr<Logging>&& logger ) { m_logger = std::move(logger); }
41
42
43 void decodeEfexData( const uint32_t* beg, const uint32_t* end,
44 std::list<L1CaloRdoEfexTower>& dat,
45 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo ) const;
46
47 void decodeEfexTobs( const uint32_t* beg, const uint32_t* end,
48 std::list<L1CaloRdoEfexTob>& tob,
49 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo ) const;
50
51 private:
52 void decodeOneEfexTob( const uint32_t word[], const uint32_t shelfNumber,
53 const uint32_t efexNumber, const uint32_t fpgaNumber,
54 const uint32_t errorMask,
55 const uint32_t numSlices, const uint32_t sliceNum,
58 std::list<L1CaloRdoEfexTob>& tob,
59 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo ) const;
60
61 uint32_t decodeEfexDataChan( const uint32_t payload[],
62 const uint32_t efexNumber,
63 const uint32_t shelfNumber,
64 const uint32_t errorMask,
65 std::list<L1CaloRdoEfexTower>& dat,
66 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo ) const;
67
68 bool decodeEfexTobSlice( const uint32_t payload[], size_t& index,
69 const uint32_t efexNumber, const uint32_t shelfNumber,
70 const uint32_t numSlices, const uint32_t errorMask,
71 std::list<L1CaloRdoEfexTob>& tob,
72 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo ) const;
73 public:
74
75
76#ifndef OFFLINE_DECODER
77 void decodeJfexData( const uint32_t* beg, const uint32_t* end,
78 std::list<L1CaloRdoJfexTower>& dat,
79 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
80
81 void decodeJfexTobs( const uint32_t* beg, const uint32_t* end,
82 std::list<L1CaloRdoJfexTob>& tob,
83 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
84
85 void decodeGfexData( const uint32_t* beg, const uint32_t* end,
86 std::list<L1CaloRdoGfexTower>& dat,
87 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
88
89 void decodeGfexTobs( const uint32_t* beg, const uint32_t* end,
90 std::list<L1CaloRdoGfexTob>& dat,
91 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
92
93 void decodePh1TopoData( const uint32_t* beg, const uint32_t* end,
94 std::list<L1CaloRdoEfexTob>& etob,
95 std::list<L1CaloRdoJfexTob>& jtob,
96 std::list<L1CaloRdoGfexTob>& gtob,
97 std::list<L1CaloRdoMuonTob>& mtob,
98 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
99
100 void decodePh1TopoHits( const uint32_t* beg, const uint32_t* end,
101 std::list<L1CaloRdoPh1TopoHit>& hit,
102 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
103
104private:
105 uint32_t decodeJfexDataChan( const uint32_t payload[],
106 const uint32_t jfexNumber,
107 const uint32_t fpgaNumber,
108 const uint32_t errorMask,
109 std::list<L1CaloRdoJfexTower>& dat,
110 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
111
112 bool decodeJfexTobSlice( const uint32_t payload[], size_t blockSize, size_t& index,
113 const uint32_t jfexNumber, const uint32_t fpgaNumber,
114 const uint32_t sliceNumber, const uint32_t numSlices,
115 const uint32_t errorMask,
116 std::list<L1CaloRdoJfexTob>& tob,
117 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
118
119 uint32_t decodeGfexDataChan( const uint32_t payload[],
120 const uint32_t fpgaNumber,
121 const uint32_t chanNumber,
122 const uint32_t errorMask,
123 std::list<L1CaloRdoGfexTower>& dat,
124 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
125
126 bool decodeGfexTobSlice( const uint32_t payload[], const uint32_t blockType,
127 const uint32_t sliceNumber, const uint32_t numSlices,
128 const uint32_t errorMask,
129 std::list<L1CaloRdoGfexTob>& tob,
130 std::list<L1CaloRdoRodInfo>::const_iterator rodInfo );
131#endif // OFFLINE_DECODER
132
133 bool checkFibreCRC( std::vector<uint32_t>& data ) const;
134
136 std::unique_ptr<Logging> m_logger;
137};
138
139#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Interface class for logging, can be overriden to e.g.
virtual ~Logging()=default
virtual void err(const std::string &location, const std::string &title, const std::string &detail) const
bool decodeEfexTobSlice(const uint32_t payload[], size_t &index, const uint32_t efexNumber, const uint32_t shelfNumber, const uint32_t numSlices, const uint32_t errorMask, std::list< L1CaloRdoEfexTob > &tob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo) const
Decode one eFEX FPGA block of TOBs and XTOBs for one slice.
uint32_t decodeGfexDataChan(const uint32_t payload[], const uint32_t fpgaNumber, const uint32_t chanNumber, const uint32_t errorMask, std::list< L1CaloRdoGfexTower > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode the data from one gFEX input fibre (only ever one slice).
void setLogger(std::unique_ptr< Logging > &&logger)
uint32_t decodeEfexDataChan(const uint32_t payload[], const uint32_t efexNumber, const uint32_t shelfNumber, const uint32_t errorMask, std::list< L1CaloRdoEfexTower > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo) const
Decode the data from one eFEX input fibre (only ever one slice).
void decodeJfexTobs(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoJfexTob > &tob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode jFEX TOBs and XTOBs.
void decodePh1TopoHits(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoPh1TopoHit > &hit, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode Ph1Topo hit results.
void decodePh1TopoData(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoEfexTob > &etob, std::list< L1CaloRdoJfexTob > &jtob, std::list< L1CaloRdoGfexTob > &gtob, std::list< L1CaloRdoMuonTob > &mtob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode Ph1Topo input data: these are TOBs from FEXes and MuCTPI.
void decodeGfexData(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoGfexTower > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode gFEX input fibre data.
bool checkFibreCRC(std::vector< uint32_t > &data) const
Check the CRC in an input fibre block of words.
void decodeOneEfexTob(const uint32_t word[], const uint32_t shelfNumber, const uint32_t efexNumber, const uint32_t fpgaNumber, const uint32_t errorMask, const uint32_t numSlices, const uint32_t sliceNum, L1CaloRdoFexTob::TobType tobType, L1CaloRdoFexTob::TobSource tobSource, std::list< L1CaloRdoEfexTob > &tob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo) const
Decode word(s) for one eFEX TOB (or xTOB) and create one RDO.
void decodeGfexTobs(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoGfexTob > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode gFEX TOBs.
void decodeJfexData(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoJfexTower > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode jFEX input fibre data.
bool decodeJfexTobSlice(const uint32_t payload[], size_t blockSize, size_t &index, const uint32_t jfexNumber, const uint32_t fpgaNumber, const uint32_t sliceNumber, const uint32_t numSlices, const uint32_t errorMask, std::list< L1CaloRdoJfexTob > &tob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode one jFEX FPGA block of TOBs and XTOBs for one slice.
void decodeEfexData(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoEfexTower > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo) const
Decode eFEX input fibre data.
uint32_t decodeJfexDataChan(const uint32_t payload[], const uint32_t jfexNumber, const uint32_t fpgaNumber, const uint32_t errorMask, std::list< L1CaloRdoJfexTower > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode the data from one jFEX input fibre (only ever one slice).
std::unique_ptr< Logging > m_logger
void setVerbosity(bool verbosity)
void decodeEfexTobs(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoEfexTob > &tob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo) const
Decode eFEX TOBs and XTOBs.
bool decodeGfexTobSlice(const uint32_t payload[], const uint32_t blockType, const uint32_t sliceNumber, const uint32_t numSlices, const uint32_t errorMask, std::list< L1CaloRdoGfexTob > &tob, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode one gFEX FPGA block of TOBs for one slice.
L1CaloRdoFexTob subclass for eFEX EM/Tau TOBs or XTOBs.
static Root::TMsgLogger logger("iLumiCalc")
Definition index.py:1