StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTpcSimpleElectronics.hh
1 /**********************************************************************
2  *
3  * $Id: StTpcSimpleElectronics.hh,v 1.4 1999/02/28 20:17:53 lasiuk Exp $
4  *
5  * Author: brian Nov 3, 1998
6  *
7  **********************************************************************
8  *
9  * Description: Abstract Class interface for Electronics parameters
10  *
11  **********************************************************************
12  *
13  * $Log: StTpcSimpleElectronics.hh,v $
14  * Revision 1.4 1999/02/28 20:17:53 lasiuk
15  * add numberOfTimeBins
16  *
17  * Revision 1.3 1999/02/24 19:33:17 lasiuk
18  * add tzero offset parameter
19  *
20  * Revision 1.2 1999/01/18 10:21:57 lasiuk
21  * add tau
22  *
23  * Revision 1.1 1998/11/10 17:12:07 fisyak
24  * Put Brian trs versin into StRoot
25  *
26  * Revision 1.1 1998/11/04 18:52:26 lasiuk
27  * Initial Revision
28  *
29  **********************************************************************/
30 #ifndef ST_TPC_SIMPLE_ELECTRONICS_HH
31 #define ST_TPC_SIMPLE_ELECTRONICS_HH
32 
33 #include "StTpcElectronics.hh"
34 
36 public:
37  ~StTpcSimpleElectronics() {/* nopt */}
38  //StTpcSimpleElectronics(const StTpcSimpleElectronics&);
39  //StTpcSimpleElectronics& operator=(const StTpcSimpleElectronics&);
40 
41  static StTpcElectronics* instance();
42  static StTpcElectronics* instance(const char*);
43 
44  // Analog Electronics
45  double nominalGain() const;
46  double channelGain(int,int,int) const;
47  double channelGain(StTpcPadCoordinate&) const;
48  double samplingFrequency() const;
49  double tZero() const;
50  double shapingTime() const;
51  double tau() const;
52 
53  // Digital Electronics
54  double adcConversion() const;
55  double adcConversionCharge() const;
56  int numberOfTimeBins() const;
57  int averagePedestal() const;
58  int pedestal(int,int,int,int) const;
59  int pedestal(StTpcPadCoordinate&) const;
60 
61  // Diagnostic: print out complete database
62  void print(ostream& = cout) const;
63 
64 private:
66  StTpcSimpleElectronics(const char*);
67 
68 private:
69  static StTpcElectronics* mInstance;
70 
71  double mNominalGain;
72  double mSamplingFrequency;
73  double mTZero;
74  double mShapingTime;
75  double mTau;
76 
77  double mAdcConversion;
78  double mAdcConversionCharge;
79  int mNumberOfTimeBins;
80  int mAveragePedestal;
81 };
82 inline double StTpcSimpleElectronics::nominalGain() const {return mNominalGain;}
83 inline double StTpcSimpleElectronics::samplingFrequency() const {return mSamplingFrequency;}
84 inline double StTpcSimpleElectronics::shapingTime() const {return mShapingTime;}
85 inline double StTpcSimpleElectronics::tZero() const {return mTZero;}
86 inline double StTpcSimpleElectronics::tau() const {return mTau;}
87 inline double StTpcSimpleElectronics::adcConversion() const {return mAdcConversion;}
88 inline double StTpcSimpleElectronics::adcConversionCharge() const {return mAdcConversionCharge;}
89 inline int StTpcSimpleElectronics::numberOfTimeBins() const {return mNumberOfTimeBins;}
90 inline int StTpcSimpleElectronics::averagePedestal() const {return mAveragePedestal;}
91 #endif