FairRoot/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  if(PndEmcMultiWaveform* multiWf = dynamic_cast<PndEmcMultiWaveform*>(wf)) {
26  Int_t activeWf = multiWf->GetActiveWaveform();
27  return multiWf->fSignals.at(activeWf);
28  }
29  return wf->fSignal;
30  }
31 
33 };
34 
35 #endif
virtual void Modify(PndEmcWaveform *wf)=0
interface for waveform modifiers
ClassDef(PndEmcAbsWaveformModifier, 1)
Double_t
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)