Inject signals in a data stream. More...
#include <InjEct.h>
Public Member Functions | |
bool | Inject (const int aDataSize, double *aData, const double aTimeStart) |
Injects in a data vector. | |
bool | PlotInjection (const int aInjIndex) |
Plots a given injection waveforms. | |
void | UpdateNativeSamplingFrequency (void) |
Updates the injection sampling frequency. | |
Constructors and destructors | |
InjEct (Streams *aStream, const string aPattern, const int aVerbose=0) | |
Constructor of the InjEct class. | |
virtual | ~InjEct () |
Destructor of the InjEct class. |
Inject signals in a data stream.
InjEct::InjEct | ( | Streams * | aStream, | |
const string | aPattern, | |||
const int | aVerbose = 0 | |||
) |
Constructor of the InjEct class.
Injections listed in the ROOT files designated by a file pattern are loaded. It is important that the injection files were generated using the InjGen class. Injection files in the pattern must be time-sorted and with no overlap.
The input stream, in which injections will be made, must be a LV detector and have a native sampling frequency larger than 16Hz.
aStream | input data stream in which to inject | |
aPattern | injection file pattern | |
aVerbose | verbosity level |
InjEct::~InjEct | ( | void | ) | [virtual] |
Destructor of the InjEct class.
bool InjEct::Inject | ( | const int | aDataSize, | |
double * | aData, | |||
const double | aTimeStart | |||
) |
Injects in a data vector.
aDataSize | input vector size | |
aData | pointer to input data vector (time-domain) | |
aTimeStart | GPS time of first sample |
bool InjEct::PlotInjection | ( | const int | aInjIndex | ) |
Plots a given injection waveforms.
3 waveforms are plotted:
aInjIndex | injection index |
void InjEct::UpdateNativeSamplingFrequency | ( | void | ) |
Updates the injection sampling frequency.
Use this function whenever the native sampling frequency of the input stream is changed. Indeed, the size of injection containers need to be updated.