StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMcEmcHitCollection.hh
1 /***************************************************************************
2  *
3  * $Id: StMcEmcHitCollection.hh,v 2.11 2018/03/15 22:00:35 smirnovd Exp $
4  * $Log: StMcEmcHitCollection.hh,v $
5  * Revision 2.11 2018/03/15 22:00:35 smirnovd
6  * Fix linker error by removing declared but undefined functions
7  *
8  * Revision 2.10 2012/06/11 14:51:46 fisyak
9  * std namespace
10  *
11  * Revision 2.9 2012/03/22 00:33:58 perev
12  * private => protected
13  *
14  * Revision 2.8 2005/11/22 21:44:51 fisyak
15  * Add compress Print for McEvent, add Ssd collections
16  *
17  * Revision 2.7 2005/09/28 21:30:14 fisyak
18  * Persistent StMcEvent
19  *
20  * Revision 2.6 2005/06/28 18:06:41 fine
21  * Remove the redundant data-member StMcEmcModuleHitCollection mModules[mNumberOfModules] causing the crash duw double destruction of one and the same object
22  *
23  * Revision 2.5 2005/01/27 23:40:47 calderon
24  * Adding persistency to StMcEvent as a step for Virtual MonteCarlo.
25  *
26  * Revision 2.4 2001/05/31 02:45:55 perev
27  * const(ing)
28  *
29  * Revision 2.3 2001/05/13 21:12:10 calderon
30  * Modifications by Aleksei to the Emc Hit Collections on indexing of
31  * module numbers
32  *
33  * Revision 2.2 2000/08/30 14:52:03 calderon
34  * New changes made by Aleksei.
35  *
36  *
37  **************************************************************************/
38 #ifndef StMcEmcHitCollection_hh
39 #define StMcEmcHitCollection_hh
40 
41 #include "StMcEmcModuleHitCollection.hh"
42 
43 class StMcCalorimeterHit;
44 
46  public:
47  enum EAddHit {kNull, kErr, kNew, kAdd};
48  enum {mNumberOfModules=120};
50  StMcEmcHitCollection(char*);
51  StMcEmcHitCollection(const char*);
52  virtual ~StMcEmcHitCollection();
53 
54  StMcEmcHitCollection::EAddHit addHit(StMcCalorimeterHit*);
55  unsigned long numberOfHits() const;
56  unsigned int numberOfModules() const { return mNumberOfModules; }
57  float sum() const;
58 
59  StMcEmcModuleHitCollection* module(unsigned int m);
60  const StMcEmcModuleHitCollection* module(unsigned int m) const;
61 
62  StMcEmcModuleHitCollection& thisModule(unsigned int m) {
63  TObjArray &modules = *GetObjArray();
64  return *(StMcEmcModuleHitCollection *)modules[m];
65  }
66  const StMcEmcModuleHitCollection& thisModule(unsigned int m) const {
67  TObjArray &modules = *GetObjArray();
68  return *(const StMcEmcModuleHitCollection *)modules[m];
69  }
70 
71  virtual Bool_t IsFolder() const {return kTRUE;} // It is a directory for modules
72  virtual void Browse(TBrowser *b);
73  void print();
74  virtual void Print(Option_t *option="") const; // *MENU*
75 
76  protected:
77  void MakeHitCollection();
78  protected:
79  ClassDef(StMcEmcHitCollection,1)
80 };
81 
82 std::ostream& operator<<(std::ostream& os, const StMcEmcHitCollection&);
83 #endif
virtual void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).