BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/MdcData/MdcData/MdcHitMapGuts.h
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcHitMapGuts.h,v 1.2 2005/07/18 03:16:11 zhangy Exp $
4//
5// Description:
6// Singleton implementation of MdcHitMap. Requesting an instance either
7// creates one (first call) or clears the existing one (all subsequent calls).
8//
9// Environment:
10// Software developed for the BaBar Detector at the SLAC B-Factory.
11//
12// Author(s): Steve Schaffner
13//
14//------------------------------------------------------------------------
15
16#ifndef DCHHITMAPGUTS_HH
17#define DCHHITMAPGUTS_HH
18
19#include <vector>
20class MdcHit;
21class MdcDetector;
22
23// Class interface //
25
26 friend class MdcHitMap; // only one who can make one of these
27
28public:
29 virtual ~MdcHitMapGuts();
30
31 MdcHit* hitWire(int lay, int wire) const {
32 return _hits[lay][wire];
33 }
34
35 void addHit(MdcHit& theHit) ;
36
37 void removeHit(int lay, int wire) {
38 // could switch to () notation to avoid overhead for bounds-checking
39 _hits[lay][wire] = 0;
40 }
41
42 void clear();
43
44private:
45
46 static MdcHitMapGuts* instance(const MdcDetector&);
47 MdcHitMapGuts(const MdcDetector&); // only used internally
48
49 typedef std::vector<std::vector< MdcHit* > > MdcHitMap_t;
50 MdcHitMap_t _hits;
51
52 // Preempt
53 MdcHitMapGuts& operator= (const MdcHitMapGuts&);
55};
56
57#endif
MdcHit * hitWire(int lay, int wire) const
void addHit(MdcHit &theHit)
virtual ~MdcHitMapGuts()