00001
00002
00003
00004
00005
00006
00007 #include "DecayEntry.h"
00008
00009 #include "PDTEntry.h"
00010 #include "gismo/PData.h"
00011 #include <stdio.h>
00012
00013
00014
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