StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StSVTReader.h
1 /***************************************************************************
2  *
3  *
4  *
5  * Author: Marcelo Munhoz
6  ***************************************************************************
7  *
8  * Description: Offline Wrapper for DAQ SVT reader classes
9  *
10  ***************************************************************************
11  *
12  *
13  *
14  **************************************************************************/
15 #ifndef _StSVTReader_
16 #define _StSVTReader_
17 
18 #ifndef __CINT__
19 #include "StDAQReader.h"
20 #include "StTPCReader.h"
21 #endif /*__CINT__*/
22 
24 {
25  public:
26 
28  virtual ~StSVTReader();
29  virtual int close();
30 
31  virtual int getAnodeList(int Barrel, int Ladder, int Wafer, int Hybrid, unsigned char *&anodeList);
32  // Fills (*anodeList[]) with the list of anode numbers containing hits
33  // returns number of anodes in (*anodeList)[]
34  // or negative if call fails
35 
36  virtual int getSequences(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode, int &nSeq,
37  TPCSequence *&SeqData);
38  // Fills (*SeqData)[] along with the ADC
39  // buffers pointed to by (*SeqData)[]
40  // Set nSeq to the # of elements in the (*SeqData)[] array
41  // returns 0 if OK.
42  // or negative if call fails
43 
44  virtual int getRawADC(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode, int &nArray,
45  unsigned char *&Array);
46  // Fills (*Array)[] with Raw data
47  // Fills nArray with the # of elements in (*Array)[] (128 bytes / SVT)
48  // returns 0 if OK.
49  // returns negative if call fails
50 
51 
52  virtual int getPedestals(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode, int &nArray,
53  unsigned char *&Array);
54 
55  // Fills (*Array)[] with Pedestal data
56  // Fills nArray with the # of elements in Array (128 bytes for SVT)
57  // returns 0 if OK.
58  // returns negative if call fails
59 
60 
61  virtual int getRMSPedestals(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode, int &nArray,
62  unsigned char *&Array);
63 
64  // Fills (*Array)[] with Pedestal RMS data * 16
65  // Fills nArray with the # of elements in (*Array)[] (128 bytes / SVT)
66  // returns 0 if OK.
67  // returns negative if call fails
68 
69 
70  virtual int getGain(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode, TPCGain *&gain);
71  // sets (*gain) to a valid gain structure pointer
72  // returns 0 if OK
73  // returns negative if call fails
74 
75 
76 // virtual int getMeanGain();
77  // returns mean gain
78 
79 // virtual int getGainEvents();
80  // returns the number of events the calculation is based upon
81 
82  virtual int getClusters(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode, int &nClusters,
83  TPCCluster *&clusters);
84  // sets (*clusters) to beginning of array of clusters
85  // sets nClusters to the length of the array
86  // returns 0 if OK
87  // returns negative if call fails
88 
89  virtual int IsBad(int Barrel, int Ladder, int Wafer, int Hybrid, int Anode);
90  // returns true if the anode is bad.
91  // returns false if the anode is not bad.
92 
93  int getSCAZero(){return mSCAZero;}
94  int getTimeZero(){return mTimeZero;}
95  virtual void Update();
96 protected:
97 
98  virtual int setWafer(int Barrel, int Ladder, int Wafer);
99  int getWaferIndex(int Barrel, int Ladder, int Wafer);
100 
101  StDAQReader *fDAQReader;
102  DetectorReader *fSVTImpReader;
103  ZeroSuppressedReader *fZeroSuppressedReader;
104  ADCRawReader *fADCRawReader;
105  PedestalReader *fPedestalReader;
106  PedestalRMSReader *fPedestalRMSReader;
107  GainReader *fGainReader;
108  CPPReader *fCPPReader;
109  BadChannelReader *fBadChannelReader;
110 
111  int fBarrel, fLadder, fWafer, fHybrid;
112 
113  int mSCAZero;
114  int mTimeZero;
115 };
116 
117 #endif
void rd(int hits=0, bool clear=false)
This function redraws all hits and/or tracks from the current event.
Definition: Ed.C:69