ATLAS Offline Software
FibrePackerBase.h
Go to the documentation of this file.
1 
2 #ifndef FIBRE_PACKER_BASE_H
3 #define FIBRE_PACKER_BASE_H
4 
5 #include <vector>
6 #include <cstddef>
7 #include <cstdint>
8 
10 
21 public:
23  virtual ~FibrePackerBase() {}
24 
26 
27  /*
28  * \brief comma characters definition
29  */
31  myDataWord K_28_1 = 0x3c;
32  myDataWord K_28_0 = 0x1c;
33 
37  enum class InputDataFrameType {
38  Normal,
39  Alignement
40  };
41 
45  virtual myDataWord crc9full(const std::vector<myDataWord>& inwords, size_t num_bits ) const;
46  virtual myDataWord crc9d32(const std::vector<myDataWord>& inwords, size_t num_words, bool bit_reverse) const;
47  virtual myDataWord crc9d23(myDataWord inword,myDataWord in_crc, bool bit_reverse) const;
48 
52  virtual std::vector<myDataWord> getPackedData(const std::vector<myDataWord>& inFrame,myDataWord bcNumber, InputDataFrameType frameType) const = 0;
53 
63  virtual std::vector<myDataWord> getPackedControl(const std::vector<myDataWord>& inFrame,myDataWord bcNumber, InputDataFrameType frameType) const = 0;
64 
65  virtual bool checkCRC(const std::vector<myDataWord>& encodedData, InputDataFrameType frameType) const = 0;
66  virtual myDataWord getBcNumber(const std::vector<myDataWord>& encodedData, InputDataFrameType frameType) const = 0;
67  virtual myDataWord getBcMask(InputDataFrameType frameType) const = 0;
68  virtual std::vector<myDataWord> getUnpackedData(const std::vector<myDataWord>& encodedData, InputDataFrameType frameType) const = 0;
69 
70 private:
71 
72 };
73 
74 #endif
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
FibrePackerBase::getPackedControl
virtual std::vector< myDataWord > getPackedControl(const std::vector< myDataWord > &inFrame, myDataWord bcNumber, InputDataFrameType frameType) const =0
Function returning control words.
FibrePackerBase::getBcNumber
virtual myDataWord getBcNumber(const std::vector< myDataWord > &encodedData, InputDataFrameType frameType) const =0
FibrePackerBase::FibrePackerBase
FibrePackerBase()
Basic class for FEX input data packers.
Definition: FibrePackerBase.h:22
FibrePackerBase::K_28_5
myDataWord K_28_5
Definition: FibrePackerBase.h:30
FibrePackerBase::crc9full
virtual myDataWord crc9full(const std::vector< myDataWord > &inwords, size_t num_bits) const
Functions calculating CRC over input data.
Definition: FibrePackerBase.cxx:8
FibrePackerBase::K_28_1
myDataWord K_28_1
Definition: FibrePackerBase.h:31
FibrePackerBase::K_28_0
myDataWord K_28_0
Definition: FibrePackerBase.h:32
FibrePackerBase::crc9d32
virtual myDataWord crc9d32(const std::vector< myDataWord > &inwords, size_t num_words, bool bit_reverse) const
Definition: FibrePackerBase.cxx:37
FibrePackerBase::getPackedData
virtual std::vector< myDataWord > getPackedData(const std::vector< myDataWord > &inFrame, myDataWord bcNumber, InputDataFrameType frameType) const =0
Function taking SC energies and other stuff and packing them into a data packet.
FibrePackerBase::~FibrePackerBase
virtual ~FibrePackerBase()
Definition: FibrePackerBase.h:23
FibrePackerBase::getUnpackedData
virtual std::vector< myDataWord > getUnpackedData(const std::vector< myDataWord > &encodedData, InputDataFrameType frameType) const =0
FibrePackerBase::checkCRC
virtual bool checkCRC(const std::vector< myDataWord > &encodedData, InputDataFrameType frameType) const =0
FibrePackerBase::InputDataFrameType::Alignement
@ Alignement
Special mapping/alignement frame.
FibrePackerBase::InputDataFrameType
InputDataFrameType
type of input data frame
Definition: FibrePackerBase.h:37
FibrePackerBase::myDataWord
uint32_t myDataWord
Definition: FibrePackerBase.h:25
FibrePackerBase
Definition: FibrePackerBase.h:9
FibrePackerBase::getBcMask
virtual myDataWord getBcMask(InputDataFrameType frameType) const =0
FibrePackerBase::crc9d23
virtual myDataWord crc9d23(myDataWord inword, myDataWord in_crc, bool bit_reverse) const
Definition: FibrePackerBase.cxx:108
FibrePackerBase::InputDataFrameType::Normal
@ Normal
Standard data frame.