Commit 53b215e0 authored by Lynn Garren's avatar Lynn Garren
Browse files

adding test for BUG #16801

parent 138ab3ea
......@@ -71,6 +71,7 @@ AC_CONFIG_FILES([HepMC/include/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([test/testPrintBug.sh], [chmod +x test/testPrintBug.sh])
AC_CONFIG_FILES([examples/Makefile])
AC_CONFIG_FILES([examples/GNUmakefile.example])
AC_CONFIG_FILES([HepMC-deps])
......@@ -154,7 +155,7 @@ AH_BOTTOM([/* use correct std::ios_base or std::ios (old) */
# ----------------------------------------------------------------------
# Locate a C++ compiler:
AC_PROG_CXX(cl g++ c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
AC_PROG_CXX(cl g++ g++4 c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
# Use it hereinafter:
AC_LANG(C++)
......@@ -209,6 +210,27 @@ g++)
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
esac;;
g++4)
case "$target" in
*-*-linux*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
;;
*-*-darwin*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
MY_SHFLAGS=""; MY_SHLINK="-dynamiclib -single_module -undefined dynamic_lookup"; SHEXT=dylib
MY_SHNAME="-Wl,-install_name,"; MY_LD="-bind_at_load -Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
build_shared="yes"
;;
*)
AM_CXXFLAGS="-O -ansi -pedantic -Wall"
MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
AR="ar"; ARFLAGS="cru"
esac;;
c++)
case "$target" in
*-*-linux*)
......
......@@ -23,13 +23,13 @@ endif
# Identify executables needed during testing:
check_PROGRAMS = \
testDoubleConversion testRandomState
testDoubleConversion testRandomState testPrintBug
#check_SCRIPTS =
check_SCRIPTS = testPrintBug.sh
# Identify test(s) to run when 'make check' is requested:
TESTS = \
testDoubleConversion testRandomState
testDoubleConversion testRandomState testPrintBug.sh
# Identify the test(s) for which failure is the intended outcome:
XFAIL_TESTS =
......@@ -37,9 +37,10 @@ XFAIL_TESTS =
# Identify the dependencies on a per-test basis:
testDoubleConversion_SOURCES = testDoubleConversion.cc
testRandomState_SOURCES = testRandomState.cc
testPrintBug_SOURCES = testPrintBug.cc
# Identify input data file(s) and prototype output file(s):
#EXTRA_DIST =
EXTRA_DIST = testPrintBug.output
# Identify generated file(s) to be removed when 'make clean' is requested:
CLEANFILES =
//
// Thanks to Bob McElrath for this test
//
#include <fstream>
#include "CLHEP/HepMC/GenEvent.h"
#include "CLHEP/HepPDT/ParticleDataTable.hh"
#include "CLHEP/HepPDT/ParticleData.hh"
#include "CLHEP/HepPDT/DefaultConfig.hh"
#include "CLHEP/HepPDT/TableBuilder.hh"
#include "CLHEP/HepPDT/ParticleDataTableT.hh"
#include "CLHEP/HepPDT/TempParticleData.hh"
#include "CLHEP/Vector/LorentzVector.h"
int main(int argc,char* argv[])
{
HepMC::GenEvent* p_event;
p_event = new HepMC::GenEvent();
// define an output stream
std::ofstream os( "testPrintBug.out" );
for(int i=0; i<10; i++) {
CLHEP::HepLorentzVector vector(1.0,1.0,1.0,1.0);
HepMC::GenVertex* vertex = new HepMC::GenVertex(vector,i);
for(int j=0; j<3; j++) {
HepMC::GenParticle* particle = new HepMC::GenParticle(vector,1,2);
vertex->add_particle_in(particle);
}
for(int j=0; j<3; j++) {
HepMC::GenParticle* particle = new HepMC::GenParticle(vector,1,2);
vertex->add_particle_out(particle);
}
p_event->add_vertex(vertex);
}
p_event->print(os);
}
________________________________________________________________________________
GenEvent: #0 ID=0 SignalProcessGenVertex Barcode: 0
Current Memory Usage: 1 events, 10 vertices, 60 particles.
Entries this event: 10 vertices, 60 particles.
RndmState(0)=
Wgts(0)=
EventScale -1 [energy] alphaQCD=-1 alphaQED=-1
GenParticle Legend
Barcode PDG ID ( Px, Py, Pz, E ) Stat DecayVtx
________________________________________________________________________________
Vertex: -1 ID: 0 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10001 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -1
10002 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -1
10003 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -1
O: 3 10004 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10005 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10006 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -2 ID: 1 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10007 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -2
10008 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -2
10009 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -2
O: 3 10010 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10011 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10012 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -3 ID: 2 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10013 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -3
10014 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -3
10015 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -3
O: 3 10016 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10017 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10018 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -4 ID: 3 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10019 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -4
10020 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -4
10021 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -4
O: 3 10022 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10023 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10024 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -5 ID: 4 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10025 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -5
10026 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -5
10027 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -5
O: 3 10028 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10029 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10030 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -6 ID: 5 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10031 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -6
10032 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -6
10033 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -6
O: 3 10034 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10035 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10036 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -7 ID: 6 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10037 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -7
10038 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -7
10039 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -7
O: 3 10040 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10041 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10042 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -8 ID: 7 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10043 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -8
10044 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -8
10045 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -8
O: 3 10046 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10047 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10048 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -9 ID: 8 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10049 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -9
10050 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -9
10051 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -9
O: 3 10052 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10053 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10054 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
Vertex: -10 ID: 9 (X,cT)=+1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00
I: 3 10055 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -10
10056 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -10
10057 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2 -10
O: 3 10058 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10059 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
10060 1 +1.00e+00,+1.00e+00,+1.00e+00,+1.00e+00 2
________________________________________________________________________________
#! /bin/sh
# @configure_input@
./testPrintBug@EXEEXT@
@DIFF_Q@ testPrintBug.out @srcdir@/testPrintBug.output > /dev/null
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment