SLTData.h
Go to the documentation of this file.
1 
9 #ifndef _fevt_SLTData_h_
10 #define _fevt_SLTData_h_
11 
12 #include <vector>
13 #include <utl/ShadowPtr.h>
14 
15 
16 
17 namespace fevt {
18 
19  class TelescopTriggerData;
20 
21 
34  class SLTData {
35 
36  public:
37  SLTData(const std::vector<unsigned int>& sltDataWord);
38  SLTData(const int size);
39  SLTData();
40 
41  int GetSize() const { return fColSize; }
42 
43  int GetSLTDataWord(unsigned int col) const;
44  int GetSLTPattern(unsigned int col) const { CheckBounds(col); return fSLTPattern[col-1]; }
45  int GetRowMask(unsigned int col) const { CheckBounds(col); return fRowMask[col-1]; }
46  bool HasPixel(const unsigned int id) const;
47  bool HasPixel(unsigned int col, const unsigned int row) const;
48  bool HasParityError(unsigned int col) const { CheckBounds(col); return fParityErrorBit[col-1]; }
49  bool HasTrigger(unsigned int col) const { CheckBounds(col); return fTrigger[col-1]; }
50  bool HasSpare(unsigned int col) const { CheckBounds(col); return fSpare[col-1]; }
51 
52  void SetColumn(unsigned int col, const int row, const int pattern,
53  const bool pe, const bool trigger, const bool spare);
54 
55  void SetSLTDataWord(unsigned int col, const unsigned int sltDataWord);
56  void SetSLTPattern(unsigned int col, const int pattern);
57  void SetRowMask(unsigned int col, const int mask);
58  void SetParityError(unsigned int col, const bool bit);
59  void SetTrigger(unsigned int col, const bool bit);
60  void SetSpare(unsigned int col, const bool bit);
61 
62  private:
63  void CheckBounds(unsigned int col) const;
64 
65  // slt data
66 
67  std::vector<int> fRowMask; // row pixel mask
68 
69  std::vector<int> fSLTPattern; // pattern clas
70 
71  std::vector<bool> fParityErrorBit; // FLT parity error bit
72  std::vector<bool> fTrigger; // external trigger flag
73  std::vector<bool> fSpare; // future use
74 
75  // no data-member
76  mutable unsigned int fColSize; // fast access
77 
79  friend class utl::ShadowPtr<SLTData>;
80 
81  };
82 
83 }
84 
85 
86 #endif
87 
88 // Configure (x)emacs for this file ...
89 // Local Variables:
90 // mode: c++
91 // End:
pointer with built-in initialization, deletion, deep copying
Definition: ShadowPtr.h:163
int GetRowMask(unsigned int col) const
Definition: SLTData.h:45
Description of trigger data for one Telescope.
Definition: SLTData.h:34
unsigned int fColSize
Definition: SLTData.h:76
std::vector< int > fSLTPattern
Definition: SLTData.h:69
void SetParityError(unsigned int col, const bool bit)
Definition: SLTData.cc:146
bool HasPixel(const unsigned int id) const
Definition: SLTData.cc:92
std::vector< bool > fSpare
Definition: SLTData.h:73
int GetSLTPattern(unsigned int col) const
Definition: SLTData.h:44
std::vector< bool > fParityErrorBit
Definition: SLTData.h:71
bool HasTrigger(unsigned int col) const
Definition: SLTData.h:49
bool HasSpare(unsigned int col) const
Definition: SLTData.h:50
int GetSLTDataWord(unsigned int col) const
Definition: SLTData.cc:54
std::vector< bool > fTrigger
Definition: SLTData.h:72
std::vector< int > fRowMask
Definition: SLTData.h:67
void SetSpare(unsigned int col, const bool bit)
Definition: SLTData.cc:166
void SetSLTPattern(unsigned int col, const int pattern)
Definition: SLTData.cc:116
void SetSLTDataWord(unsigned int col, const unsigned int sltDataWord)
Definition: SLTData.cc:102
void SetColumn(unsigned int col, const int row, const int pattern, const bool pe, const bool trigger, const bool spare)
Definition: SLTData.cc:39
friend class fevt::TelescopTriggerData
Definition: SLTData.h:78
int GetSize() const
Definition: SLTData.h:41
void SetTrigger(unsigned int col, const bool bit)
Definition: SLTData.cc:156
bool HasParityError(unsigned int col) const
Definition: SLTData.h:48
void SetRowMask(unsigned int col, const int mask)
Definition: SLTData.cc:126
void CheckBounds(unsigned int col) const
Definition: SLTData.cc:176

, generated on Tue Sep 26 2023.