StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcDetector.h
1 
5 /***************************************************************************
6  *
7  * $Id: StEmcDetector.h,v 2.8 2004/10/15 18:17:58 ullrich Exp $
8  *
9  * Author: Akio Ogawa, Jan 2000`
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StEmcDetector.h,v $
17  * Revision 2.8 2004/10/15 18:17:58 ullrich
18  * Increased mMaxNumberOfCrates to 36.
19  *
20  * Revision 2.7 2004/10/14 20:00:18 ullrich
21  * Added member and methods to deal with crate status flags.
22  *
23  * Revision 2.6 2004/07/20 17:07:49 perev
24  * Pavlinov corrs for TBrowser
25  *
26  * Revision 2.5 2003/09/12 21:54:53 jeromel
27  * Zeroing
28  *
29  * Revision 2.4 2002/02/22 22:56:47 jeromel
30  * Doxygen basic documentation in all header files. None of this is required
31  * for QM production.
32  *
33  * Revision 2.3 2001/04/05 04:00:35 ullrich
34  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
35  *
36  * Revision 2.2 2000/10/26 00:02:24 ullrich
37  * Fixed various problems causing I/O failures.
38  *
39  * Revision 2.1 2000/02/23 17:33:59 ullrich
40  * Initial Revision
41  *
42  **************************************************************************/
43 #ifndef StEmcDetector_hh
44 #define StEmcDetector_hh
45 
46 #include "StObject.h"
47 #include "StEnumerations.h"
48 
49 class StEmcRawHit;
50 class StEmcModule;
52 
53 class StEmcDetector : public StObject {
54 public:
55  StEmcDetector();
56  StEmcDetector(StDetectorId, unsigned int);
57  ~StEmcDetector();
58 
59  StDetectorId detectorId() const;
60  unsigned int numberOfModules() const;
61 
62  bool addHit(StEmcRawHit*);
63  unsigned int numberOfHits() const;
64  void printNumberOfHits() const; // *MENU*
65  double getEnergy(const int pri=0) const; // *MENU*
66 
67  StEmcModule* module(unsigned int);
68  const StEmcModule* module(unsigned int) const;
69 
70  StEmcClusterCollection* cluster();
71  const StEmcClusterCollection* cluster() const;
72 
73  StEmcCrateStatus crateStatus(int) const;
74 
75  void setCluster(StEmcClusterCollection*);
76  void setModule(StEmcModule*, int);
77  void setCrateStatus(int, StEmcCrateStatus);
78 
79  virtual bool IsFolder() const;
80 
81 protected:
82  void clear();
83 
84 private:
85  enum { mMaxNumberOfCrates = 36 };
86  StDetectorId mDetectorId;
87  UInt_t mNumberOfModules;
88  StEmcModule *mModules[120];
89  StEmcClusterCollection *mClusters;
90  StEmcCrateStatus mCrateStatusFlag[mMaxNumberOfCrates];
91 
92  ClassDef(StEmcDetector,2)
93 };
94 #endif