FACT++  1.0
__attribute__::DimStaticData ( const Header h,
const StaticData d 
)

Definition at line 240 of file HeadersFTM.h.

References init().

240  { init(*this); }
241  StaticData(const std::vector<uint16_t> &vec)
242  {
243  ntohcpy(vec, *this);
244 
245  for (int i=0; i<8; i++)
247  }
248 
249  std::vector<uint16_t> HtoN() const
250  {
251  StaticData d(*this);
252  for (int i=0; i<8; i++)
253  Reverse(d.fClockConditioner+i);
254 
255  return htoncpy(d);
256  }
257 
258  bool operator==(StaticData d) const
259  {
260  for (int i=0; i<4; i++)
261  for (int j=0; j<10; j++)
262  memcpy(d.fBoard[i][j].fDAC, fBoard[i][j].fDAC, sizeof(uint16_t)*5);
263  return memcmp(this, &d, sizeof(StaticData))==0;
264  }
265 
266  bool valid() const { static StaticData empty; return memcmp(this, &empty, sizeof(FTM::StaticData))!=0; }
267 
268  void clear() { reset(*this); }
269  void print(std::ostream &out) const;
270 
271  StaticDataBoard &operator[](int i) { return fBoard[i/10][i%10]; }
272  const StaticDataBoard &operator[](int i) const { return fBoard[i/10][i%10]; }
273 
274  void EnableFTU(int i) { fActiveFTU[i/10] |= (1<<(i%10)); }
275  void DisableFTU(int i) { fActiveFTU[i/10] &= ~(1<<(i%10)); }
276 
277  void EnableAllFTU() { for (int i=0; i<4; i++) fActiveFTU[i] = 0x3ff; }
278  void DisableAllFTU() { for (int i=0; i<4; i++) fActiveFTU[i] = 0; }
279 
std::vector< uint16_t > htoncpy(const S &s)
Definition: ByteOrder.h:72
void init(S &s)
Definition: ByteOrder.h:19
uint16_t fActiveFTU[4]
Num of board responded in crate 0-3.
Definition: HeadersFTM.h:243
int i
Definition: db_dim_client.c:21
void DisableAllFTU()
Definition: HeadersFTM.h:283
void DisableFTU(int i)
Definition: HeadersFTM.h:280
void print(std::ostream &out) const
bool operator==(StaticData d) const
Definition: HeadersFTM.h:263
std::vector< uint16_t > HtoN() const
Definition: HeadersFTM.h:197
StaticDataBoard()
Internal readout time of FTUs for trigger counter.
Definition: HeadersFTM.h:190
void EnableAllFTU()
Definition: HeadersFTM.h:282
StaticDataBoard fBoard[4][10]
Definition: HeadersFTM.h:241
bool valid() const
Definition: HeadersFTM.h:271
uint32_t fClockConditioner[8]
(4ns * x + 8ns) FTM internal programmable dead time after trigger decision
Definition: HeadersFTM.h:236
void EnableFTU(int i)
Definition: HeadersFTM.h:279
void Reverse(T *t)
Definition: ByteOrder.h:130
StaticData()
Definition: HeadersFTM.h:245
void clear()
Definition: HeadersFTM.h:216
void ntohcpy(const std::vector< uint16_t > &vec, S &s)
Definition: ByteOrder.h:62
void reset(S &s)
Definition: ByteOrder.h:13
StaticDataBoard & operator[](int i)
Definition: HeadersFTM.h:276

+ Here is the call graph for this function: