ATLAS Offline Software
ALFA_RawData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALFA_RAWDATA_H
6 #define ALFA_RAWDATA_H
7 
8 #include<stdint.h>
9 #include<vector>
10 #include <iostream>
11 
12 
18 class MsgStream;
19 
21 {
22  public:
23 
24  // Default constructor
25  ALFA_RawData();
26 
27  // Full constructor
28  ALFA_RawData(uint16_t PMF_number);
29 
30  ~ALFA_RawData();
31 
32  // set data members
33 
34  void SetWordId_PMF(uint16_t Word_number);
35  void SetPMFId_PMF(uint16_t PMF_number);
36  void SetMBId_PMF(uint16_t MB_number);
37  void SetEventCount_PMF(uint32_t Event_number);
38  void SetMarocChan_PMF(const std::vector<uint16_t>& MarocChan);
39  void PushBack_PMF(uint16_t fiber_hit);
40  void Set_error_bit17(bool bit);
41 
42  void SetZero_PMF();
43 
44 
45  // Add a data word to the vector
46  void addData(uint32_t dataWord); // from MUON to test
47 
48  // Methods to retrieve the decoded word content
49 
50  uint16_t GetWordId_PMF() const {return m_WordId;};
51  uint16_t GetPMFId_PMF() const {return m_PMFId;};
52  uint16_t GetMBId_PMF() const {return m_MBId;};
54  const std::vector<uint16_t>& GetMarocHit() const {return m_MarocChan;};
55  uint32_t Get_Chan(uint16_t Numchan) const {return m_MarocChan[Numchan];}; // used in SaraPkg
56  uint32_t GetSize() const {return m_MarocChan.size();};
57  uint16_t Get_bit26_27() const {return m_bit26_27;};
58  uint16_t Get_bit24_27() const {return m_bit24_27;};
59  bool Get_bit16() const {return m_bit16;};
60  bool Get_bit18() const {return m_bit18;};
61  bool Get_error_bit17() const {return m_error_bit17;};
62 
63  // Vector containing all 16 bits data words (undecoded)
64  const std::vector<uint16_t>& HitChan() const {return m_MarocChan;}
65 
66  // Vector containing all 32 bits data words (undecoded) : from the Muon BSC-> to test the structure
67  const std::vector<uint32_t>* dataWords() const {return &m_dataWords;}
68 
69  private:
70 
71  // Data info TSM:
76  std::vector<uint16_t> m_MarocChan; // sostituisce il p_hit di prima
77  bool m_bit16;
78  bool m_bit18;
82 
83  // All the datawords (no headers and footers) coming from this channel
84  // to be decoded on demand using ALFA_ReadOut methods
85  std::vector<uint32_t> m_dataWords;
86 
87 };
88 #endif // ALFA_RAWDATA_H
89 
90 
ALFA_RawData::GetEventCount_PMF
uint32_t GetEventCount_PMF() const
Definition: ALFA_RawData.h:53
ALFA_RawData::Get_bit18
bool Get_bit18() const
Definition: ALFA_RawData.h:60
ALFA_RawData::GetMBId_PMF
uint16_t GetMBId_PMF() const
Definition: ALFA_RawData.h:52
ALFA_RawData::Set_error_bit17
void Set_error_bit17(bool bit)
Definition: ALFA_RawData.cxx:81
ALFA_RawData::HitChan
const std::vector< uint16_t > & HitChan() const
Definition: ALFA_RawData.h:64
ALFA_RawData::SetPMFId_PMF
void SetPMFId_PMF(uint16_t PMF_number)
Definition: ALFA_RawData.cxx:49
ALFA_RawData::addData
void addData(uint32_t dataWord)
Definition: ALFA_RawData.cxx:76
ALFA_RawData::dataWords
const std::vector< uint32_t > * dataWords() const
Definition: ALFA_RawData.h:67
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ALFA_RawData::m_dataWords
std::vector< uint32_t > m_dataWords
Definition: ALFA_RawData.h:85
ALFA_RawData::Get_bit26_27
uint16_t Get_bit26_27() const
Definition: ALFA_RawData.h:57
ALFA_RawData::SetMBId_PMF
void SetMBId_PMF(uint16_t MB_number)
Definition: ALFA_RawData.cxx:54
ALFA_RawData::Get_Chan
uint32_t Get_Chan(uint16_t Numchan) const
Definition: ALFA_RawData.h:55
ALFA_RawData::GetWordId_PMF
uint16_t GetWordId_PMF() const
Definition: ALFA_RawData.h:50
ALFA_RawData::PushBack_PMF
void PushBack_PMF(uint16_t fiber_hit)
Definition: ALFA_RawData.cxx:72
ALFA_RawData
Definition: ALFA_RawData.h:21
ALFA_RawData::m_error_bit17
bool m_error_bit17
Definition: ALFA_RawData.h:79
ALFA_RawData::m_PMFId
uint16_t m_PMFId
Definition: ALFA_RawData.h:73
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
ALFA_RawData::SetMarocChan_PMF
void SetMarocChan_PMF(const std::vector< uint16_t > &MarocChan)
Definition: ALFA_RawData.cxx:65
ALFA_RawData::m_bit16
bool m_bit16
Definition: ALFA_RawData.h:77
ALFA_RawData::~ALFA_RawData
~ALFA_RawData()
Definition: ALFA_RawData.cxx:39
ALFA_RawData::m_EventCount
uint32_t m_EventCount
Definition: ALFA_RawData.h:75
ALFA_RawData::GetMarocHit
const std::vector< uint16_t > & GetMarocHit() const
Definition: ALFA_RawData.h:54
ALFA_RawData::Get_error_bit17
bool Get_error_bit17() const
Definition: ALFA_RawData.h:61
ALFA_RawData::m_MarocChan
std::vector< uint16_t > m_MarocChan
Definition: ALFA_RawData.h:76
ALFA_RawData::m_bit18
bool m_bit18
Definition: ALFA_RawData.h:78
ALFA_RawData::GetPMFId_PMF
uint16_t GetPMFId_PMF() const
Definition: ALFA_RawData.h:51
ALFA_RawData::Get_bit16
bool Get_bit16() const
Definition: ALFA_RawData.h:59
ALFA_RawData::SetWordId_PMF
void SetWordId_PMF(uint16_t Word_number)
Definition: ALFA_RawData.cxx:44
ALFA_RawData::SetEventCount_PMF
void SetEventCount_PMF(uint32_t Event_number)
Definition: ALFA_RawData.cxx:59
ALFA_RawData::m_MBId
uint16_t m_MBId
Definition: ALFA_RawData.h:74
ALFA_RawData::ALFA_RawData
ALFA_RawData()
Definition: ALFA_RawData.cxx:8
ALFA_RawData::Get_bit24_27
uint16_t Get_bit24_27() const
Definition: ALFA_RawData.h:58
ALFA_RawData::m_bit26_27
uint16_t m_bit26_27
Definition: ALFA_RawData.h:80
ALFA_RawData::SetZero_PMF
void SetZero_PMF()
Definition: ALFA_RawData.cxx:87
ALFA_RawData::m_WordId
uint16_t m_WordId
Definition: ALFA_RawData.h:72
ALFA_RawData::m_bit24_27
uint16_t m_bit24_27
Definition: ALFA_RawData.h:81
ALFA_RawData::GetSize
uint32_t GetSize() const
Definition: ALFA_RawData.h:56