Last change
on this file since 20115 was 18148, checked in by tbretz, 10 years ago |
std namespace missing; expand path name; consequently argument must not be const
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef MARS_MDrsCalibration
|
---|
2 | #define MARS_MDrsCalibration
|
---|
3 |
|
---|
4 | // -------------------------------------------------------------------
|
---|
5 |
|
---|
6 | #ifndef MARS_MParContainer
|
---|
7 | #include "MParContainer.h"
|
---|
8 | #endif
|
---|
9 |
|
---|
10 | #ifndef ROOT_TSystem
|
---|
11 | #include <TSystem.h>
|
---|
12 | #endif
|
---|
13 |
|
---|
14 | #ifndef MARS_MLogManip
|
---|
15 | #include "MLogManip.h"
|
---|
16 | #endif
|
---|
17 |
|
---|
18 | #ifndef MARS_DrsCalib
|
---|
19 | #include "DrsCalib.h"
|
---|
20 | #endif
|
---|
21 |
|
---|
22 |
|
---|
23 | class MDrsCalibration : public MParContainer, public DrsCalibration
|
---|
24 | {
|
---|
25 | public:
|
---|
26 | MDrsCalibration(const char *name=0, const char *title=0)
|
---|
27 | {
|
---|
28 | fName = name ? name : "MDrsCalibration";
|
---|
29 | fTitle = title ? title : "";
|
---|
30 | }
|
---|
31 |
|
---|
32 | bool ReadFits(TString fname)
|
---|
33 | {
|
---|
34 | gSystem->ExpandPathName(fname);
|
---|
35 |
|
---|
36 | std::string msg;
|
---|
37 | try
|
---|
38 | {
|
---|
39 | msg = ReadFitsImp(fname.Data());
|
---|
40 | }
|
---|
41 | catch (const std::exception &e)
|
---|
42 | {
|
---|
43 | msg = e.what();
|
---|
44 | }
|
---|
45 |
|
---|
46 | if (msg.empty())
|
---|
47 | {
|
---|
48 | *fLog << inf << "Read DRS calibration file " << fname << std::endl;
|
---|
49 | return true;
|
---|
50 | }
|
---|
51 |
|
---|
52 | *fLog << err << "Error reading from " << fname << ": " << msg << std::endl;
|
---|
53 | return false;
|
---|
54 | }
|
---|
55 |
|
---|
56 | void Plot();
|
---|
57 |
|
---|
58 | ClassDef(MDrsCalibration, 1)
|
---|
59 | };
|
---|
60 |
|
---|
61 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.