ATLAS Offline Software
TileDigits2Bytes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILEBYTESTREAM_TILEDIGITS2BYTES_H
6 #define TILEBYTESTREAM_TILEDIGITS2BYTES_H
7 
8 #include <vector>
9 #include <stdint.h>
10 #include <array>
11 class TileDigits;
12 class TileHWID;
13 
21 
22  public:
23 
25  int getBytes(const TileDigits* digi, const TileHWID* tileHWID, std::vector<unsigned int>& v);
30  std::array< std::vector<float>, 3 > getDigits(const uint32_t *data, int dataWordsPerChip) const;
38  int getBCID(const uint32_t *data, int chipCount, int wordsPerChip) const;
39 
48  int getDigiMode(const uint32_t *data, int chipCount, int wordsPerChip) const;
49 
56  int getGain(const uint32_t *data, int chan) const;
57 
63  inline bool checkWordParity(const uint32_t *data) const;
64 
70  inline uint32_t calculateParity(const uint32_t *data) const;
71 
80  inline uint32_t checkParity(const uint32_t *data, int length) const;
81 
90  inline bool checkStartBit(const uint32_t *data, int length, uint32_t startbit) const;
91 
92  inline void setVerbose(bool verbose) { m_verbose=verbose; }
93 
94  private:
95 
96  bool m_verbose;
97 };
98 
99 #endif
TileDigits2Bytes::TileDigits2Bytes
TileDigits2Bytes()
Definition: TileDigits2Bytes.h:24
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TileDigits2Bytes::setVerbose
void setVerbose(bool verbose)
Definition: TileDigits2Bytes.h:92
TileDigits2Bytes::getBCID
int getBCID(const uint32_t *data, int chipCount, int wordsPerChip) const
Get BCID from Chip header, bit 0-11.
Definition: TileDigits2Bytes.cxx:65
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileDigits2Bytes::checkStartBit
bool checkStartBit(const uint32_t *data, int length, uint32_t startbit) const
Check that the MSB of <length> words are equal to LSB of <startbit>
Definition: TileDigits2Bytes.cxx:162
TileDigits2Bytes::getBytes
int getBytes(const TileDigits *digi, const TileHWID *tileHWID, std::vector< unsigned int > &v)
Definition: TileDigits2Bytes.cxx:12
TileDigits2Bytes::calculateParity
uint32_t calculateParity(const uint32_t *data) const
Calculate parity for one word.
Definition: TileDigits2Bytes.cxx:133
TileDigits2Bytes::checkWordParity
bool checkWordParity(const uint32_t *data) const
Verify ODD parity for one word.
Definition: TileDigits2Bytes.cxx:128
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileDigits2Bytes::getGain
int getGain(const uint32_t *data, int chan) const
Extract gain for <chip> in chip header.
Definition: TileDigits2Bytes.cxx:56
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
TileDigits2Bytes::checkParity
uint32_t checkParity(const uint32_t *data, int length) const
Verify parity for <length> words.
Definition: TileDigits2Bytes.cxx:145
TileDigits2Bytes::getDigiMode
int getDigiMode(const uint32_t *data, int chipCount, int wordsPerChip) const
Determine digitizer mode for a number of channels.
Definition: TileDigits2Bytes.cxx:89
TileDigits2Bytes::m_verbose
bool m_verbose
Definition: TileDigits2Bytes.h:96
TileDigits
Definition: TileDigits.h:30
TileDigits2Bytes::getDigits
std::array< std::vector< float >, 3 > getDigits(const uint32_t *data, int dataWordsPerChip) const
Extract samples(digits) for 3 channels, stored in 9 words.
Definition: TileDigits2Bytes.cxx:35
python.PyAthena.v
v
Definition: PyAthena.py:154
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
TileDigits2Bytes
This class converts TileDigits to and from bytestream in ROD format.
Definition: TileDigits2Bytes.h:20
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26