BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Reconstruction/MdcPatRec/MdcRecoUtil/src/DecayMode.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------
2// File and Version Information:
3// $Id: DecayMode.cxx,v 1.1.1.1 2005/04/21 01:15:12 zhangy Exp $
4//
5//------------------------------------------------------------------------
6//
7// Moved some stuff here from DecayMode.hh to avoid nested includes
8//
9#include "MdcRecoUtil/DecayMode.h"
10#include "MdcRecoUtil/PdtEntry.h"
11
12#include <iomanip>
13#include <vector>
14using std::ostream;
15using std::setprecision;
16using std::setw;
17using std::vector;
18
19DecayMode::DecayMode( float bf, vector<PdtEntry*>* l ) {
21 _children = l;
22}
23
25 if ( _children )
26 {
27 // need to destroy also -4602
28 vector<PdtEntry*>::iterator iter = _children->begin();
29 while ( iter != _children->end() )
30 {
31 delete *iter;
32 ++iter;
33 }
34 _children->clear();
35 }
36 delete _children;
37 _children = 0;
38}
39
40void DecayMode::printOn( ostream& os ) const {
41 os << " " << setw( 5 ) << setprecision( 3 ) << _branchingFraction << " ->";
42 int l = _children->size();
43 for ( int i = 0; i < l; i++ ) os << " " << ( *_children )[i]->name();
44 os << '\n';
45}
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
void printOn(std::ostream &os) const