GET library
GETCoBo.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETCoBo.hh
3  *
4  * Include file for the GETCoBo class.
5  */
6 //======================================================================
7 
8 #ifndef GET_COBO_HH
9 #define GET_COBO_HH
10 
11 //----------------------------------------------------------------------
12 
13 #include "GETAsAd.hh"
14 #include "GETCfgCoBo.hh"
15 
16 //! Number of AsAd boards managed by the CoBo module
17 #define COBO_SIZE 4
18 
19 class GETSystem;
20 
21 //======================================================================
22 /*! \class GETCoBo
23  *
24  * This class describes the CoBo module, controlling up to 4 AsAd boards.
25  *
26  */
27 class GETCoBo : public GETObject
28 {
29  //------------------------------------------------------------
30  /*! \object_doc */
32  //------------------------------------------------------------
33 
34  friend class GETSystem;
35  friend class GETAsAd;
36  friend class GETCfgCoBo;
37 
38 
39  protected:
40  // GET architecture
41  u_int asad_number; ///< Number of AsAd boards controlled
42  GETAsAd * asad; ///< Array of AsAd boards
43 
44  // GET configuration
45  GETCfgCoBo * config; ///< Configuration data
46 
47  public:
48  //----------------------------------------------------------
49  /** @name Constructors, affectation, destructor */
50  //@{
51  GETCoBo ( u_int n_asad = 4, u_int n = 0, double dt = 0.01L );
52  virtual ~GETCoBo ( );
53  //@}
54 
55  //----------------------------------------------------------
56  /** @name GET configuration */
57  //@{
58  virtual int ResetConfig ( );
59 
60  const GETCfgCoBo * GetConfig ( ) const; // inline
61  GETCfgCoBo * GetConfig ( ); // inline
62  //@}
63 
64  //----------------------------------------------------------
65  /** @name Initialization functions */
66  //@{
67  virtual void Reset ( );
68  virtual void Init ( u_int n_asad, u_int n, double dt );
69  virtual void ClearEvent ( );
70  //@}
71 
72  //----------------------------------------------------------
73  /** @name GET system core objects functions */
74  //@{
75  virtual string GetObjectId ( ) const; // inline
76 
77  virtual u_int GetChildrenNumber ( ) const; // inline
78  virtual const GETObject * GetChild ( u_int i ) const; // inline
79  virtual GETObject * GetChild ( u_int i ); // inline
80 
81  const GETAsAd & operator [] ( u_int n ) const; // inline
82  GETAsAd & operator [] ( u_int n ); // inline
83 
84  u_int GetAsAdNumber ( ) const; // inline
85  //@}
86 
87 
88  //------------------------------------------------------------
89  /** @name Read / write of custom objects scheme */
90  //@{
91 
92  //@}
93 
94 
95  //----------------------------------------------------------
96  /** @name ROOT related functions */
97  //@{
98  public:
99 
100  /*! for use within ROOT.*/
101  ClassDef(GETCoBo,0);
102  //@}
103 };
104 
105 //----------------------------------------------------------------------
106 // Inline functions
107 #include "icc/GETCoBo.icc"
108 
109 
110 //======================================================================
111 #endif
GObject(GETCoBo)
Definition: GETAsAd.hh:35
ClassDef(GETCoBo, 0)
virtual void Reset()
Definition: GETCoBo.cpp:81
GETCoBo(u_int n_asad=4, u_int n=0, double dt=0.01L)
Definition: GETCoBo.cpp:19
u_int GetAsAdNumber() const
Definition: GETCoBo.icc:45
virtual int ResetConfig()
Definition: GETCoBo.cpp:58
const GETCfgCoBo * GetConfig() const
Definition: GETCoBo.icc:13
virtual ~GETCoBo()
Definition: GETCoBo.cpp:35
virtual void Init(u_int n_asad, u_int n, double dt)
Definition: GETCoBo.cpp:102
Definition: GETObject.hh:38
Definition: GETCfgCoBo.hh:26
const GETAsAd & operator[](u_int n) const
Definition: GETCoBo.icc:52
virtual void ClearEvent()
Definition: GETCoBo.cpp:155
GETCfgCoBo * config
Configuration data.
Definition: GETCoBo.hh:45
virtual u_int GetChildrenNumber() const
Definition: GETCoBo.icc:27
u_int asad_number
Number of AsAd boards controlled.
Definition: GETCoBo.hh:41
GETAsAd * asad
Array of AsAd boards.
Definition: GETCoBo.hh:42
Definition: GETCoBo.hh:27
virtual string GetObjectId() const
Definition: GETCoBo.icc:23
virtual const GETObject * GetChild(u_int i) const
Definition: GETCoBo.icc:33
Definition: GETSystem.hh:147