FACT++  1.0
bool ConnectionFTM::CheckConsistency ( FTM::StaticData data)
inlineprotected

Definition at line 144 of file ftmctrl.cc.

References FTM::StaticData::Enable(), FTM::StaticData::fActiveFTU, fPrescaling, FTM::StaticData::GetSequenceLPext(), FTM::StaticData::GetSequenceLPint(), FTM::StaticData::GetSequencePed(), i, FTM::StaticData::IsEnabled(), FTM::StaticData::kLPext, FTM::StaticData::kLPint, and FTM::StaticData::kPedestal.

145  {
146  bool warn1 = false;
147  if (data.IsEnabled(FTM::StaticData::kPedestal) != (data.GetSequencePed() >0) ||
148  data.IsEnabled(FTM::StaticData::kLPint) != (data.GetSequenceLPint()>0) ||
150  {
151  warn1 = true;
155  }
156 
157  bool warn2 = false;
158  const uint16_t ref = data[0].fPrescaling;
159  for (int i=1; i<40; i++)
160  {
161  if (data[i].fPrescaling != ref)
162  {
163  warn2 = true;
164  data[i].fPrescaling = ref;
165  }
166  }
167 
168  bool warn3 = false;
169  for (int i=0; i<4; i++)
170  if (data.fActiveFTU[i]!=0x3ff)
171  {
172  warn3 = true;
173  data.fActiveFTU[i]=0x3ff;
174  }
175 
176 
177 
178  if (warn1)
179  Warn("GeneralSettings not consistent with trigger sequence.");
180  if (warn2)
181  Warn("Prescaling not consistent for all boards.");
182  if (warn3)
183  Warn("Not all FTUs are enabled - enable all FTUs.");
184 
185  return !warn1 && !warn2 && !warn3;
186  }
uint8_t GetSequencePed() const
Definition: HeadersFTM.h:349
uint8_t GetSequenceLPint() const
Definition: HeadersFTM.h:350
int i
Definition: db_dim_client.c:21
uint16_t fActiveFTU[4]
Definition: HeadersFTM.h:238
uint16_t fPrescaling
0-3 (A-D) Threshold of patches, 4 (H) Threshold for N out of 4 (12 bit each)
Definition: HeadersFTM.h:188
uint8_t GetSequenceLPext() const
Definition: HeadersFTM.h:351
Enable trigger decision after light pulse (CalibrationTrigger, LP1)
Definition: HeadersFTM.h:204
Enable artificial trigger after light pulse (LP2)
Definition: HeadersFTM.h:203
Pedestal trigger (artifical)
Definition: HeadersFTM.h:202
void Enable(GeneralSettings type, bool enable)
Definition: HeadersFTM.h:298
bool IsEnabled(GeneralSettings type) const
Definition: HeadersFTM.h:306

+ Here is the call graph for this function: