StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFTPCReader.h
1 /***************************************************************************
2  *
3  * $Id: StFTPCReader.h,v 1.5 2001/07/26 13:52:33 oldi Exp $
4  *
5  * Author: Holm Huemmler
6  ***************************************************************************
7  *
8  * Description: Offline Wrapper for DAQ FTPC reader classes
9  *
10  ***************************************************************************
11  *
12  * $Log: StFTPCReader.h,v $
13  * Revision 1.5 2001/07/26 13:52:33 oldi
14  * Bug fix to circumvent crashes due to missing FTPC data.
15  *
16  * Revision 1.4 2001/06/19 21:12:12 jeromel
17  * Code update (Janet S.)
18  *
19  * Revision 1.3 2000/11/24 17:56:18 fisyak
20  * Replace St_fss_Maker by StFtpcSlowSimMaker
21  *
22  * Revision 1.2 2000/06/12 15:04:02 perev
23  * SVT + cleanup
24  *
25  * Revision 1.1 2000/01/24 14:39:33 perev
26  * FTPC (HolmMade) is added
27  *
28  *
29  *
30  **************************************************************************/
31 #ifndef _StFTPCReader_
32 #define _StFTPCReader_
33 #ifndef __CINT__
34 #include "StTPCReader.h"
35 #endif
36 
37 #include "StFtpcSlowSimMaker/StFssSectorReader.hh"
38 
40 {
41  public:
42 
44  StFTPCReader(unsigned short *fcl_ftpcsqndx, int nSeq,
45  char *fcl_ftpcadc, int nAdc);
46  virtual ~StFTPCReader();
47  virtual int close();
48 
49  bool checkForData(); // gives true if FTPC data available
50 
51  int getMaxPad(int PadRow) const {return 160;}; //Number of pads in padrow
52 
53  virtual int getPadList(int Sector, int PadRow, unsigned char *&padList);
54  // Fills (*padList[]) with the list of pad numbers containing hits
55  // returns number of pads in (*padList)[]
56  // or negative if call fails
57 
58  virtual int getSequences(int Sector, int PadRow, int Pad, int *nSeq,
59  TPCSequence *&SeqData);
60  // Fills (*SeqData)[] along with the ADC
61  // buffers pointed to by (*SeqData)[]
62  // Set nSeq to the # of elements in the (*SeqData)[] array
63  // returns 0 if OK.
64  // or negative if call fails
65 
66  virtual int getRawADC(int Sector,int PadRow, int Pad, int &nArray,
67  unsigned char *&Array);
68  // Fills (*Array)[] with Raw data
69  // Fills nArray with the # of elements in (*Array)[] (512 bytes / TPC)
70  // returns 0 if OK.
71  // returns negative if call fails
72 
73 
74  virtual int getPedestals(int Sector,int PadRow, int Pad, int &nArray,
75  unsigned char *&Array);
76 
77  // Fills (*Array)[] with Pedestal data
78  // Fills nArray with the # of elements in Array (512 bytes for TPC)
79  // returns 0 if OK.
80  // returns negative if call fails
81 
82 
83  virtual int getRMSPedestals(int Sector,int PadRow, int Pad, int &nArray,
84  unsigned char *&Array);
85 
86  // Fills (*Array)[] with Pedestal RMS data * 16
87  // Fills nArray with the # of elements in (*Array)[] (512 bytes / TPC)
88  // returns 0 if OK.
89  // returns negative if call fails
90 
91 
92  virtual int getGain(int Sector, int PadRow, int Pad, TPCGain *&gain);
93  // sets (*gain) to a valid gain structure pointer
94  // returns 0 if OK
95  // returns negative if call fails
96 
97 
98 // virtual int getMeanGain();
99  // returns mean gain
100 
101 // virtual int getGainEvents();
102  // returns the number of events the calculation is based upon
103 
104  virtual int getClusters(int Sector, int PadRow, int Pad, int &nClusters,
105  TPCCluster *&clusters);
106  // sets (*clusters) to beginning of array of clusters
107  // sets nClusters to the length of the array
108  // returns 0 if OK
109  // returns negative if call fails
110 
111  virtual int IsBad(int Sector, int PadRow, int Pad);
112  // returns true if the pad is bad.
113  // returns false if the pad is not bad.
114 
115  virtual void Update();
116 protected:
117  virtual int setSector(int sector);
118 
119  StDAQReader *fDAQReader;
120  DetectorReader *fFTPCImpReader;
121  ZeroSuppressedReader *fZeroSuppressedReader;
122  ADCRawReader *fADCRawReader;
123  PedestalReader *fPedestalReader;
124  PedestalRMSReader *fPedestalRMSReader;
125  GainReader *fGainReader;
126  CPPReader *fCPPReader;
127  BadChannelReader *fBadChannelReader;
128 
129  int fSector;
130 
131  int simu;
132  unsigned short *m_ftpcsqndx;
133  int m_numSqndx;
134  char *m_ftpcadc;
135  int m_numAdc;
136  StFssSectorReader *mSecReader;
137 };
138 #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