Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DecayEntry.cxx

Go to the documentation of this file.
00001 // -*- C++ -*-  $Id: DecayEntry.cxx,v 1.2 2000/01/17 23:37:28 burnett Exp $
00002 //
00003 // This file is part of Gismo 2
00004 //
00005 
00006 
00007 #include "DecayEntry.h"
00008 
00009 #include "PDTEntry.h"
00010 #include "gismo/PData.h"
00011 #include <stdio.h>
00012 
00013 
00014 // ----------------DecayEntry implementation ---------------------
00015 
00016 
00017 DecayEntry::DecayEntry(float bf, PData* childData[])
00018 {
00019    branchingFraction = bf;
00020 
00021    for(numChildren = 0; childData[numChildren]; numChildren++);
00022 
00023    children = new PData*[numChildren+1];
00024    for(int i=0; i<numChildren; i++)
00025       children[i] = childData[i];
00026 }
00027 
00028 void DecayEntry::printOn(std::ostream& cout)const
00029 {       char line[80];
00030 
00031         sprintf(line,"%5.3f %-8s -> ", branchingFraction,  name() );
00032    cout << line;
00033    for(int i=0; i<numChildren; i++)
00034       cout << children[i]->name() << " ";
00035 
00036 }
00037 

Generated at Mon Nov 26 18:18:32 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000