ATLAS Offline Software
Loading...
Searching...
No Matches
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>
11class TileDigits;
12class TileHWID;
13
19
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
97};
98
99#endif
double length(const pvec &v)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
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>
uint32_t checkParity(const uint32_t *data, int length) const
Verify parity for <length> words.
bool checkWordParity(const uint32_t *data) const
Verify ODD parity for one word.
int getBCID(const uint32_t *data, int chipCount, int wordsPerChip) const
Get BCID from Chip header, bit 0-11.
std::array< std::vector< float >, 3 > getDigits(const uint32_t *data, int dataWordsPerChip) const
Extract samples(digits) for 3 channels, stored in 9 words.
void setVerbose(bool verbose)
int getBytes(const TileDigits *digi, const TileHWID *tileHWID, std::vector< unsigned int > &v)
uint32_t calculateParity(const uint32_t *data) const
Calculate parity for one word.
int getGain(const uint32_t *data, int chan) const
Extract gain for <chip> in chip header.
int getDigiMode(const uint32_t *data, int chipCount, int wordsPerChip) const
Determine digitizer mode for a number of channels.
Helper class for TileCal online (hardware) identifiers.
Definition TileHWID.h:49
bool verbose
Definition hcg.cxx:73