72 #include "TRestRawSignalAddNoiseProcess.h"
99 if (LoadConfigFromFile(configFilename) == -1) {
108 delete fOutputSignalEvent;
116 SetName(
"addSignalNoiseProcess-Default");
117 SetTitle(
"Default config");
125 SetSectionName(this->ClassName());
126 SetLibraryVersion(LIBRARY_VERSION);
128 fInputSignalEvent =
nullptr;
145 if (LoadConfigFromFile(configFilename, name) == -1) {
156 if (fInputSignalEvent->GetNumberOfSignals() <= 0) {
160 for (
int n = 0; n < fInputSignalEvent->GetNumberOfSignals(); n++) {
165 noiseSignal.
SetSignalID(fInputSignalEvent->GetSignal(n)->GetSignalID());
167 fOutputSignalEvent->AddSignal(noiseSignal);
170 return fOutputSignalEvent;
A base class for any REST event.
A process to add/emulate electronic noise into a TRestRawSignalEvent.
TRestRawSignalAddNoiseProcess()
Default constructor.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
~TRestRawSignalAddNoiseProcess()
Default destructor.
void Initialize() override
Function to initialize input/output event members and define the section name.
An event container for time rawdata signals with fixed length.
It defines a Short_t array with a physical parameter that evolves in time using a fixed time bin.
void SetSignalID(Int_t sID)
It sets the id number of the signal.
void GetWhiteNoiseSignal(TRestRawSignal *noiseSignal, Double_t noiseLevel=1.)
It calculates an arbitrary Gaussian noise placing it at the signal pointer given by argument....