PandaRoot
PndEmcAbsWaveformModifier.h
Go to the documentation of this file.
1 #pragma once
2 #ifndef PNDEMCABSWAVEFORMMODIFIER_H_
3 #define PNDEMCABSWAVEFORMMODIFIER_H_
4 
5 #include "PndEmcWaveform.h"
6 #include "PndEmcMultiWaveform.h"
7 
8 #include "TObject.h"
9 
16 class PndEmcAbsWaveformModifier : public TObject {
17  public:
18  virtual void Modify(PndEmcWaveform *wf) = 0;
19  virtual Double_t GetScale() { return 1.; };
20 
22 
23  protected:
24  std::vector<Double_t> &GetWaveformReference(PndEmcWaveform *wf)
25  {
26  if (PndEmcMultiWaveform *multiWf = dynamic_cast<PndEmcMultiWaveform *>(wf)) {
27  Int_t activeWf = multiWf->GetActiveWaveform();
28  return multiWf->fSignals.at(activeWf);
29  }
30  return wf->fSignal;
31  }
32 
34 };
35 
36 #endif
virtual void Modify(PndEmcWaveform *wf)=0
interface for waveform modifiers
ClassDef(PndEmcAbsWaveformModifier, 1)
std::vector< Double_t > fSignal
represents a simulated waveform in an emc crystal
Class to hold multiple waveforms from one Emc Hit / ADC readout.
std::vector< Double_t > & GetWaveformReference(PndEmcWaveform *wf)