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