FACT++  1.0
void ConnectionDimFTM::UpdateDynamicData ( )
inlineprivatevirtual

Reimplemented from ConnectionFTM.

Definition at line 1296 of file ftmctrl.cc.

References data, first, fTimeStamp, fTriggerCounter, FTM::kFtmStates, DimService::setQuality(), DimDescribedService::Update(), and ConnectionFTM::UpdateDynamicData().

1297  {
1299 
1303 
1304  uint64_t odiff = fDynamicData.fOnTimeCounter;
1305  uint32_t cdiff = fHeader.fTriggerCounter;
1306  uint64_t tdiff = fHeader.fTimeStamp;
1307 
1308  // The easiest way to detect whether the counters have been
1309  // reset or not is to detect a state change, because with
1310  // every state change they are reset. However, there are cases
1311  // when the trigger is switched on already (data run) and
1312  // the trigger is turned off ans switched on again within
1313  // a very short time, that the state of the previous and the
1314  // new report is the same. So in addition we have to check
1315  // for other indications. Any counter decreasing is a hint.
1316  // None of them should ever decrease. So all three are checked.
1317  const uint8_t state = fHeader.fState & FTM::States::kFtmStates;
1318 
1319  const bool first = state!=fPrevState ||
1323 
1324  if (!first)
1325  {
1326  tdiff -= fTimeStamp;
1327  odiff -= fTimeStampOn;
1328  cdiff -= fTriggerCounter;
1329  }
1330 
1331  // The observation time calculated in the first report is most likely
1332  // too large because the previous report is taken as reference,
1333  // but this is the best what could be done.
1334  const float rate = tdiff==0 ? 0 : 1e6*cdiff/tdiff;
1335 
1339  fPrevState = state;
1340 
1342  rate, tdiff*1e-6, odiff*1e-6);
1343 
1345  fDimTriggerRates.Update(rates);
1346  }
uint64_t fTimeStampOn
Definition: ftmctrl.cc:1255
FTM::DynamicData fDynamicData
Definition: ftmctrl.cc:54
void setQuality(int quality)
Definition: discpp.cxx:1256
DimDescribedService fDimTriggerRates
Definition: ftmctrl.cc:1247
DimDescribedService fDimDynamicData
Definition: ftmctrl.cc:1251
int64_t first
Size of this column in the tile.
Definition: zofits.h:26
uint16_t fState
State of the FTM central state machine.
Definition: HeadersFTM.h:109
uint32_t fTriggerCounter
FTM internal counter of all trigger decision independant of trigger-line enable/disable (reset: start...
Definition: HeadersFTM.h:112
FTM::StaticData fStaticData
Definition: ftmctrl.cc:53
uint64_t fOnTimeCounter
Definition: HeadersFTM.h:503
uint64_t fPrevState
Definition: ftmctrl.cc:1257
float data[4 *1440]
uint32_t fTriggerCounter
Definition: ftmctrl.cc:1256
virtual void UpdateDynamicData()
Definition: ftmctrl.cc:105
FTM::Header fHeader
Definition: ftmctrl.cc:51
uint64_t fTimeStamp
Definition: ftmctrl.cc:1254
uint64_t fTimeStamp
Internal counter (micro-seconds, reset: start/stop run)
Definition: HeadersFTM.h:113

+ Here is the call graph for this function: