GET library
GETAsAd.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETAsAd.hh
3  *
4  * Include file for the GETAsAd class.
5  */
6 //======================================================================
7 
8 #ifndef GET_ASAD_HH
9 #define GET_ASAD_HH
10 
11 //----------------------------------------------------------------------
12 
13 #include "GETAGet.hh"
14 #include "GETCfgAsAd.hh"
15 
16 //! Number of chips (AGET) on the AsAd board
17 #define ASAD_SIZE 4
18 
19 class GETCoBo;
20 
21 //======================================================================
22 /*! \class GETAsAd
23  *
24  * This class describes the AsAd board, that holds 4 Aget chips.
25  *
26  * In addition to the GETObject identification in the architecture,
27  * the AsAd boards are identified with a serial number, that may be
28  * used for calibration files identification.
29  * This serial number should be unique, and set by user for each AsAd
30  * board.
31  */
32 class GETAsAd : public GETObject
33 {
34  //------------------------------------------------------------
35  /*! \object_doc */
37  //------------------------------------------------------------
38 
39  friend class GETCoBo;
40  friend class GETCfgAsAd;
41 
42  protected:
43  string serial_id; ///< Unique board identifier
44 
45  // GET architecture
46  GETAGet aget[ASAD_SIZE]; ///< AGET chips
47 
48  // GET configuration
49  GETCfgAsAd * config; ///< Configuration data
50 
51  public:
52  //----------------------------------------------------------
53  /** @name Constructors, affectation, destructor */
54  //@{
55  GETAsAd ( u_int n = 0, double dt = 0.01L );
56  virtual ~GETAsAd ( );
57  //@}
58 
59  //----------------------------------------------------------
60  /** @name GET configuration */
61  //@{
62  virtual int ResetConfig ( );
63 
64  const GETCfgAsAd * GetConfig ( ) const; // inline
65  GETCfgAsAd * GetConfig ( ); // inline
66  //@}
67 
68  //----------------------------------------------------------
69  /** @name Initialization functions */
70  //@{
71  virtual void Reset ( );
72  virtual void Init ( u_int n, double dt );
73  virtual void ClearEvent ( );
74  //@}
75 
76  //----------------------------------------------------------
77  /** @name GET system core objects functions */
78  //@{
79  virtual string GetObjectId ( ) const; // inline
80 
81  virtual string GetSerialId ( ) const; // inline
82  void SetSerialId ( const string & ser_id ); // inline // inline
83 
84  virtual u_int GetChildrenNumber ( ) const; // inline
85  virtual const GETObject * GetChild ( u_int i ) const; // inline
86  virtual GETObject * GetChild ( u_int i ); // inline
87 
88  const GETAGet & operator [] ( u_int n ) const; // inline
89  GETAGet & operator [] ( u_int n ); // inline
90  //@}
91 
92 
93  //------------------------------------------------------------
94  /** @name Read / write of custom objects scheme */
95  //@{
96 
97  //@}
98 
99 
100  //----------------------------------------------------------
101  /** @name ROOT related functions */
102  //@{
103  public:
104 
105  /*! for use within ROOT.*/
106  ClassDef(GETAsAd,0);
107  //@}
108 };
109 
110 //----------------------------------------------------------------------
111 // Inline functions
112 #include "icc/GETAsAd.icc"
113 
114 
115 //======================================================================
116 #endif
117 
virtual ~GETAsAd()
Definition: GETAsAd.cpp:36
virtual string GetSerialId() const
Definition: GETAsAd.icc:28
Definition: GETAsAd.hh:32
void SetSerialId(const string &ser_id)
Definition: GETAsAd.icc:34
virtual u_int GetChildrenNumber() const
Definition: GETAsAd.icc:39
ClassDef(GETAsAd, 0)
virtual void Reset()
Definition: GETAsAd.cpp:73
virtual string GetObjectId() const
Definition: GETAsAd.icc:23
GETCfgAsAd * config
Configuration data.
Definition: GETAsAd.hh:49
virtual void ClearEvent()
Definition: GETAsAd.cpp:124
virtual int ResetConfig()
Definition: GETAsAd.cpp:52
GETAGet aget[4]
AGET chips.
Definition: GETAsAd.hh:46
virtual const GETObject * GetChild(u_int i) const
Definition: GETAsAd.icc:45
GETAsAd(u_int n=0, double dt=0.01L)
Definition: GETAsAd.cpp:20
Definition: GETCfgAsAd.hh:27
Definition: GETObject.hh:38
GObject(GETAsAd)
const GETCfgAsAd * GetConfig() const
Definition: GETAsAd.icc:13
const GETAGet & operator[](u_int n) const
Definition: GETAsAd.icc:67
virtual void Init(u_int n, double dt)
Definition: GETAsAd.cpp:87
#define ASAD_SIZE
Number of chips (AGET) on the AsAd board.
Definition: GETAsAd.hh:17
string serial_id
Unique board identifier.
Definition: GETAsAd.hh:43
Definition: GETCoBo.hh:27
Definition: GETAGet.hh:34