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

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