source: branches/removing_cpp11_features/mdrs/MDrsCalibrationTime.h@ 18087

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