BOSS
7.0.2
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
20
MdcHitMapGuts::MdcHitMapGuts(
const
MdcDetector
& gm)
21
: _hits(gm.nLayer())
22
{
23
unsigned
n
= _hits.size();
24
for
(
unsigned
l = 0; l <
n
; ++l) {
25
const
MdcLayer
* lay = gm.
Layer
(l);
26
_hits[l].resize(lay->
nWires
(),0);
// resizes and zeroes
27
}
28
}
29
30
MdcHitMapGuts::~MdcHitMapGuts
()
31
{
32
}
33
34
MdcHitMapGuts
*
35
MdcHitMapGuts::instance(
const
MdcDetector
& gm)
36
{
37
static
MdcHitMapGuts
theInstance(gm);
38
theInstance.clear();
39
return
&theInstance;
40
}
41
42
void
43
MdcHitMapGuts::clear
()
44
{
45
for
(MdcHitMap_t::iterator j = _hits.begin(); j != _hits.end(); ++j) {
46
std::fill(j->begin(),j->end(),
static_cast<
MdcHit
*
>
(0));
47
}
48
}
49
50
void
51
MdcHitMapGuts::addHit
(
MdcHit
& theHit)
52
{
53
_hits[theHit.
layernumber
()][theHit.
wirenumber
()] = &theHit;
54
}
55
n
const Int_t n
Definition:
DataBase/tau_mode.c:65
MdcDetector
Definition:
InstallArea/include/MdcGeom/MdcGeom/MdcDetector.h:20
MdcDetector::Layer
const MdcLayer * Layer(unsigned id) const
Definition:
InstallArea/include/MdcGeom/MdcGeom/MdcDetector.h:33
MdcHitMapGuts
Definition:
InstallArea/include/MdcData/MdcData/MdcHitMapGuts.h:24
MdcHitMapGuts::clear
void clear()
Definition:
MdcHitMapGuts.cxx:43
MdcHitMapGuts::addHit
void addHit(MdcHit &theHit)
Definition:
MdcHitMapGuts.cxx:51
MdcHitMapGuts::~MdcHitMapGuts
virtual ~MdcHitMapGuts()
Definition:
MdcHitMapGuts.cxx:30
MdcHit
Definition:
InstallArea/include/MdcData/MdcData/MdcHit.h:44
MdcHit::layernumber
unsigned layernumber() const
Definition:
InstallArea/include/MdcData/MdcData/MdcHit.h:61
MdcHit::wirenumber
unsigned wirenumber() const
Definition:
InstallArea/include/MdcData/MdcData/MdcHit.h:62
MdcLayer
Definition:
InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h:15
MdcLayer::nWires
int nWires(void) const
Definition:
InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h:30
source
Reconstruction
MdcPatRec
MdcData
MdcData-00-01-27
src
MdcHitMapGuts.cxx
Generated by
1.9.6