MdcHitMapGuts Class Reference

#include <MdcHitMapGuts.h>

List of all members.

Public Member Functions

virtual ~MdcHitMapGuts ()
MdcHithitWire (int lay, int wire) const
void addHit (MdcHit &theHit)
void removeHit (int lay, int wire)
void clear ()

Private Types

typedef std::vector< std::vector<
MdcHit * > > 
MdcHitMap_t

Private Member Functions

 MdcHitMapGuts (const MdcDetector &)
MdcHitMapGutsoperator= (const MdcHitMapGuts &)
 MdcHitMapGuts (const MdcHitMapGuts &)

Static Private Member Functions

static MdcHitMapGutsinstance (const MdcDetector &)

Private Attributes

MdcHitMap_t _hits

Friends

class MdcHitMap


Detailed Description

Definition at line 24 of file MdcHitMapGuts.h.


Member Typedef Documentation

typedef std::vector<std::vector< MdcHit* > > MdcHitMapGuts::MdcHitMap_t [private]

Definition at line 49 of file MdcHitMapGuts.h.


Constructor & Destructor Documentation

MdcHitMapGuts::~MdcHitMapGuts (  )  [virtual]

Definition at line 30 of file MdcHitMapGuts.cxx.

00031 {
00032 }

MdcHitMapGuts::MdcHitMapGuts ( const MdcDetector  )  [private]

Definition at line 20 of file MdcHitMapGuts.cxx.

References _hits, and MdcDetector::Layer().

00021         : _hits(gm.nLayer())
00022 {
00023   unsigned n = _hits.size();
00024   for (unsigned l = 0; l < n; ++l) {
00025     const MdcLayer* lay = gm.Layer(l);
00026     _hits[l].resize(lay->nWires(),0);  // resizes and zeroes
00027   }
00028 }

MdcHitMapGuts::MdcHitMapGuts ( const MdcHitMapGuts  )  [private]


Member Function Documentation

void MdcHitMapGuts::addHit ( MdcHit theHit  ) 

Definition at line 51 of file MdcHitMapGuts.cxx.

References _hits, MdcHit::layernumber(), and MdcHit::wirenumber().

Referenced by MdcHitMap::addHit().

00052 {
00053   _hits[theHit.layernumber()][theHit.wirenumber()] = &theHit;
00054 }

void MdcHitMapGuts::clear (  ) 

Definition at line 43 of file MdcHitMapGuts.cxx.

References _hits, fill(), and ganga-rec::j.

Referenced by MdcHitMap::clearMap(), and instance().

00044 {
00045   for (MdcHitMap_t::iterator j = _hits.begin(); j != _hits.end(); ++j) {
00046     std::fill(j->begin(),j->end(),static_cast<MdcHit *>(0));
00047   }
00048 }

MdcHit* MdcHitMapGuts::hitWire ( int  lay,
int  wire 
) const [inline]

Definition at line 31 of file MdcHitMapGuts.h.

References _hits.

Referenced by MdcHitMap::hitWire().

00031                                            {
00032       return _hits[lay][wire];
00033   }

MdcHitMapGuts * MdcHitMapGuts::instance ( const MdcDetector  )  [static, private]

Definition at line 35 of file MdcHitMapGuts.cxx.

References clear().

Referenced by MdcHitMap::MdcHitMap().

00036 {
00037   static MdcHitMapGuts theInstance(gm);
00038   theInstance.clear();
00039   return &theInstance;
00040 }

MdcHitMapGuts& MdcHitMapGuts::operator= ( const MdcHitMapGuts  )  [private]

void MdcHitMapGuts::removeHit ( int  lay,
int  wire 
) [inline]

Definition at line 37 of file MdcHitMapGuts.h.

References _hits.

Referenced by MdcHitMap::removeHit().

00037                                     {
00038         // could switch to () notation to avoid overhead for bounds-checking
00039         _hits[lay][wire] = 0;
00040   }


Friends And Related Function Documentation

friend class MdcHitMap [friend]

Definition at line 26 of file MdcHitMapGuts.h.


Member Data Documentation

MdcHitMap_t MdcHitMapGuts::_hits [private]

Definition at line 50 of file MdcHitMapGuts.h.

Referenced by addHit(), clear(), hitWire(), MdcHitMapGuts(), and removeHit().


Generated on Tue Nov 29 23:20:12 2016 for BOSS_7.0.2 by  doxygen 1.4.7