StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StCtbTriggerDetector.h
1 
5 /***************************************************************************
6  *
7  * $Id: StCtbTriggerDetector.h,v 2.7 2007/07/11 23:06:45 perev Exp $
8  *
9  * Author: Thomas Ullrich, Sep 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StCtbTriggerDetector.h,v $
17  * Revision 2.7 2007/07/11 23:06:45 perev
18  * Cleanup+fix StXXXTriggerDetector
19  *
20  * Revision 2.6 2004/02/11 01:42:09 ullrich
21  * Added new constructor to load data from StTriggerData.
22  *
23  * Revision 2.5 2002/11/19 20:21:00 ullrich
24  * Added method to sum all mips.
25  *
26  * Revision 2.4 2002/02/22 22:56:46 jeromel
27  * Doxygen basic documentation in all header files. None of this is required
28  * for QM production.
29  *
30  * Revision 2.3 2001/04/05 04:00:34 ullrich
31  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
32  *
33  * Revision 2.2 2000/05/09 10:22:21 ullrich
34  * Updated to cope with modified dst_TrgDet.idl
35  *
36  * Revision 2.1 1999/10/13 19:42:56 ullrich
37  * Initial Revision
38  *
39  **************************************************************************/
40 #ifndef StCtbTriggerDetector_hh
41 #define StCtbTriggerDetector_hh
42 #include "StObject.h"
43 
44 class dst_TrgDet_st;
45 class StTriggerData;
46 
48 public:
50  StCtbTriggerDetector(const dst_TrgDet_st&);
52  virtual ~StCtbTriggerDetector();
53  // StCtbTriggerDetector(const StCtbTriggerDetector&); use default
54  // StCtbTriggerDetector& operator=(const StCtbTriggerDetector&); use default
55 
56  unsigned int numberOfTrays() const;
57  unsigned int numberOfSlats() const;
58  unsigned int numberOfPreSamples() const;
59  unsigned int numberOfPostSamples() const;
60  unsigned int numberOfAuxWords() const;
61  float mips(unsigned int tray, unsigned int slot, unsigned int evt = 0) const;
62  char time(unsigned int tray, unsigned int slot, unsigned int evt = 0) const;
63  float aux(unsigned int, unsigned int evt = 0) const;
64 
65  double mips(unsigned int evt = 0) const; // sum over all trays, slot
66 
67  void setMips(unsigned int, unsigned int, unsigned int, float);
68  void setTime(unsigned int, unsigned int, unsigned int, char);
69  void setAux(unsigned int, unsigned int, float);
70  void setNumberOfPreSamples(unsigned int);
71  void setNumberOfPostSamples(unsigned int);
72 
73 protected:
74  enum {mMaxTrays = 120,
75  mMaxSlats = 2,
76  mMaxEventSamples = 11,
77  mMaxAux = 16};
78  char mBeg[1];
79  Float_t mMips[mMaxTrays][mMaxSlats][mMaxEventSamples];
80  Char_t mTime[mMaxTrays][mMaxSlats][mMaxEventSamples];
81  Float_t mAux[mMaxAux][mMaxEventSamples];
82  Int_t mNumberOfPreSamples;
83  Int_t mNumberOfPostSamples;
84  char mEnd[1];
85 
86  ClassDef(StCtbTriggerDetector,2)
87 };
88 #endif