source: trunk/FACT++/src/DataCalib.h@ 11812

Last change on this file since 11812 was 11811, checked in by tbretz, 13 years ago
Added reading of FITS files.
File size: 1.5 KB
Line 
1#ifndef FACT_DataCalib
2#define FACT_DataCalib
3
4#include "DataProcessorImp.h"
5
6using namespace std;
7#include "DrsCalib.h"
8
9class DimDescribedService;
10
11class DataCalib : public DataProcessorImp, CalibData
12{
13 static std::vector<int32_t> fOffset; /// Storage for physical baseline
14 static std::vector<int64_t> fGain; /// Storage for baseline corrected gain
15 static std::vector<int64_t> fTrgOff; /// Storage for logical baseline
16
17 static uint64_t fNumOffset; /// Scale for physcial baseline
18 static uint64_t fNumGain; /// Scale for gain values
19 static uint64_t fNumTrgOff; /// Scale for logical baseline
20
21 static std::vector<float> fStats; /// Storage for mean and rms values
22
23 /// State of the DRS calibration: Positiove numbers mean that
24 /// we are in a run, negative mean that it is closed
25 static int fStep;
26 static bool fProcessing;
27
28 DimDescribedService &fDim; // DimService through which statistics updates are transmitted
29
30 bool ReadFits(const string &fname);
31 void WriteFits();
32
33public:
34 DataCalib(uint32_t id, DimDescribedService &dim, MessageImp &imp) : DataProcessorImp(id, imp), fDim(dim)
35 {
36 }
37
38 static void Restart();
39 static void Update(DimDescribedService &dim);
40
41 bool Open(RUN_HEAD* h);
42 bool WriteEvt(EVENT *e);
43 bool Close(RUN_TAIL * = 0);
44
45 static void Apply(int16_t *val, const int16_t *start, uint32_t roi);
46 static void Apply(float *vec, int16_t *val, const int16_t *start, uint32_t roi);
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.