Commit effb0535 authored by Lynn Garren's avatar Lynn Garren
Browse files

make examples work in new configuration

parent a7741b69
......@@ -57,6 +57,36 @@ AC_SUBST(Geometry_LDFLAGS)
AH_TOP([#ifndef GEOMETRY_DEFS_H
#define GEOMETRY_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
AH_BOTTOM([#endif // GEOMETRY_DEFS_H])
......
......@@ -59,11 +59,46 @@ AC_SUBST(HepMC_LDFLAGS)
AH_TOP([#ifndef HEPMC_DEFS_H
#define HEPMC_DEFS_H])
AH_BOTTOM([/* use correct std::ios_base or std::ios (old) */
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
AH_BOTTOM([
/* use correct std::ios_base or std::ios (old) */
#ifdef HAVE_IOS_BASE
#define HepIOS std::ios_base
#define HepIOSOpenMode std::ios_base::openmode
#define HepIOSBadBit std::ios_base::badbit
#else
#define HepIOS std::ios
#define HepIOSOpenMode std::ios::open_mode
#define HepIOSBadBit std::ios::badbit
#endif
#endif // HEPMC_DEFS_H])
......
......@@ -24,10 +24,10 @@ endif
################################################################################
CXX = g++
INCDIR = -I../../..
INCDIR = -I$(CLHEP_DIR)/include
HepMCinc = $(INCDIR)/CLHEP/HepMC
PythiaLIB = $(LULIB)/pydata.o $(LULIB)/liblund.a $(LULIB)/libpydum.a
LIBNAME = ../../libCLHEP-g++.1.8.0.0.a
LIBNAME = $(CLHEP_DIR)/lib/libCLHEP-1.9.0.0.a
################################################################################
......
......@@ -8,6 +8,8 @@
#include "IO_Ascii.h"
#include "CLHEP/HepMC/GenEvent.h"
using namespace CLHEP;
namespace HepMC {
IO_Ascii::IO_Ascii( const char* filename, HepIOSOpenMode mode )
......
......@@ -43,7 +43,7 @@
#include <map>
#include <vector>
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/HepMC/defs.h"
#include "CLHEP/HepMC/GenEvent.h"
namespace HepMC {
......
......@@ -5,9 +5,9 @@
// using PythiaWrapper.h and WriteHepMC.h
//////////////////////////////////////////////////////////////////////////
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/config/fstream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include <fstream>
#include "CLHEP/HepMC/include/PythiaWrapper.h"
#include "CLHEP/HepMC/WriteHepMC.h"
......
......@@ -7,9 +7,9 @@
// gmake examples/example_EventSelection.exe
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/config/fstream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include <fstream>
#include "CLHEP/HepMC/ReadHepMC.h"
#include "CLHEP/HepMC/WriteHepMC.h"
......
......@@ -9,7 +9,7 @@
// gmake examples/example_EventSelection.exe
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/HepMC/defs.h"
#include "IO_Ascii.h"
#include "CLHEP/HepMC/GenEvent.h"
......
......@@ -9,8 +9,8 @@
// ascii format using the IO_Ascii strategy.
//////////////////////////////////////////////////////////////////////////
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include "CLHEP/HepMC/include/PythiaWrapper.h"
#include "CLHEP/HepMC/ConvertHEPEVT.h"
#include "IO_Ascii.h"
......
......@@ -14,8 +14,8 @@
// See comments in examples/example_MyPythia.cxx regarding the HEPEVT wrapper.
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include "CLHEP/HepMC/include/PythiaWrapper.h"
#include "CLHEP/HepMC/ConvertHEPEVT.h"
#include "CLHEP/HepMC/GenEvent.h"
......
......@@ -13,8 +13,8 @@
// See comments in examples/example_MyPythia.cxx regarding the HEPEVT wrapper.
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include "CLHEP/HepMC/include/PythiaWrapper.h"
#include "CLHEP/HepMC/ConvertHEPEVT.h"
#include "CLHEP/HepMC/GenEvent.h"
......
......@@ -6,7 +6,7 @@
// gmake examples/example_UsingIterators.exe
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/HepMC/defs.h"
#include "IO_Ascii.h"
#include "CLHEP/HepMC/GenEvent.h"
#include <math.h>
......
......@@ -6,8 +6,8 @@
//
//////////////////////////////////////////////////////////////////////////
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include "CLHEP/HepMC/include/PythiaWrapper.h"
#include "CLHEP/HepMC/ConvertHEPEVT.h"
#include "CLHEP/HepMC/GenEvent.h"
......
......@@ -11,8 +11,8 @@
// To Compile: go to the HepMC directory and type:
//
#include "CLHEP/config/CLHEP.h"
#include "CLHEP/config/iostream.h"
#include "CLHEP/HepMC/defs.h"
#include <iostream>
#include "CLHEP/HepMC/include/PythiaWrapper.h"
#include "CLHEP/HepMC/ConvertHEPEVT.h"
#include "IO_Ascii.h"
......
......@@ -60,6 +60,36 @@ AC_SUBST(HepPDT_LDFLAGS)
AH_TOP([#ifndef VECTOR_DEFS_H
#define VECTOR_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
AH_BOTTOM([#endif // VECTOR_DEFS_H])
......
// $Id: StdHepfromStdEvent.icc,v 1.1.1.1 2003/07/15 20:15:05 garren Exp $
// $Id: StdHepfromStdEvent.icc,v 1.2 2003/08/29 02:06:13 garren Exp $
// ----------------------------------------------------------------------
// HEPEVTfromStdEvent.icc
// ----------------------------------------------------------------------
......@@ -77,14 +77,14 @@ bool CBstdhep::CollisionToStdTmp( const HepMC::GenEvent * col )
for ( int i = 1; i <= particle_counter; ++i ) {
tptr->isthept[i-1] = index_to_particle[i]->status();
tptr->idhept[i-1] = index_to_particle[i]->pdg_id();
HepLorentzVector m = index_to_particle[i]->momentum();
CLHEP::HepLorentzVector m = index_to_particle[i]->momentum();
tptr->phept[i-1][0] = m.px();
tptr->phept[i-1][1] = m.py();
tptr->phept[i-1][2] = m.pz();
tptr->phept[i-1][3] = m.e();
tptr->phept[i-1][4] = index_to_particle[i]->generatedMass();
if ( index_to_particle[i]->production_vertex() ) {
HepLorentzVector p = index_to_particle[i]->
CLHEP::HepLorentzVector p = index_to_particle[i]->
production_vertex()->position();
tptr->vhept[i-1][0] = p.x();
tptr->vhept[i-1][1] = p.y();
......
// $Id: StdHeptoGenEvent.icc,v 1.1.1.1 2003/07/15 20:15:05 garren Exp $
// $Id: StdHeptoGenEvent.icc,v 1.2 2003/08/29 02:06:13 garren Exp $
// ----------------------------------------------------------------------
//
// StdHeptoHepMC::GenEvent.icc
......@@ -85,7 +85,7 @@ HepMC::GenParticle* CBstdhep::createParticle( int index ) {
// Builds a particle object corresponding to index in HEPEVT
//
HepMC::GenParticle* p
= new HepMC::GenParticle( HepLorentzVector( hptr->phep[index-1][0],
= new HepMC::GenParticle( CLHEP::HepLorentzVector( hptr->phep[index-1][0],
hptr->phep[index-1][1],
hptr->phep[index-1][2],
hptr->phep[index-1][3] ),
......@@ -121,18 +121,18 @@ void CBstdhep::buildProductionVertex( int i,
// b. if no suitable production vertex exists - and the particle
// has atleast one mother or position information to store -
// make one
HepLorentzVector prod_pos( hptr->vhep[i-1][0], hptr->vhep[i-1][1],
CLHEP::HepLorentzVector prod_pos( hptr->vhep[i-1][0], hptr->vhep[i-1][1],
hptr->vhep[i-1][2], hptr->vhep[i-1][3]
);
if ( !prod_vtx && (number_parents(i-1)>0
|| prod_pos!=HepLorentzVector(0,0,0,0)) )
|| prod_pos!=CLHEP::HepLorentzVector(0,0,0,0)) )
{
prod_vtx = new HepMC::GenVertex();
prod_vtx->add_particle_out( p );
evt->add_vertex( prod_vtx );
}
// c. if prod_vtx doesn't already have position specified, fill it
if ( prod_vtx && prod_vtx->position()==HepLorentzVector(0,0,0,0) ) {
if ( prod_vtx && prod_vtx->position()==CLHEP::HepLorentzVector(0,0,0,0) ) {
prod_vtx->set_position( prod_pos );
}
// d. loop over mothers to make sure their end_vertices are
......@@ -198,13 +198,13 @@ void CBstdhep::buildEndVertex( int iend,
end_vtx->add_particle_out( hepevt_particle[daughter] );
//
// 2001-03-29 M.Dobbs, fill vertex the position.
if ( end_vtx->position()==HepLorentzVector(0,0,0,0) ) {
HepLorentzVector prod_pos( hptr->vhep[daughter-1][0],
if ( end_vtx->position()==CLHEP::HepLorentzVector(0,0,0,0) ) {
CLHEP::HepLorentzVector prod_pos( hptr->vhep[daughter-1][0],
hptr->vhep[daughter-1][1],
hptr->vhep[daughter-1][2],
hptr->vhep[daughter-1][3]
);
if ( prod_pos != HepLorentzVector(0,0,0,0) ) {
if ( prod_pos != CLHEP::HepLorentzVector(0,0,0,0) ) {
end_vtx->set_position( prod_pos );
}
}
......
......@@ -53,11 +53,45 @@ AC_SUBST(StdHep_LDFLAGS)
AH_TOP([#ifndef STDHEP_DEFS_H
#define STDHEP_DEFS_H])
## the undefs are converted by configure
AH_VERBATIM([PACKAGE],[/* Name of package */
#ifndef PACKAGE
#undef PACKAGE
#endif])
AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
#ifndef PACKAGE_BUGREPORT
#undef PACKAGE_BUGREPORT
#endif])
AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
#ifndef PACKAGE_NAME
#undef PACKAGE_NAME
#endif])
AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
#ifndef PACKAGE_STRING
#undef PACKAGE_STRING
#endif])
AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
#ifndef PACKAGE_TARNAME
#undef PACKAGE_TARNAME
#endif])
AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
#ifndef PACKAGE_VERSION
#undef PACKAGE_VERSION
#endif])
AH_VERBATIM([VERSION],[/* Version number of package */
#ifndef VERSION
#undef VERSION
#endif])
AH_BOTTOM([/* use correct std::ios_base or std::ios (old) */
#ifdef HAVE_IOS_BASE
#define HepIOS std::ios_base
#define HepIOSOpenMode std::ios_base::openmode
#define HepIOSBadBit std::ios_base::badbit
#else
#define HepIOS std::ios
#define HepIOSOpenMode std::ios::open_mode
#define HepIOSBadBit std::ios::badbit
#endif
#endif // STDHEP_DEFS_H])
......
......@@ -10,16 +10,12 @@ ifndef CXX
CXX = g++
endif
ifndef CLHEPdir
CLHEPdir=../../..
endif
ifndef LIBNAME
LIBNAME = libCLHEP-g++.1.8.0.0.a
LIBNAME = libCLHEP-1.9.0.0.a
endif
ifndef PythiaLIB
PythiaLIB = $(LULIB)/pdfdum.o $(LULIB)/pydata.o $(LULIB)/pyr.o $(LULIB)/liblund.a
PythiaLIB = $(LULIB)/pydata.o $(LULIB)/liblund.a $(LULIB)/libpydum.a
endif
......@@ -111,11 +107,11 @@ ifeq "$(UNAME)" "SunOS"
LOCAL= -L/opt/SUNWspro/lib -lm -lnsl -lsocket -lF77 -lM77 -ldbxFintr -lsunmath -R/opt/SUNWspro/lib
endif
INCDIR = -I$(CLHEPdir) -I$(LUND_DIR)/src/inc -I$(HERWIG_DIR)/src
INCDIR = -I$(CLHEP_DIR)/include -I$(LUND_DIR)/src/inc -I$(HERWIG_DIR)/src
CPPFLGS = $(KPPFLAGS) $(INCDIR)
CXXFLAGS = $(DFLG) $(INCDIR)
STDHEPLIB = $(CLHEPdir)/lib/$(LIBNAME)
STDHEPLIB = $(CLHEP_DIR)/lib/$(LIBNAME)
PYTOBJS = examPythiaToStdHep$(SFX).o stdpytcxx$(SFX).o dummy$(SFX).o \
......
......@@ -5,6 +5,8 @@
#include "analyzeEvent.hh"
#include "CLHEP/StdHep/StdEvent.hh"
using namespace CLHEP;
void analyzeEvent( const StdHep::StdEvent * event )
{
// look at an event
......
Supports Markdown
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