1 | // class ElectronicsFactory |
---|
2 | // $Id: ElectronicsFactory.hh 2804 2008-10-09 12:10:06Z biktem $ |
---|
3 | // Factory method to build a version of the Euso Electronics Model |
---|
4 | // Singleton |
---|
5 | |
---|
6 | #ifndef __ELECTRONICS_FACTORY_H__ |
---|
7 | #define __ELECTRONICS_FACTORY_H__ |
---|
8 | |
---|
9 | |
---|
10 | #include "euso.hh" |
---|
11 | #include "EsafConfigurable.hh" |
---|
12 | #include "EsafMsgSource.hh" |
---|
13 | #include "EVector.hh" |
---|
14 | |
---|
15 | class EusoElectronics; |
---|
16 | class MacroCell; |
---|
17 | class Detector; |
---|
18 | class Photomultiplier; |
---|
19 | class FrontEndChip; |
---|
20 | class PmtGeometry; |
---|
21 | class Telemetry; |
---|
22 | class AnalogFrontEnd; |
---|
23 | class ElementaryCell; |
---|
24 | class MacroCellGeometry; |
---|
25 | |
---|
26 | //////////////////////////////////////////////////////////////////////////////// |
---|
27 | // // |
---|
28 | // EusoElectronics // |
---|
29 | // // |
---|
30 | //////////////////////////////////////////////////////////////////////////////// |
---|
31 | |
---|
32 | class ElectronicsFactory : public EsafConfigurable, public EsafMsgSource { |
---|
33 | public: |
---|
34 | // singleton |
---|
35 | static ElectronicsFactory* Get(); |
---|
36 | |
---|
37 | // dtor |
---|
38 | virtual ~ElectronicsFactory(); |
---|
39 | |
---|
40 | EsafConfigClass(Electronics,ElectronicsFactory) |
---|
41 | |
---|
42 | // build the euso electronics according to the Config object |
---|
43 | virtual EusoElectronics* Build(); |
---|
44 | //virtual EusoElectronics* GetEusoElectronics(); |
---|
45 | virtual void DeleteEusoElectronics(); |
---|
46 | |
---|
47 | virtual Detector* MakeDetector(); |
---|
48 | // create a new detector according config file |
---|
49 | |
---|
50 | virtual Photomultiplier* MakePmt(Int_t, PmtGeometry*); |
---|
51 | // build the specified type of Pmt |
---|
52 | |
---|
53 | virtual FrontEndChip* MakeFrontEndChip( Int_t ); |
---|
54 | // build the specified type of FrontEndChip |
---|
55 | |
---|
56 | virtual AnalogFrontEnd* MakeAFEE( FrontEndChip*, Int_t ); |
---|
57 | // build the specified type of AFEE |
---|
58 | |
---|
59 | virtual MacroCell* MakeMacroCell(); |
---|
60 | // build the specified type of MacroCell |
---|
61 | |
---|
62 | virtual MacroCellGeometry* MakeMacroCellGeometry(MacroCell*); |
---|
63 | // build the specified type of MacroCellGeometry |
---|
64 | |
---|
65 | virtual ElementaryCell* MakeElementaryCell(); |
---|
66 | // build the specified type of elementary cell |
---|
67 | |
---|
68 | // virtual PmtGeometry* GetPmtGeometry( Int_t, Int_t ); |
---|
69 | virtual PmtGeometry* MakePmtGeometry( const EVector&, const EVector&, const EVector& ); |
---|
70 | // get pmt geometry |
---|
71 | |
---|
72 | virtual Telemetry* MakeTelemetry(); |
---|
73 | // get telemetry object |
---|
74 | |
---|
75 | private: |
---|
76 | |
---|
77 | // private constructor |
---|
78 | ElectronicsFactory(); |
---|
79 | |
---|
80 | // pointer to singleton |
---|
81 | static ElectronicsFactory* fMe; |
---|
82 | |
---|
83 | // Euso Electronics object |
---|
84 | EusoElectronics* fEusoElec; |
---|
85 | |
---|
86 | ClassDef(ElectronicsFactory,0) |
---|
87 | }; |
---|
88 | |
---|
89 | |
---|
90 | #endif |
---|