Inheritance diagram for MSynchronizeMeasurements:
Usage: First run MTimeSort and save output to a file to obtain a sorted list of times from the old DAQ. Then run this module on the new DAQ data with the old DAQ sorted list as the input parameter "ComparisonFile". The output of the module is a time offset between the "NsTime" of the input file and the "NsTime" of the comparison file.
module SynchronizeMeasurements verbosity = info enable = true ComparisonFile = sorted.txt OutputFile = results.txt Window = 500.0 Range = 10.0 endmod
Public Member Functions | |
MSynchronizeMeasurements (QSequence *s) | |
constructor | |
~MSynchronizeMeasurements () | |
destructor | |
void | Init () |
Init method. | |
QEvent * | Do (QEvent *ev) |
Do method. | |
void | Done () |
Done method. | |
Private Member Functions | |
double | ComputeGoodness (double Offset, double Slope, double Window, std::vector< int > Channels) |
Function to compute how good is the synchronization. | |
Private Attributes | |
double | fStartTimeA |
Start time of run unix. | |
double | fStartTimeB |
std::map< int, std::vector< double > > | fTimesA |
Vectors of event times keyed by channel. | |
std::map< int, std::vector< double > > | fTimesB |
std::string | fOutputFile |
Function to find nearest event on same channel OutputFilename. | |
double | fSlope |
Slope term to account for different clock speeds. | |
bool | fIsTxt |
Type of output file. | |
bool | fIsRoot |