| Line | |
|---|
| 1 | #ifndef MARS_MDrsCalibrationTime
|
|---|
| 2 | #define MARS_MDrsCalibrationTime
|
|---|
| 3 |
|
|---|
| 4 | #include "DrsCalib.h"
|
|---|
| 5 |
|
|---|
| 6 | class TH1;
|
|---|
| 7 |
|
|---|
| 8 | class MDrsCalibrationTime : public MParContainer, public DrsCalibrateTime
|
|---|
| 9 | {
|
|---|
| 10 | std::vector<double> fDelays;
|
|---|
| 11 |
|
|---|
| 12 | public:
|
|---|
| 13 | MDrsCalibrationTime(const char *name=0, const char *title=0)
|
|---|
| 14 | {
|
|---|
| 15 | fName = name ? name : "MDrsCalibrationTime";
|
|---|
| 16 | fTitle ="";
|
|---|
| 17 | }
|
|---|
| 18 |
|
|---|
| 19 | void InitSize(uint16_t channels, uint16_t samples)
|
|---|
| 20 | {
|
|---|
| 21 | //fDelays.clear();
|
|---|
| 22 | //fDelays.resize(channels);
|
|---|
| 23 |
|
|---|
| 24 | DrsCalibrateTime::InitSize(channels, samples);
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | void SetCalibration(const DrsCalibrateTime &cal)
|
|---|
| 28 | {
|
|---|
| 29 | *static_cast<DrsCalibrateTime*>(this) = cal;
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | bool SetDelays(const TH1 &cam);
|
|---|
| 33 |
|
|---|
| 34 | double GetOffset(int hw, int spos, float tm) const
|
|---|
| 35 | {
|
|---|
| 36 | return Offset(hw/9, fmod(tm+spos, 1024)) - Offset(hw/9, spos);
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | double GetDelay(int sw) const
|
|---|
| 40 | {
|
|---|
| 41 | return fDelays.size()==0 ? 0 : fDelays[sw];
|
|---|
| 42 | }
|
|---|
| 43 |
|
|---|
| 44 | ClassDef(MDrsCalibrationTime, 2) // A list of histograms storing the Fadc spektrum of one pixel
|
|---|
| 45 | };
|
|---|
| 46 |
|
|---|
| 47 | #endif
|
|---|
| 48 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.