BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcData/include/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 //
24class MdcHitMapGuts {
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 { return _hits[lay][wire]; }
32
33 void addHit( MdcHit& theHit );
34
35 void removeHit( int lay, int wire ) {
36 // could switch to () notation to avoid overhead for bounds-checking
37 _hits[lay][wire] = 0;
38 }
39
40 void clear();
41
42private:
43 static MdcHitMapGuts* instance( const MdcDetector& );
44 MdcHitMapGuts( const MdcDetector& ); // only used internally
45
46 typedef std::vector<std::vector<MdcHit*>> MdcHitMap_t;
47
48 MdcHitMap_t _hits;
49
50 // Preempt
51 MdcHitMapGuts& operator=( const MdcHitMapGuts& );
52 MdcHitMapGuts( const MdcHitMapGuts& );
53};
54
55#endif
virtual ~MdcHitMapGuts()
void addHit(MdcHit &theHit)