16 #ifndef STREAM_TdcCalibrationModule
17 #define STREAM_TdcCalibrationModule
19 #ifndef DABC_ModuleAsync
27 #ifndef STREAM_DabcProcMgr
36 #include "hadaq/TrbProcessor.h"
115 bool change_progress =
true,
116 int *res_progress =
nullptr,
double *res_quality =
nullptr,
117 std::string *res_state =
nullptr, std::vector<std::string> *res_msgs =
nullptr,
118 bool acknowledge_quality =
false);
Represents command with its arguments.
Represents objects hierarchy of remote (or local) DABC process.
Base class for user-derived code, implementing event-processing.
Perform calibration of FPGA TDC data.
bool ProcessSend(unsigned) override
Method called by framework when at least one buffer can be send to output port.
bool fDoingTdcCalibr
indicates if module doing explicit TDC calibrations
std::vector< uint64_t > fTDCs
remember TDCs in the beginning
bool fEnableProgressUpdate
set true to enable trb progress update
int fCountLinear
number of count for liner calibrations when starting explicitly
unsigned fCalibrMask
mask to used for triggers
int fTotStatLimit
limit for ToT statistic
int fLinearNumPoints
number of points used in linear calibration
bool fOwnProcMgr
if created in the module
int fFineMin
configure min value
static void SetTRBStatus(dabc::Hierarchy &item, dabc::Hierarchy &logitem, hadaq::TrbProcessor *trb, bool change_progress=true, int *res_progress=nullptr, double *res_quality=nullptr, std::string *res_state=nullptr, std::vector< std::string > *res_msgs=nullptr, bool acknowledge_quality=false)
bool ProcessBuffer(unsigned) override
Method called by framework when at least one buffer available in pool handle.
int ExecuteCommand(dabc::Command cmd) override
Main method where commands are executed.
int fProgress
total calibration progress
std::vector< std::string > fLogMessages
log messages
std::string fState
current state
bool RecordTRBStatus(bool do_store, dabc::Hierarchy &logitem)
int fNumCh
configured number of channel
int fAutoTdcMode
automatic mode of TDC creation 0 - off, 1 - with linear calibr, 2 - with normal calibr
int fWarningCnt
counter for warnings
bool MatchTdcId(uint32_t tdcid)
dabc::TimeStamp fLastCalibr
use not to check for calibration very often
DabcProcMgr * fProcMgr
stream process manager
unsigned fTRB
remember TRB id, used in module name
int fAutoToTRange
ToT range, 0 - normal, 1 - DiRICH.
virtual ~TdcCalibrationModule()
void ProcessTimerEvent(unsigned) override
Method called by framework when timer event is produced.
void AfterModuleStop() override
double fQuality
current calibration quality
int fEdges
configured edges
std::vector< uint64_t > fTdcMax
configured max TDC id
bool ProcessRecv(unsigned) override
Method called by framework when at least one buffer available in input port.
std::string fCalibrFile
names to load/store calibrations
void BeforeModuleStart() override
double fTotRMSLimit
limit for ToT RMS calibration
hadaq::TrbProcessor * fTrbProc
TRB processor.
int fAutoCalibr
amount of statistic for the auto calibration in channels
std::vector< int64_t > fDisabledCh
disabled for calibrations channels
int fFineMax
configure max value
int fCountNormal
number of counts for normal calibrations when starting explicitly
bool fRecheckTdcs
check for missing tdcs, done once 5 sec
bool fReplace
replace hit messages (true) or add calibration messages (false)
void ConfigureNewTDC(hadaq::TdcProcessor *tdc)
bool fDummy
module creates all TDCs but do not perform any transformation
int fDebug
when specified, provides more debug output and special mode
std::vector< uint64_t > fTdcMin
configured min TDC id
TdcCalibrationModule(const std::string &name, dabc::Command cmd=nullptr)
int fDummyCounter
used in dummy
Support for stream framework in DABC
Class for acquiring and holding timestamps.