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
38
39
40
41
42
43
44
|
#ifndef Tracker_TkPedestalCalculator_h
#define Tracker_TkPedestalCalculator_h
#include "CalibTracker/SiStripAPVAnalysis/interface/ApvAnalysis.h"
#include "CalibTracker/SiStripAPVAnalysis/interface/TkStateMachine.h"
/**
* The abstract class for pedestal calculation/subtraction.
*/
class TkPedestalCalculator {
public:
virtual ~TkPedestalCalculator() {}
/** Return reconstructed pedestals */
// virtual ApvAnalysis::PedestalType pedestal() const = 0 ;
virtual ApvAnalysis::PedestalType pedestal() const = 0;
virtual ApvAnalysis::PedestalType rawNoise() const = 0;
/** Return status flag indicating if pedestals are usable */
TkStateMachine* status() { return &theStatus; }
virtual void resetPedestals() = 0;
virtual void setPedestals(ApvAnalysis::PedestalType&) = 0;
virtual void setNoise(ApvAnalysis::PedestalType&) {}
/** Request that status flag be updated */
virtual void updateStatus() = 0;
//
// Actions
//
/** Update pedestals with current event */
virtual void updatePedestal(ApvAnalysis::RawSignalType& in) = 0;
/** Return raw noise, determined without CMN subtraction */
/** Tell pedestal calculator that a new event is available */
virtual void newEvent() {}
protected:
TkStateMachine theStatus;
};
#endif
|