source: trunk/Mars/mdrs/MDrsCalibration.h@ 18144

Last change on this file since 18144 was 18144, checked in by tbretz, 10 years ago
Accounted for the change in exception handling.
File size: 1.1 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
23class MDrsCalibration : public MParContainer, public DrsCalibration
24{
25public:
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(const TString &str)
33 {
34 gSystem->ExpandPathName(str);
35
36 string msg;
37 try
38 {
39 msg = ReadFitsImp(str.Data());
40 }
41 catch (const exception &e)
42 {
43 msg = e.what();
44 }
45
46 if (msg.empty())
47 {
48 *fLog << inf << "Read DRS calibration file " << fname << endl;
49 return true;
50 }
51
52 *fLog << err << "Error reading from " << fname << ": " << msg << 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.