GET library
GETAGet.hh
Go to the documentation of this file.
1 //======================================================================
2 /*! \file GETAGet.hh
3  *
4  * Include file for the GETAGet class.
5  */
6 //======================================================================
7 
8 #ifndef GET_AGET_HH
9 #define GET_AGET_HH
10 
11 //----------------------------------------------------------------------
12 
13 #include "GETChannel.hh"
14 #include "GETCfgAGet.hh"
15 class GETAsAd;
16 
17 //! Number of channels (signal + FPN) of AGET chip
18 #define AGET_SIZE 68
19 
20 //! Number of channels (signal of AGET chip
21 #define AGET_CHANNELS 64
22 
23 //======================================================================
24 /*! \class GETAGet
25  *
26  * This class describes the AGET chip.
27  * It contains 68 data channels (ASIC channels):
28  * - 64 signal channels
29  * - 4 Fix Pattern Noise (FPN) channels.
30  *
31  * The correspondance between ASIC channels and signal channels is
32  * stored in static conversion arrays.
33  */
34 class GETAGet : public GETObject
35 {
36  //------------------------------------------------------------
37  /*! \object_doc */
39  //------------------------------------------------------------
40 
41  friend class GETAsAd;
42  friend class GETCfgAGet;
43 
44  protected:
45  // Indexes information
46  static bool index_init; ///< Test if index initialization is done
47  static u_int index_asic [AGET_SIZE]; ///< ASIC index from channel number
48  static u_int index_channel[AGET_SIZE]; ///< Channel number from ASIC I/O index
49  static u_int index_fpn [4]; ///< FPN channels indexes in ASIC
50  static u_int closer_fpn [AGET_SIZE]; ///< Closer FPN channel
51 
52  // GET architecture
53  GETChannel channel[AGET_SIZE]; ///< ASIC channels
54  u_short last_cell; ///< Index of last cell read in circular memory buffer
55 
56  // GET configuration
57  GETCfgAGet * config; ///< Configuration data
58 
59  public:
60  //----------------------------------------------------------
61  /** @name Constructors, affectation, destructor */
62  //@{
63  GETAGet ( u_int n = 0, double dt = 0.01L );
64  virtual ~GETAGet ( );
65  //@}
66 
67  //----------------------------------------------------------
68  /** @name GET configuration */
69  //@{
70  virtual int ResetConfig ( );
71 
72  const GETCfgAGet * GetConfig ( ) const; // inline
73  GETCfgAGet * GetConfig ( ); // inline
74 
75  static u_int GetFPNIndex ( u_int ifpn ); // inline
76  static u_int CloserFPNIndex ( u_int channel ); // inline
77 
78  //@}
79 
80  //----------------------------------------------------------
81  /** @name Initialization functions */
82  //@{
83  virtual void Reset ( );
84  virtual void Init ( u_int n, double dt );
85  virtual void ClearEvent ( );
86  //@}
87 
88  //----------------------------------------------------------
89  /** @name GET system core objects functions */
90  //@{
91  virtual string GetObjectId ( ) const; // inline
92  virtual u_int GetSignalChannelCount ( ) const; // inline
93  virtual u_int GetTotalChannelCount ( ) const; // inline
94  virtual GETChannel * GetSignalChannel ( u_int n ); // inline
95  virtual GETChannel * GetTotalChannel ( u_int n ); // inline
96 
97  virtual GETChannel * GetFPNChannel ( u_int n ); // inline
98 
99  virtual u_int GetChildrenNumber ( ) const; // inline
100  virtual const GETObject * GetChild ( u_int i ) const; // inline
101  virtual GETObject * GetChild ( u_int i ); // inline
102 
103  virtual double GetSignalSum ( u_short info = GET::signalOut );
104 
105  // redefined from GET object base class to check for FPN channels
106  virtual void SetResponse ( GETResponse * ptr, bool recur = true, bool fpn = false );
107  virtual void SetResponse ( GETResponse & obj, bool recur = true, bool fpn = false );
108  virtual void SetFilter ( GETFilter * ptr, bool recur = true, bool fpn = false );
109  virtual void SetFilter ( GETFilter & obj, bool recur = true, bool fpn = false );
110  virtual void SetNoiseIn ( GETSignalModifier * ptr, bool recur = true, bool fpn = false );
111  virtual void SetNoiseIn ( GETSignalModifier & obj, bool recur = true, bool fpn = false );
112  virtual void SetNoiseOut ( GETSignalModifier * ptr, bool recur = true, bool fpn = false );
113  virtual void SetNoiseOut ( GETSignalModifier & obj, bool recur = true, bool fpn = false );
114  virtual void SetOutputCorrection ( GETSignalModifier * ptr, bool recur = true, bool fpn = false );
115  virtual void SetOutputCorrection ( GETSignalModifier & obj, bool recur = true, bool fpn = false );
116  //@}
117 
118  //----------------------------------------------------------
119  /** @name Access to class data */
120  //@{
121  const GETChannel & operator [] ( u_int n ) const; // inline
122  GETChannel & operator [] ( u_int n ); // inline
123 
124  bool IsFPN ( u_int n ) const;
125  bool IsSignal ( u_int n ) const;
126 
127  u_short GetLastCell ( ) const; // inline
128  void SetLastCell ( u_short cell ); // inline
129  //@}
130 
131 
132  //------------------------------------------------------------
133  /** @name Read / write of custom objects scheme */
134  //@{
135 
136  //@}
137 
138 
139  //----------------------------------------------------------
140  /** @name Functions for internal use */
141  //@{
142  protected:
143  static void InitIndexes ( );
144  //@}
145 
146  //----------------------------------------------------------
147  /** @name ROOT related functions */
148  //@{
149  public:
150 
151  /*! for use within ROOT.*/
152  ClassDef(GETAGet,0);
153  //@}
154 };
155 
156 
157 //----------------------------------------------------------------------
158 // Inline functions
159 #include "icc/GETAGet.icc"
160 
161 
162 //======================================================================
163 #endif
Definition: GETAsAd.hh:32
static u_int index_asic[68]
ASIC index from channel number.
Definition: GETAGet.hh:47
static const u_short signalOut
Output (experimental data) signal sample.
Definition: GETCommon.hh:104
virtual void SetFilter(GETFilter *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:298
Definition: GETResponse.hh:23
virtual const GETObject * GetChild(u_int i) const
Definition: GETAGet.icc:74
virtual void SetOutputCorrection(GETSignalModifier *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:426
virtual u_int GetSignalChannelCount() const
Definition: GETAGet.icc:40
bool IsFPN(u_int n) const
Definition: GETAGet.cpp:228
Definition: GETFilter.hh:21
Definition: GETChannel.hh:41
virtual double GetSignalSum(u_short info=GET::signalOut)
Definition: GETAGet.cpp:207
virtual int ResetConfig()
Definition: GETAGet.cpp:62
Definition: GETCfgAGet.hh:24
ClassDef(GETAGet, 0)
virtual GETChannel * GetFPNChannel(u_int n)
Definition: GETAGet.icc:62
virtual void Init(u_int n, double dt)
Definition: GETAGet.cpp:157
#define AGET_SIZE
Number of channels (signal + FPN) of AGET chip.
Definition: GETAGet.hh:18
void SetLastCell(u_short cell)
Definition: GETAGet.icc:108
virtual void SetResponse(GETResponse *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:256
Definition: GETObject.hh:38
virtual ~GETAGet()
Definition: GETAGet.cpp:47
GETCfgAGet * config
Configuration data.
Definition: GETAGet.hh:57
virtual void SetNoiseIn(GETSignalModifier *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:340
static u_int index_channel[68]
Channel number from ASIC I/O index.
Definition: GETAGet.hh:48
u_short last_cell
Index of last cell read in circular memory buffer.
Definition: GETAGet.hh:54
static u_int GetFPNIndex(u_int ifpn)
Definition: GETAGet.icc:23
virtual void ClearEvent()
Definition: GETAGet.cpp:195
static u_int closer_fpn[68]
Closer FPN channel.
Definition: GETAGet.hh:50
virtual void Reset()
Definition: GETAGet.cpp:143
virtual string GetObjectId() const
Definition: GETAGet.icc:36
virtual GETChannel * GetSignalChannel(u_int n)
Definition: GETAGet.icc:50
bool IsSignal(u_int n) const
Definition: GETAGet.cpp:241
GETAGet(u_int n=0, double dt=0.01L)
Definition: GETAGet.cpp:26
virtual GETChannel * GetTotalChannel(u_int n)
Definition: GETAGet.icc:56
Definition: GETSignalModifier.hh:22
const GETCfgAGet * GetConfig() const
Definition: GETAGet.icc:13
virtual void SetNoiseOut(GETSignalModifier *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:382
virtual u_int GetTotalChannelCount() const
Definition: GETAGet.icc:44
virtual u_int GetChildrenNumber() const
Definition: GETAGet.icc:68
GETChannel channel[68]
ASIC channels.
Definition: GETAGet.hh:53
static void InitIndexes()
Definition: GETAGet.cpp:85
const GETChannel & operator[](u_int n) const
Definition: GETAGet.icc:96
u_short GetLastCell() const
Definition: GETAGet.icc:102
static u_int index_fpn[4]
FPN channels indexes in ASIC.
Definition: GETAGet.hh:49
Definition: GETAGet.hh:34
static bool index_init
Test if index initialization is done.
Definition: GETAGet.hh:46
static u_int CloserFPNIndex(u_int channel)
Definition: GETAGet.icc:30
GObject(GETAGet)