ATLAS Offline Software
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 
12 class L1CaloRdoEfexTob;
13 class L1CaloRdoEfexTower;
14 class L1CaloRdoGfexTob;
15 class L1CaloRdoGfexTower;
16 class L1CaloRdoJfexTob;
17 class L1CaloRdoJfexTower;
18 class L1CaloRdoMuonTob; // **FIXME** Different class for run 3?
19 class L1CaloRdoPh1TopoHit;
20 class L1CaloRdoRodInfo;
21 
23 {
24 public:
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 
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 
104 private:
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 
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 
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
L1CaloBsDecoderRun3::decodeEfexData
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.
Definition: L1CaloBsDecoderRun3.cxx:85
L1CaloRdoEfexTower
Definition: L1CaloRdoEfexTower.h:10
L1CaloBsDecoderRun3::decodeGfexData
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.
Definition: L1CaloBsDecoderRun3.cxx:1184
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
L1CaloBsDecoderRun3::Logging
Interface class for logging, can be overriden to e.g.
Definition: L1CaloBsDecoderRun3.h:31
L1CaloBsDecoderRun3::m_logger
std::unique_ptr< Logging > m_logger
Definition: L1CaloBsDecoderRun3.h:136
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
L1CaloBsDecoderRun3::Logging::err
virtual void err(const std::string &location, const std::string &title, const std::string &detail) const
Definition: L1CaloBsDecoderRun3.h:34
index
Definition: index.py:1
L1CaloBsDecoderRun3::setVerbosity
void setVerbosity(bool verbosity)
L1CaloBsDecoderRun3::decodeJfexDataChan
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).
Definition: L1CaloBsDecoderRun3.cxx:766
L1CaloBsDecoderRun3::setLogger
void setLogger(std::unique_ptr< Logging > &&logger)
Definition: L1CaloBsDecoderRun3.h:40
L1Topo::blockType
L1Topo::BlockTypes blockType(const uint32_t word, uint32_t offset=28, uint32_t size=0x0f)
Function to return the block type of a data word from L1Topo
Definition: BlockTypes.cxx:9
L1CaloBsDecoderRun3::m_verbosity
int m_verbosity
Definition: L1CaloBsDecoderRun3.h:135
detail
Definition: extract_histogram_tag.cxx:14
L1CaloBsDecoderRun3::decodeOneEfexTob
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.
Definition: L1CaloBsDecoderRun3.cxx:594
L1CaloBsDecoderRun3::decodeGfexTobs
void decodeGfexTobs(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoGfexTob > &dat, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode gFEX TOBs.
Definition: L1CaloBsDecoderRun3.cxx:1393
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
L1CaloRdoRodInfo
Definition: L1CaloRdoRodInfo.h:11
L1CaloRdoEfexTob
Definition: L1CaloRdoEfexTob.h:10
L1CaloBsDecoderRun3::Logging::~Logging
virtual ~Logging()=default
python.sizes.location
string location
Definition: sizes.py:11
covarianceTool.title
title
Definition: covarianceTool.py:542
L1CaloBsDecoderRun3::decodeGfexTobSlice
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.
Definition: L1CaloBsDecoderRun3.cxx:1463
L1CaloBsDecoderRun3::decodeJfexTobSlice
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.
Definition: L1CaloBsDecoderRun3.cxx:988
L1CaloBsDecoderRun3::decodeJfexData
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.
Definition: L1CaloBsDecoderRun3.cxx:695
L1CaloRdoFexTob::TobSource
TobSource
Definition: L1CaloRdoFexTob.h:15
WriteBchToCool.beg
beg
Definition: WriteBchToCool.py:69
L1CaloBsDecoderRun3::decodePh1TopoData
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.
Definition: L1CaloBsDecoderRun3.cxx:1549
covarianceTool.verbosity
verbosity
Definition: covarianceTool.py:513
L1CaloBsDecoderRun3::decodeJfexTobs
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.
Definition: L1CaloBsDecoderRun3.cxx:905
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
L1CaloBsDecoderRun3::checkFibreCRC
bool checkFibreCRC(std::vector< uint32_t > &data) const
Check the CRC in an input fibre block of words.
Definition: L1CaloBsDecoderRun3.cxx:669
L1CaloBsDecoderRun3::decodeGfexDataChan
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).
Definition: L1CaloBsDecoderRun3.cxx:1260
L1CaloBsDecoderRun3::decodeEfexDataChan
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).
Definition: L1CaloBsDecoderRun3.cxx:187
L1CaloBsDecoderRun3::L1CaloBsDecoderRun3
L1CaloBsDecoderRun3()
Definition: L1CaloBsDecoderRun3.cxx:48
L1CaloBsDecoderRun3::decodeEfexTobSlice
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.
Definition: L1CaloBsDecoderRun3.cxx:487
L1CaloRdoFexTob.h
L1CaloBsDecoderRun3::decodePh1TopoHits
void decodePh1TopoHits(const uint32_t *beg, const uint32_t *end, std::list< L1CaloRdoPh1TopoHit > &hit, std::list< L1CaloRdoRodInfo >::const_iterator rodInfo)
Decode Ph1Topo hit results.
Definition: L1CaloBsDecoderRun3.cxx:1674
L1CaloBsDecoderRun3
Definition: L1CaloBsDecoderRun3.h:23
python.iconfTool.gui.pad.logger
logger
Definition: pad.py:14
L1CaloRdoFexTob::TobType
TobType
Definition: L1CaloRdoFexTob.h:14
L1CaloBsDecoderRun3::decodeEfexTobs
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.
Definition: L1CaloBsDecoderRun3.cxx:363