source: trunk/Mars/melectronics/MPulseShape.h@ 19713

Last change on this file since 19713 was 9343, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.4 KB
Line 
1#ifndef MARS_MPulseShape
2#define MARS_MPulseShape
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class TF1;
9class MSpline3;
10
11class MPulseShape : public MParContainer
12{
13private:
14 MSpline3 *fSpline; // Spline to describe the pulse shape
15
16 TString fFileName; // File name of a file describing the pulse shape
17
18 TString fFunction; // Function describing the pulse shape
19 Int_t fNpx; // Number of sampling points
20 Float_t fXmin; // lower edge of sampling
21 Float_t fXmax; // upper edge of sampling
22
23 Bool_t ReadFile(const char *fname);
24 Bool_t SetFunction(const char *func, Int_t n, Double_t xmin, Double_t xmax);
25
26 // MParContainer
27 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print=kFALSE);
28
29public:
30 MPulseShape(const char *name=0, const char *title=0);
31 ~MPulseShape();
32
33 void SetFunction(const TF1 &f);
34 void SetFunction(const char *f) { fFunction=f; fFileName=""; }
35 void SetFileName(const char *n) { fFileName=n; fFunction=""; }
36
37 void Clear(Option_t *o="");
38 void Paint(Option_t *o="");
39
40 MSpline3 *GetSpline() const { return fSpline; }
41
42 Float_t GetPulseWidth() const;
43 Float_t GetXmin() const;
44 Float_t GetXmax() const;
45
46 ClassDef(MPulseShape, 1) // Parameter container to hold the setup for a pulse shape
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.