TkNoiseCalculator

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#ifndef TkNoiseCalculator_H
#define TkNoiseCalculator_H

#include "CalibTracker/SiStripAPVAnalysis/interface/ApvAnalysis.h"
#include "CalibTracker/SiStripAPVAnalysis/interface/TkStateMachine.h"

/**
 * The abstract class for noise calculation/subtraction.
 */
class TkNoiseCalculator {
public:
  virtual ~TkNoiseCalculator() {}
  /** Return status flag indicating if noise values are usable */
  TkStateMachine* status() { return &theStatus; }

  virtual void setStripNoise(ApvAnalysis::PedestalType& in) = 0;
  /** Return reconstructed noise */
  virtual ApvAnalysis::PedestalType noise() const = 0;
  virtual float stripNoise(int) const = 0;

  /** Request that status flag be updated */
  virtual void updateStatus() = 0;

  virtual void resetNoise() = 0;

  //Actions

  /** Update noise with current event */
  virtual void updateNoise(ApvAnalysis::PedestalType&) = 0;
  /** Tell noise calculator that a new event is available */
  virtual void newEvent() {}

protected:
  TkStateMachine theStatus;
};

#endif