CGEM BOSS
6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CDMud.cc
Go to the documentation of this file.
1
#ifndef CLEODCHAIN_CDMUD_CC
2
#define CLEODCHAIN_CDMUD_CC
3
// -*- C++ -*-
4
//
5
// Package: CleoDChain
6
// Module: CDMud
7
//
8
// Description: Manage the footprints for a given Evidence Class
9
//
10
// Usage:
11
// <usage>
12
//
13
// Author: Simon Patton
14
// Created: Mon Apr 20 20:47:30 PDT 1998
15
// $Id: CDMud.cc,v 1.1.1.1 2009/03/03 06:05:56 maqm Exp $
16
//
17
// Revision history
18
//
19
// $Log: CDMud.cc,v $
20
// Revision 1.1.1.1 2009/03/03 06:05:56 maqm
21
// first import of BesDChain
22
//
23
// Revision 1.1 2001/04/11 13:19:36 urner
24
// transition to files with CD prefix. Addition of new files
25
//
26
// Revision 1.2 2000/12/19 15:11:34 cdj
27
// removed report statement
28
//
29
// Revision 1.1.1.1 2000/12/18 22:17:27 cdj
30
// imported CleoDChain
31
//
32
// Revision 1.4 1998/05/01 20:25:22 sjp
33
// Put in correct include file path
34
//
35
// Revision 1.3 1998/05/01 20:21:59 sjp
36
// Added line to handle g++ bug
37
//
38
// Revision 1.2 1998/04/22 01:24:02 sjp
39
// Corrected logic that expands list of CDFootPrints.
40
//
41
// Revision 1.1 1998/04/21 05:17:22 sjp
42
// New File
43
//
44
45
// system include files
46
#include <vector>
47
48
using
std::vector;
49
50
// user include files
51
#include "
BesDChain/CDFootPrint.h
"
52
#include "
BesDChain/CDMud.h
"
53
54
//
55
// constants, enums and typedefs
56
//
57
58
template
<
class
Ev
id
ence >
59
const
CDFootPrint
&
CDMud< Evidence >::get
(
const
Evidence* aEvidence )
60
{
61
unsigned
int
id( aEvidence->trackId() ) ;
62
vector< const CDFootPrint* >& prints( footprints() ) ;
63
while
(
id
>= prints.size() ) {
64
CDFootPrint
* tmp(
new
CDFootPrint
) ;
65
(*tmp).fresh() ;
66
prints.push_back( tmp ) ;
67
}
68
return
( *(prints[
id
]) ) ;
69
}
70
71
template
<
class
Ev
id
ence >
72
void
CDMud< Evidence >::clear
()
73
{
74
vector< const CDFootPrint* >& prints( footprints() ) ;
75
vector< const CDFootPrint* >::const_iterator finished( prints.end() ) ;
76
for
( vector< const CDFootPrint* >::const_iterator print( prints.begin() ) ;
77
finished != print ;
78
++print ) {
79
80
// cast way const for delete to work
81
delete
( (
CDFootPrint
*)(*print) ) ;
82
}
83
prints.erase( prints.begin() ,
84
prints.end() ) ;
85
}
86
87
template
<
class
Ev
id
ence >
88
vector< const CDFootPrint* >&
89
CDMud< Evidence >::footprints
()
90
{
91
static
vector< const CDFootPrint* > prints ;
92
return
( prints ) ;
93
}
94
95
//
96
// constructors and destructor
97
//
98
99
//
100
// assignment operators
101
//
102
103
//
104
// member functions
105
//
106
107
//
108
// const member functions
109
//
110
111
112
#endif
/* CLEODCHAIN_CDMUD_CC */
CDFootPrint.h
CDMud.h
CDFootPrint
Definition
CDFootPrint.h:81
CDMud::get
static const CDFootPrint & get(const Evidence *aEvidence)
Definition
CDMud.cc:59
CDMud::clear
static void clear()
Definition
CDMud.cc:72
CDMud::footprints
static std::vector< const CDFootPrint * > & footprints()
Definition
CDMud.cc:89
6.6.5.i
Event
BesDChain
BesDChain-00-00-14
BesDChain
Template
CDMud.cc
Generated by
1.12.0