StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFgtAdc.h
1 /***************************************************************************
2  *
3  * $Id: StMuFgtAdc.h,v 1.1 2013/01/08 22:57:33 sangalin Exp $
4  * Author: S. Gliske, Dec 2012
5  *
6  ***************************************************************************
7  *
8  * Description: the ADC value for a particular strip and a particular
9  * time bin. Setting these values in a seperate class (and seperate
10  * TClonesArray) allows for a variable number of time bins. Since the
11  * ADC value is a short (2 bits) and packing usually is optimized for
12  * 4 bits, we can use 2 more bits without effecting the storage space.
13  * We choose to save the time bin number as a signed short. For both
14  * the ADC and time bin fields, negative values indicate errors or
15  * uninitialized values.
16  *
17  ***************************************************************************
18  *
19  * $Log: StMuFgtAdc.h,v $
20  * Revision 1.1 2013/01/08 22:57:33 sangalin
21  * Merged in FGT changes allowing for a variable number of timebins to be read out for each strip.
22  *
23  *
24  **************************************************************************/
25 
26 #ifndef _ST_MU_FGT_ADC_H_
27 #define _ST_MU_FGT_ADC_H_
28 
29 #include <TObject.h>
30 
31 class StMuFgtAdc : public TObject {
32  public:
33  // constructor
34  StMuFgtAdc( Short_t adc = -1, Short_t tb = -1 );
35 
36  // defaults
37  // StMuFgtAdc(const StMuFgtAdc&); use default
38  // StMuFgtAdc& operator=(const StMuFgtAdc&); use default
39  // ~StMuFgtAdc(); use default
40 
41  // accessors
42  Short_t getAdc() const;
43  Short_t getTimeBin() const;
44 
45  // modifiers
46  void setAdcAndTimeBin( Short_t adc, Short_t tb );
47 
48  protected:
49  // data members
50  Short_t mAdc; // an ADC value
51  Short_t mTimeBin; // the time bin number
52 
53  private:
54  ClassDef(StMuFgtAdc,1);
55 };
56 
57 // inline functions
58 
59 inline StMuFgtAdc::StMuFgtAdc( Short_t adc, Short_t tb ) : mAdc(adc), mTimeBin( tb ) { /* */ };
60 
61 inline Short_t StMuFgtAdc::getAdc() const { return mAdc; };
62 inline Short_t StMuFgtAdc::getTimeBin() const { return mTimeBin; };
63 
64 inline void StMuFgtAdc::setAdcAndTimeBin( Short_t adc, Short_t tb ){ mAdc = adc; mTimeBin = tb; };
65 
66 #endif