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 GETCfgCoBo;
36 
37 
38  protected:
39  // GET architecture
40  u_int asad_number; ///< Number of AsAd boards controlled
41  GETAsAd * asad; ///< Array of AsAd boards
42 
43  // GET configuration
44  GETCfgCoBo * config; ///< Configuration data
45 
46  public:
47  //----------------------------------------------------------
48  /** @name Constructors, affectation, destructor */
49  //@{
50  GETCoBo ( u_int n_asad = 4, u_int n = 0, double dt = 0.01L );
51  virtual ~GETCoBo ( );
52  //@}
53 
54  //----------------------------------------------------------
55  /** @name GET configuration */
56  //@{
57  virtual int ResetConfig ( );
58 
59  const GETCfgCoBo * GetConfig ( ) const; // inline
60  GETCfgCoBo * GetConfig ( ); // inline
61  //@}
62 
63  //----------------------------------------------------------
64  /** @name Initialization functions */
65  //@{
66  virtual void Reset ( );
67  virtual void Init ( u_int n_asad, u_int n, double dt );
68  virtual void ClearEvent ( );
69  //@}
70 
71  //----------------------------------------------------------
72  /** @name GET system core objects functions */
73  //@{
74  virtual string GetObjectId ( ) const; // inline
75 
76  virtual u_int GetChildrenNumber ( ) const; // inline
77  virtual const GETObject * GetChild ( u_int i ) const; // inline
78  virtual GETObject * GetChild ( u_int i ); // inline
79 
80  const GETAsAd & operator [] ( u_int n ) const; // inline
81  GETAsAd & operator [] ( u_int n ); // inline
82 
83  u_int GetAsAdNumber ( ) const; // inline
84  //@}
85 
86 
87  //------------------------------------------------------------
88  /** @name Read / write of custom objects scheme */
89  //@{
90 
91  //@}
92 
93 
94  //----------------------------------------------------------
95  /** @name ROOT related functions */
96  //@{
97  public:
98 
99  /*! for use within ROOT.*/
100  ClassDef(GETCoBo,0);
101  //@}
102 };
103 
104 //----------------------------------------------------------------------
105 // Inline functions
106 #include "icc/GETCoBo.icc"
107 
108 
109 //======================================================================
110 #endif
GObject(GETCoBo)
Definition: GETAsAd.hh:32
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:44
virtual u_int GetChildrenNumber() const
Definition: GETCoBo.icc:27
u_int asad_number
Number of AsAd boards controlled.
Definition: GETCoBo.hh:40
GETAsAd * asad
Array of AsAd boards.
Definition: GETCoBo.hh:41
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:126