hepmc

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/trunk/ @ 446  →  /trunk/ @ 447
/trunk/test/testFlow.sh.in
@@ -27,6 +27,7 @@
sed 's/e-0/e-/g' - | \
@DIFF_Q@ - @srcdir@/testFlow.output`
fi
cmd2=`@DIFF_Q@ testFlow.out4 testFlow.out5`
;;
*)
if [ "@HEPMC_DEFAULT_MOM_UNIT@" = "MEV" ];then
@@ -34,6 +35,7 @@
else
cmd1=`@DIFF_Q@ testFlow.out @srcdir@/testFlow.output`
fi
cmd2=`@DIFF_Q@ testFlow.out4 testFlow.out5`
esac
 
if [ -n "$cmd1" ]
@@ -42,4 +44,10 @@
exit 1;
fi
 
if [ -n "$cmd2" ]
then
echo $cmd2
exit 1;
fi
 
exit 0;
/trunk/test/testFlow.cc
@@ -40,7 +40,10 @@
HepMC::IO_GenEvent xout1("testFlow.out1",std::ios::out);
HepMC::IO_GenEvent xout2("testFlow.out2",std::ios::out);
HepMC::IO_GenEvent xout3("testFlow.out3",std::ios::out);
// output streams for copy test
std::ofstream xout4( "testFlow.out4" );
std::ofstream xout5( "testFlow.out5" );
int numbad = 0;
 
 
@@ -149,7 +152,13 @@
os.width(8);
os << (*it)->pdg_id() << " " << (*it)->flow(1) << std::endl;
}
xout1 << evt;
// write event
xout1 << evt;
// testing bug #73987 - flow not copied
// call the write method directly
evt->write(xout4);
// make a copy and write it
HepMC::GenEvent(*evt).write(xout5);
 
// try changing and erasing flow
p2->set_flow(2,345);