StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTrsZeroSuppressedReader.hh
1 
2 /***************************************************************************
3  *
4  * $Id: StTrsZeroSuppressedReader.hh,v 1.7 2008/06/20 15:01:04 fisyak Exp $
5  *
6  * Authors: bl, mcbs
7  ***************************************************************************
8  *
9  * Description: Access to the digital information via the abstract
10  * interface
11  *
12  *
13  * Int_t getPadList(Int_t PadRow, u_char **padList);
14  *
15  * Fills (*padList[]) with the list of pad numbers containing hits
16  * returns number of pads in (*padList)[]
17  * or negative if call fails
18  *
19  * Int_t getSequences(Int_t PadRow, Int_t Pad, Int_t *nSeq, StSequence **SeqData)
20  *
21  * Fills (*SeqData)[] along with the ADC
22  * buffers pointed to by (*SeqData)[]
23  * Set nSeq to the # of elements in the (*SeqData)[] array
24  * returns 0 if OK...or negative if call fails
25  *
26  * struct Sequence
27  * {
28  * u_short startTimeBin;
29  * u_short Length;
30  * u_char *FirstAdc;
31  * };
32  ***************************************************************************
33  *
34  * $Log: StTrsZeroSuppressedReader.hh,v $
35  * Revision 1.7 2008/06/20 15:01:04 fisyak
36  * move from StTrsData to StTpcRawData
37  *
38  * Revision 1.6 2005/09/09 22:12:48 perev
39  * Bug fix + IdTruth added
40  *
41  * Revision 1.4 2005/07/19 22:23:04 perev
42  * Bug fix
43  *
44  * Revision 1.3 2003/12/24 13:44:52 fisyak
45  * Add (GEANT) track Id information in Trs; propagate it via St_tpcdaq_Maker; account interface change in StTrsZeroSuppressedReaded in StMixerMaker
46  *
47  * Revision 1.2 2000/03/15 18:08:43 calderon
48  * ZSR is no longer a singleton. Two will be needed for mixer chain.
49  *
50  * Revision 1.1 1999/11/05 22:17:05 calderon
51  * Made private copy constructor and operator= in StTrsDigitalSector.
52  * Renamed DigitalSignalGenerators: Fast -> Old, Parameterized -> Fast
53  * and use new "Fast" as default.
54  * Added StTrsZeroSuppressedReader and StTrsZeroSuppressedReader for DAQ type
55  * data access.
56  *
57  ***************************************************************************/
58 #ifndef ST_TRS_ZERO_SUPPRESSED_READER_HH
59 #define ST_TRS_ZERO_SUPPRESSED_READER_HH
60 
61 #include "StSequence.hh"
62 #include "StDaqLib/GENERIC/EventReader.hh"
63 #include <vector>
64 
65 #include "StTrsRawDataEvent.hh"
66 #include "StTrsDigitalSector.hh"
67 
69 
70 public:
73 
74  Int_t getPadList(Int_t padRow, unsigned char **padList) {return mTheSector->getPadList(padRow,padList);}
75  Int_t getSequences(Int_t padRow, Int_t Pad, Int_t *nSeq, StSequence** SeqData, UShort_t ***Ids=0) {
76  return mTheSector->getSequences(padRow,Pad,nSeq, SeqData, Ids);
77  }
78  Int_t getSequences(Int_t padRow, Int_t Pad, Int_t *nSeq, Sequence** SeqData, UShort_t ***Ids=0) {
79  return getSequences(padRow, Pad, nSeq, (StSequence**) SeqData, Ids);
80  }
81  Int_t setSector(Int_t);
82  void clear() {if (mTheSector) mTheSector->clear();}
83 
84 private:
86 
87  Int_t checkTheData(UInt_t);
88 
89  Int_t mSector;
90  StTrsDigitalSector* mTheSector;
91  StTrsRawDataEvent* mTrsEvent;
92 
93 };
94 #endif