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 GETSystem;
42  friend class GETAsAd;
43  friend class GETCfgAGet;
44 
45  protected:
46  // Indexes information
47  static bool index_init; ///< Test if index initialization is done
48  static u_int index_asic [AGET_SIZE]; ///< ASIC index from channel number
49  static u_int index_channel[AGET_SIZE]; ///< Channel number from ASIC I/O index
50  static u_int index_fpn [4]; ///< FPN channels indexes in ASIC
51  static u_int closer_fpn [AGET_SIZE]; ///< Closer FPN channel
52 
53  // GET architecture
54  GETChannel channel[AGET_SIZE]; ///< ASIC channels
55  u_short last_cell; ///< Index of last cell read in circular memory buffer
56 
57  // GET configuration
58  GETCfgAGet * config; ///< Configuration data
59 
60  public:
61  //----------------------------------------------------------
62  /** @name Constructors, affectation, destructor */
63  //@{
64  GETAGet ( u_int n = 0, double dt = 0.01L );
65  virtual ~GETAGet ( );
66  //@}
67 
68  //----------------------------------------------------------
69  /** @name GET configuration */
70  //@{
71  virtual int ResetConfig ( );
72 
73  const GETCfgAGet * GetConfig ( ) const; // inline
74  GETCfgAGet * GetConfig ( ); // inline
75 
76  static u_int GetFPNIndex ( u_int ifpn ); // inline
77  static u_int CloserFPNIndex ( u_int channel ); // inline
78 
79  //@}
80 
81  //----------------------------------------------------------
82  /** @name Initialization functions */
83  //@{
84  virtual void Reset ( );
85  virtual void Init ( u_int n, double dt );
86  virtual void ClearEvent ( );
87  //@}
88 
89  //----------------------------------------------------------
90  /** @name GET system core objects functions */
91  //@{
92  virtual string GetObjectId ( ) const; // inline
93  virtual u_int GetSignalChannelCount ( ) const; // inline
94  virtual u_int GetTotalChannelCount ( ) const; // inline
95  virtual GETChannel * GetSignalChannel ( u_int n ); // inline
96  virtual GETChannel * GetTotalChannel ( u_int n ); // inline
97 
98  virtual GETChannel * GetFPNChannel ( u_int n ); // inline
99 
100  virtual u_int GetChildrenNumber ( ) const; // inline
101  virtual const GETObject * GetChild ( u_int i ) const; // inline
102  virtual GETObject * GetChild ( u_int i ); // inline
103 
104  virtual double GetSignalSum ( u_short info = GET::signalOut );
105 
106  // redefined from GET object base class to check for FPN channels
107  virtual void SetResponse ( GETResponse * ptr, bool recur = true, bool fpn = false );
108  virtual void SetResponse ( GETResponse & obj, bool recur = true, bool fpn = false );
109  virtual void SetFilter ( GETFilter * ptr, bool recur = true, bool fpn = false );
110  virtual void SetFilter ( GETFilter & obj, bool recur = true, bool fpn = false );
111  virtual void SetNoiseIn ( GETSignalModifier * ptr, bool recur = true, bool fpn = false );
112  virtual void SetNoiseIn ( GETSignalModifier & obj, bool recur = true, bool fpn = false );
113  virtual void SetNoiseOut ( GETSignalModifier * ptr, bool recur = true, bool fpn = false );
114  virtual void SetNoiseOut ( GETSignalModifier & obj, bool recur = true, bool fpn = false );
115  virtual void SetOutputCorrection ( GETSignalModifier * ptr, bool recur = true, bool fpn = false );
116  virtual void SetOutputCorrection ( GETSignalModifier & obj, bool recur = true, bool fpn = false );
117  //@}
118 
119  //----------------------------------------------------------
120  /** @name Access to class data */
121  //@{
122  const GETChannel & operator [] ( u_int n ) const; // inline
123  GETChannel & operator [] ( u_int n ); // inline
124 
125  bool IsFPN ( u_int n ) const;
126  bool IsSignal ( u_int n ) const;
127 
128  u_short GetLastCell ( ) const; // inline
129  void SetLastCell ( u_short cell ); // inline
130  //@}
131 
132 
133  //------------------------------------------------------------
134  /** @name AGet data funtions */
135  //@{
136  void FillAverageFPN ( GETSample & mean );
138  //@}
139 
140  //------------------------------------------------------------
141  /** @name Read / write of custom objects scheme */
142  //@{
143 
144  //@}
145 
146 
147  //----------------------------------------------------------
148  /** @name Functions for internal use */
149  //@{
150  protected:
151  static void InitIndexes ( );
152  //@}
153 
154  //----------------------------------------------------------
155  /** @name ROOT related functions */
156  //@{
157  public:
158 
159  /*! for use within ROOT.*/
160  ClassDef(GETAGet,0);
161  //@}
162 };
163 
164 
165 //----------------------------------------------------------------------
166 // Inline functions
167 #include "icc/GETAGet.icc"
168 
169 
170 //======================================================================
171 #endif
Definition: GETAsAd.hh:35
static u_int index_asic[68]
ASIC index from channel number.
Definition: GETAGet.hh:48
static const u_short signalOut
Output (experimental data) signal sample.
Definition: GETCommon.hh:110
virtual void SetFilter(GETFilter *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:299
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:427
virtual u_int GetSignalChannelCount() const
Definition: GETAGet.icc:40
void FillAverageFPN(GETSample &mean)
Definition: GETAGet.cpp:468
bool IsFPN(u_int n) const
Definition: GETAGet.cpp:229
Definition: GETFilter.hh:21
Definition: GETChannel.hh:41
virtual double GetSignalSum(u_short info=GET::signalOut)
Definition: GETAGet.cpp:208
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:257
Definition: GETObject.hh:38
virtual ~GETAGet()
Definition: GETAGet.cpp:47
GETCfgAGet * config
Configuration data.
Definition: GETAGet.hh:58
virtual void SetNoiseIn(GETSignalModifier *ptr, bool recur=true, bool fpn=false)
Definition: GETAGet.cpp:341
static u_int index_channel[68]
Channel number from ASIC I/O index.
Definition: GETAGet.hh:49
u_short last_cell
Index of last cell read in circular memory buffer.
Definition: GETAGet.hh:55
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:51
virtual void Reset()
Definition: GETAGet.cpp:143
RRealSampleFFT GETSample
Define the data type for samples.
Definition: GETCommon.hh:31
GETSample GetAverageFPN()
Definition: GETAGet.cpp:481
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:242
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:383
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:54
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:50
Definition: GETAGet.hh:34
static bool index_init
Test if index initialization is done.
Definition: GETAGet.hh:47
Definition: GETSystem.hh:147
static u_int CloserFPNIndex(u_int channel)
Definition: GETAGet.icc:30
GObject(GETAGet)