BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcHitMapGuts.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: MdcHitMapGuts.cxx,v 1.4 2009/09/22 06:28:08 zhangy Exp $
4//
5// Description:
6//
7//
8// Environment:
9// Software developed for the BaBar Detector at the SLAC B-Factory.
10//
11// Author(s): Steve Schaffner
12//
13//------------------------------------------------------------------------
14#include "MdcData/MdcHitMapGuts.h"
15#include "MdcData/MdcHit.h"
16#include "MdcGeom/MdcDetector.h"
17#include "MdcGeom/MdcLayer.h"
18#include <iostream>
19
20MdcHitMapGuts::MdcHitMapGuts( const MdcDetector& gm ) : _hits( gm.nLayer() ) {
21 unsigned n = _hits.size();
22 for ( unsigned l = 0; l < n; ++l )
23 {
24 const MdcLayer* lay = gm.Layer( l );
25 _hits[l].resize( lay->nWires(), 0 ); // resizes and zeroes
26 }
27}
28
30
31MdcHitMapGuts* MdcHitMapGuts::instance( const MdcDetector& gm ) {
32 static MdcHitMapGuts theInstance( gm );
33 theInstance.clear();
34 return &theInstance;
35}
36
38 for ( MdcHitMap_t::iterator j = _hits.begin(); j != _hits.end(); ++j )
39 { std::fill( j->begin(), j->end(), static_cast<MdcHit*>( 0 ) ); }
40}
41
43 _hits[theHit.layernumber()][theHit.wirenumber()] = &theHit;
44}
const Int_t n
void addHit(MdcHit &theHit)
virtual ~MdcHitMapGuts()