source: trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcPlace.h@ 5138

Last change on this file since 5138 was 4410, checked in by jlopez, 20 years ago
*** empty log message ***
File size: 2.1 KB
Line 
1#ifndef MARS_MSrcPlace
2#define MARS_MSrcPlace
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8class MSrcPosCam;
9class TH2F;
10
11class MSrcPlace : public MTask
12{
13 public:
14 enum OnOffMode_t {kOn=0,kOff};
15
16 private:
17 MSrcPosCam* fSrcPosIn; // Pointer to the input source position container
18 MSrcPosCam* fSrcPosOut; // Pointer to the output source position container
19
20 TString fSrcPosInName; // Name of the input MSrcPosCam object
21 TString fSrcPosOutName; // Name of the output MSrcPosCam object
22
23 TString fHistoName; // Name of internal histogram
24 Float_t fHistoBinPrec; // [mm] internal histo bin size
25
26 TH2F* fHistPos; // histogram of the used source positions
27 OnOffMode_t fMode; // On/Off data mode (write/read to/from the histogram)
28 Bool_t fCreateHisto; // flag to decide whether internal histo is created or not
29
30 void SavePosIntoHisto();
31 void ReadPosFromHisto();
32
33 virtual Int_t Process();
34 virtual Int_t PostProcess();
35
36 protected:
37 virtual Int_t PreProcess(MParList *plist);
38
39 public:
40 MSrcPlace(const char* srcin="MSrcPosCam",const char* srcout="MSrcPosCam",
41 const char* name=NULL, const char* title=NULL);
42
43 virtual ~MSrcPlace();
44
45 void SetMode(OnOffMode_t mode) {fMode=mode;}
46 void SetInputSrcPosName(TString name) {fSrcPosInName=name;}
47 void SetOutputSrcPosName(TString name) {fSrcPosOutName=name;}
48 void SetInternalHistoName(TString name) {fHistoName=name;}
49 void SetInternalHistoBinSize(Float_t size){fHistoBinPrec=size;}
50 void SetPositionHisto(TH2F* histo) {fHistPos=histo;}
51 void SetCreateHisto(Bool_t inp=kTRUE) {fCreateHisto=inp;}
52
53 OnOffMode_t GetMode() {return fMode;}
54 TH2F* GetPositionHisto() {return fHistPos;}
55 MSrcPosCam* GetInputSrcPosCam() {return fSrcPosIn;}
56 MSrcPosCam* GetOutputSrcPosCam() {return fSrcPosOut;}
57 TString GetInternalHistoName() {return fHistoName;}
58
59 virtual Int_t ComputeNewSrcPosition() {return kTRUE;}
60
61 ClassDef(MSrcPlace, 0) // task to rotate the position of the source as a function of Azimuth and Zenith angles
62};
63
64#endif
65
Note: See TracBrowser for help on using the repository browser.