Import Geant4 6.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:49:58 +02:00
parent 96686e0c8f
commit 1d812b78b1
4545 changed files with 24433 additions and 175005 deletions
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILE.hh,v 1.8 2001/07/27 22:32:55 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA
// DAWNFILE driver factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILESceneHandler.hh,v 1.12 2002/12/11 15:58:02 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILEViewer.hh,v 1.9 2003/06/16 17:13:27 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA
// DAWNFILE viewer - opens window, hard copy, etc.
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRClientServer.hh,v 1.6 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
////////////////////////////////
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRConst.hh,v 1.6 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
///////////////////////////////////
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRFeatures.hh,v 1.5 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
#if !defined G4_FR_FEATURES_HH
#define G4_FR_FEATURES_HH
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRSceneFunc.icc,v 1.3 2003/05/30 13:01:19 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRofstream.hh,v 1.6 2003/06/16 17:13:28 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
#include <fstream>
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRenderer.hh,v 1.7 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Satoshi TANAKA
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererSceneHandler.hh,v 1.11 2002/12/11 15:58:02 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererViewer.hh,v 1.7 2001/07/11 10:08:44 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILE.cc,v 1.9 2001/07/27 22:32:59 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA
// DAWNFILE factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILESceneHandler.cc,v 1.13 2003/06/16 17:13:29 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA
// DAWNFILE scene.
@@ -22,7 +22,7 @@
//
//
// $Id: G4DAWNFILEViewer.cc,v 1.14 2003/06/16 17:13:30 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA
// DAWNFILE view - opens window, hard copy, etc.
@@ -22,7 +22,7 @@
//
//
// $Id: G4FRClientServer.cc,v 1.5 2001/07/11 10:08:45 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
// Satoshi TANAKA, Wed Jul 3 14:14:29 JST 1996
////////////////////////////////
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRenderer.cc,v 1.7 2001/07/11 10:08:46 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Satoshi TANAKA
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererSceneHandler.cc,v 1.10 2003/06/16 17:13:31 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 11:34:24 JST 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4FukuiRendererViewer.cc,v 1.7 2001/07/11 10:08:46 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Satoshi TANAKA, Fri Jun 28 12:09:11 JST 1996
+35 -1
View File
@@ -1,4 +1,4 @@
.$Id: History,v 1.55 2003/12/05 23:53:19 perl Exp $
.$Id: History,v 1.67 2004/03/15 08:05:37 perl Exp $
-------------------------------------------------------------------
=========================================================
@@ -19,6 +19,40 @@ committal in the CVS repository !
History file for visualization/HepRep sub-category
--------------------------------------------------
14 March 2004 Joseph Perl (vis-HepRep-V06-00-06)
- HepRepFile handle duplicate ShowView.
- HepRepFile improve layering and hierarchy for hits.
1 March 2004 Mark Donszelmann (vis-HepRep-V06-00-05)
- Fixed compilation warnings for the Linux-icc (8.0) compiler.
18 February 2004 Mark Donszelmann
- Removed appendzip.cc file, since it is strictly not necessary.
12 Febryary 2004 Mark Donszelmann
- GEANT-42: Renamed the HepRep schema locator to
http://java.freehep.org/schemas/heprep/2.0
5 February 2004 Mark Donszelmann (vis-HepRep-V06-00-04)
- Fixed compilation problems for the Linux-icc (7.0) compiler.
3 February 2004 Mark Donszelmann (vis-HepRep-V06-00-03)
- Further fix to GEANT-40, renamed zutil.h, zlib.h and zconf.h
into HepRep-zutil.h, ... to avoid conflicts with those files
on Unix systems if /usr/include or /usr/local/include is
on the include search path.
28 January 2004 Mark Donszelmann (vis-HepRep-V06-00-01)
- Attempted to fix GEANT-40. For some unclear reason the symbols zcalloc and zcfree
of the zlib library were being called as C++ mangled names.
To get rid of the situation of a mix of C++ and C names, we took
out the 'extern "C"' declarations from our zlib.h and zutil.h.
All names are C++ mangled now.
11 December 2003 Mark Donszelmann
- Removed the HepRep2 driver from FreeHEP, so the HepRep2 sources now live
in this directory. Modified the copyfreehep scripts, and the READMEs.
Re-added the cvs expand keywords to show revision and tagname.
05 December 2003 Joseph Perl (vis-HepRep-V05-02-09)
- Fix bug with CalHits by moving faces to separate HepRepType
+23 -25
View File
@@ -1,33 +1,31 @@
export HEPREP=$FREEHEP/hep/graphics/heprep
cp $FREEHEP/org/freehep/jni/FreeHepTypes.h include/ref
cp $FREEHEP/org/freehep/zip/zipios++/*.h include/zipios++
cp $FREEHEP/org/freehep/zip/*.h include/zipios++
cp $FREEHEP/org/freehep/zip/*.cpp src
mv src/appendzip.cpp src/appendzip.cc
mv src/basicentry.cpp src/basicentry.cc
mv src/collcoll.cpp src/collcoll.cc
mv src/deflateoutputstreambuf.cpp src/deflateoutputstreambuf.cc
mv src/fcoll.cpp src/fcoll.cc
mv src/fcollexceptions.cpp src/fcollexceptions.cc
mv src/fileentry.cpp src/fileentry.cc
mv src/filepath.cpp src/filepath.cc
mv src/filterinputstreambuf.cpp src/filterinputstreambuf.cc
mv src/filteroutputstreambuf.cpp src/filteroutputstreambuf.cc
mv src/inflateinputstreambuf.cpp src/inflateinputstreambuf.cc
mv src/zipfile.cpp src/zipfile.cc
mv src/ziphead.cpp src/ziphead.cc
mv src/zipheadio.cpp src/zipheadio.cc
mv src/zipinputstream.cpp src/zipinputstream.cc
mv src/zipinputstreambuf.cpp src/zipinputstreambuf.cc
mv src/zipoutputstream.cpp src/zipoutputstream.cc
mv src/zipoutputstreambuf.cpp src/zipoutputstreambuf.cc
cp $HEPREP/geant4/include/*.hh include
#cp $FREEHEP/org/freehep/zip/zipios++/*.h include/zipios++
#cp $FREEHEP/org/freehep/zip/*.h include/zipios++
#cp $FREEHEP/org/freehep/zip/*.cpp src
#rm src/appendzip.cpp
#mv src/basicentry.cpp src/basicentry.cc
#mv src/collcoll.cpp src/collcoll.cc
#mv src/deflateoutputstreambuf.cpp src/deflateoutputstreambuf.cc
#mv src/fcoll.cpp src/fcoll.cc
#mv src/fcollexceptions.cpp src/fcollexceptions.cc
#mv src/fileentry.cpp src/fileentry.cc
#mv src/filepath.cpp src/filepath.cc
#mv src/filterinputstreambuf.cpp src/filterinputstreambuf.cc
#mv src/filteroutputstreambuf.cpp src/filteroutputstreambuf.cc
#mv src/inflateinputstreambuf.cpp src/inflateinputstreambuf.cc
#mv src/zipfile.cpp src/zipfile.cc
#mv src/ziphead.cpp src/ziphead.cc
#mv src/zipheadio.cpp src/zipheadio.cc
#mv src/zipinputstream.cpp src/zipinputstream.cc
#mv src/zipinputstreambuf.cpp src/zipinputstreambuf.cc
#mv src/zipoutputstream.cpp src/zipoutputstream.cc
#mv src/zipoutputstreambuf.cpp src/zipoutputstreambuf.cc
cp $HEPREP/c++/include/*.h include/ref
cp $HEPREP/include/HEPREP/*.h include/HEPREP
cp $HEPREP/geant4/*.cc src
cp $HEPREP/c++/*.cc src
rm src/MultiWriteTest.cc
rm src/HepRepTest.cc
rm src/HepRepExample.cc
rm src/test_zipoutputstream.cpp
rm src/test_gzipoutputstream.cpp
#rm src/test_zipoutputstream.cpp
#rm src/test_gzipoutputstream.cpp
+6 -7
View File
@@ -1,15 +1,14 @@
set HEPREP=%FREEHEP%\hep\graphics\heprep
copy "%FREEHEP%\org\freehep\jni\FreeHepTypes.h" "include\ref"
copy "%FREEHEP%\org\freehep\zip\zipios++\*.h" "include\zipios++"
copy "%FREEHEP%\org\freehep\zip\*.h" "include\zipios++"
copy "%FREEHEP%\org\freehep\zip\*.cpp" "src\*.cc"
copy "%HEPREP%\geant4\include\*.hh" "include"
REM copy "%FREEHEP%\org\freehep\zip\zipios++\*.h" "include\zipios++"
REM copy "%FREEHEP%\org\freehep\zip\*.h" "include\zipios++"
REM copy "%FREEHEP%\org\freehep\zip\*.cpp" "src\*.cc"
copy "%HEPREP%\c++\include\*.h" "include\ref"
copy "%HEPREP%\include\HEPREP\*.h" "include\HEPREP"
copy "%HEPREP%\geant4\*.cc" "src"
copy "%HEPREP%\c++\*.cc" "src"
REM del src\appendzip.cc
del src\MultiWriteTest.cc
del src\HepRepTest.cc
del src\HepRepExample.cc
del src\test_zipoutputstream.cc
del src\test_gzipoutputstream.cc
REM del src\test_zipoutputstream.cc
REM del src\test_gzipoutputstream.cc
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRep.hh,v 1.16 2003/12/11 21:55:54 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
/**
@@ -22,7 +22,7 @@
//
//
// $Id: G4HepRepFile.hh,v 1.7 2003/07/12 19:48:15 duns Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//
// John Allison 5th April 2001
@@ -22,7 +22,7 @@
//
//
// $Id: G4HepRepFileSceneHandler.hh,v 1.14 2003/11/13 01:11:41 perl Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//
// Joseph Perl 27th January 2002
@@ -22,7 +22,7 @@
//
//
// $Id: G4HepRepFileViewer.hh,v 1.8 2003/07/12 19:48:15 duns Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//
// John Allison 5th April 2001
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepMessenger.hh,v 1.3 2003/12/11 21:55:54 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//
#ifndef G4HepRepMessenger_HH
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepSceneHandler.hh,v 1.30 2003/12/11 21:55:55 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
/**
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepViewer.hh,v 1.16 2003/12/11 21:55:55 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
/**
@@ -28,7 +28,7 @@ public:
* Returns the associated HepRep to this object.
*
*/
virtual HepRep getHepRep() = 0;
virtual HepRep & getHepRep() = 0;
}; // class
} // namespace HEPREP
#endif /* ifndef HEPREP_HASHEPREP_H */
+9 -2
View File
@@ -5,16 +5,23 @@ G4HepRepFileSceneHandler.hh
G4HepRepFileViewer.hh
ref/HepRepXMLWriter.hh
and heprep2 files:
G4HepRep.hh
G4HepRepSceneHandler.hh
G4HepRepMessenger.hh
G4HepRepViewer.hh
and the zlib headers
zlib/*.h
the other sources (heprep2) are copies from the FreeHEP library
the other sources are copies from the FreeHEP library
(java.freehep.org) and are maintained there.
The files starting with G4 are geant4 compliant, the others may not be.
Changes made here may be overwritten.
11 July 2003
11 December 2003
Mark Donszelmann
@@ -6,7 +6,7 @@
#include "zipios++/meta-iostreams.h"
#include <vector>
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/filteroutputstreambuf.h"
#include "zipios++/ziphead.h"
@@ -5,7 +5,7 @@
#include <vector>
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/deflateoutputstreambuf.h"
@@ -6,7 +6,7 @@
#include "zipios++/meta-iostreams.h"
#include <vector>
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/filterinputstreambuf.h"
@@ -14,8 +14,7 @@ typedef std::ostringstream OutputStringStream ;
#else
// MD added include strstream.h (not strstream, since it does not exist on Solaris)
#include <strstream.h>
#include <strstream>
/** OutputStringStream is typedefed to ostringstream if sstream is
part of the standard library (unless Zipios++ has been explicitly
@@ -24,14 +23,14 @@ typedef std::ostringstream OutputStringStream ;
strstream.h. In this case OutputStringStream specializes the str()
method, such that the caller does not have to concern himself with
null-terminating the string and unfreezing the ostrstream. */
class OutputStringStream : public ostrstream {
class OutputStringStream : public std::ostrstream {
public:
/** Specialization of ostrstream::str() that takes care of
null-terminating the string and unfreezing the ostrstream. */
inline string str() {
*this << ends ; // null terminate ostrstream
string o_str( ostrstream::str() ) ;
*this << std::ends ; // null terminate ostrstream
string o_str( std::ostrstream::str() ) ;
freeze( 0 ) ;
return o_str ;
}
@@ -127,7 +127,7 @@ public:
/** The assignment operator doesn't copy the reference count, it
leaves it unchanged. */
const ReferenceCount &operator= ( const ReferenceCount &src ) {}
const ReferenceCount &operator= ( const ReferenceCount &src ) { return *this; }
private:
/** Increases the reference count. */
@@ -5,7 +5,7 @@
#include <vector>
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/fcoll.h"
#include "zipios++/inflateinputstreambuf.h"
@@ -59,4 +59,4 @@
#endif
#endif
#include <assert.h>
#include <cassert>
@@ -5,7 +5,7 @@
#include <vector>
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/fcoll.h"
#include "zipios++/deflateoutputstreambuf.h"
@@ -1,12 +1,12 @@
/* zconf.h -- configuration of the zlib compression library
/* HepRep-zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* @(#) $Id: zconf.h,v 1.1 2003/07/11 06:01:42 duns Exp $ */
/* @(#) $Id: HepRep-zconf.h,v 1.1 2004/02/03 19:34:43 duns Exp $ */
#ifndef _ZCONF_H
#define _ZCONF_H
#ifndef _HEPREP_ZCONF_H
#define _HEPREP_ZCONF_H
/* for _LP64 */
#include <sys/types.h>
@@ -283,4 +283,4 @@ typedef uLong FAR uLongf;
# pragma map(inflate_trees_free,"INTRFR")
#endif
#endif /* _ZCONF_H */
#endif /* _HEPREP_ZCONF_H */
@@ -1,4 +1,4 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
/* HepRep-zlib.h -- interface of the 'zlib' general purpose compression library
version 1.1.3, July 9th, 1998
Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
@@ -28,13 +28,14 @@
(zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
*/
#ifndef _ZLIB_H
#define _ZLIB_H
#ifndef _HEPREP_ZLIB_H
#define _HEPREP_ZLIB_H
#include "zconf.h"
#include "HepRep-zconf.h"
#ifdef __cplusplus
extern "C" {
// MD: make all functions C++ mangled
/*extern "C" {*/
#endif
#define ZLIB_VERSION "1.1.3"
@@ -106,12 +107,12 @@ typedef z_stream FAR *z_streamp;
On 16-bit systems, the functions zalloc and zfree must be able to allocate
exactly 65536 bytes, but will not be required to allocate more than this
if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
if the symbol MAXSEG_64K is defined (see HepRep-zconf.h). WARNING: On MSDOS,
pointers returned by zalloc for objects of exactly 65536 bytes *must*
have their offset normalized to zero. The default allocation function
provided by this library ensures this (see zutil.c). To reduce memory
requirements and avoid any allocation of 64K objects, at the expense of
compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
compression ratio, compile the library with -DMAX_WBITS=14 (see HepRep-zconf.h).
The fields total_in and total_out can be used for statistics or
progress reports. After compression, total_in holds the total size of
@@ -171,7 +172,7 @@ typedef z_stream FAR *z_streamp;
ZEXTERN const char * ZEXPORT zlibVersion OF((void));
/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
If the first character differs, the library code actually used is
not compatible with the zlib.h header file used by the application.
not compatible with the HepRep-zlib.h header file used by the application.
This check is automatically made by deflateInit and inflateInit.
*/
@@ -421,7 +422,7 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
The memLevel parameter specifies how much memory should be allocated
for the internal compression state. memLevel=1 uses minimum memory but
is slow and reduces compression ratio; memLevel=9 uses maximum memory
for optimal speed. The default value is 8. See zconf.h for total memory
for optimal speed. The default value is 8. See HepRep-zconf.h for total memory
usage as a function of windowBits and memLevel.
The strategy parameter is used to tune the compression algorithm. Use the
@@ -878,7 +879,7 @@ ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
#if !defined(_HEPREP_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
struct internal_state {int dummy;}; /* hack for buggy compilers */
#endif
@@ -887,7 +888,8 @@ ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
#ifdef __cplusplus
}
// MD: make all functions C++ mangled
/* } */
#endif
#endif /* _ZLIB_H */
#endif /* _HEPREP_ZLIB_H */
@@ -1,19 +1,19 @@
/* zutil.h -- internal interface and configuration of the compression library
/* HepRep-zutil.h -- internal interface and configuration of the compression library
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use HepRep-zlib.h.
*/
/* @(#) $Id: zutil.h,v 1.4 2003/07/11 06:34:56 duns Exp $ */
/* @(#) $Id: HepRep-zutil.h,v 1.1 2004/02/03 19:34:43 duns Exp $ */
#ifndef _Z_UTIL_H
#define _Z_UTIL_H
#ifndef _HEPREP_Z_UTIL_H
#define _HEPREP_Z_UTIL_H
#include "zlib.h"
#include "HepRep-zlib.h"
#ifdef STDC
# include <stddef.h>
@@ -216,12 +216,13 @@ extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
uInt len));
extern "C" voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
extern "C" void zcfree OF((voidpf opaque, voidpf ptr));
// MD: made zcalloc and zcfree C++ mangled routines. see GEANT-40
/*extern "C"*/ voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
/*extern "C"*/ void zcfree OF((voidpf opaque, voidpf ptr));
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
#endif /* _Z_UTIL_H */
#endif /* _HEPREP_Z_UTIL_H */
@@ -2,7 +2,10 @@ Mark Donszelmann - 07/07/2003
=============================
Functions were modified to compile with C++ compiler.
Files renamed to .cc
=====================================================
Files zconf.h zlib.h and zutil.h were prefix with HepRep- (HepRep)
to avoid clashes with the same files in /usr/include and /usr/local/include
on unix systems.
=============================================================
zlib 1.1.3 is a general purpose data compression library. All the code
is thread safe. The data format used by the zlib library
@@ -11,7 +14,7 @@ ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate
format) and rfc1952.txt (gzip format). These documents are also available in
other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
All functions of the compression library are documented in the file zlib.h
All functions of the compression library are documented in the file HepRep-zlib.h
(volunteer to write man pages welcome, contact jloup@gzip.org). A usage
example of the library is given in the file example.c which also tests that
the library is working correctly. Another example is given in the file
@@ -1,19 +1,19 @@
/* deflate.h -- internal compression state
* Copyright (C) 1995-1998 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use HepRep-zlib.h.
*/
/* @(#) $Id: deflate.h,v 1.1 2003/07/11 06:01:41 duns Exp $ */
/* @(#) $Id: deflate.h,v 1.2 2004/02/03 19:34:43 duns Exp $ */
#ifndef _DEFLATE_H
#define _DEFLATE_H
#include "zutil.h"
#include "HepRep-zutil.h"
/* ===========================================================================
* Internal compression state.
@@ -1,6 +1,6 @@
/* infblock.h -- header to use infblock.c
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
@@ -1,6 +1,6 @@
/* infcodes.h -- header to use infcodes.c
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
@@ -1,6 +1,6 @@
/* inffast.h -- header to use inffast.c
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
@@ -4,7 +4,7 @@
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use HepRep-zlib.h.
*/
local uInt fixed_bl = 9;
@@ -1,11 +1,11 @@
/* inftrees.h -- header to use inftrees.c
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use HepRep-zlib.h.
*/
/* Huffman code lookup table entry--this entry is four bytes for machines
@@ -1,11 +1,11 @@
/* infutil.h -- types and macros common to blocks and codes
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applications should only use zlib.h.
subject to change. Applications should only use HepRep-zlib.h.
*/
#ifndef _INFUTIL_H
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRep.cc,v 1.20 2003/12/11 21:55:55 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
/**
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: G4HepRepFile.cc,v 1.8 2003/07/12 19:48:15 duns Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
//
// Joseph Perl 1 October 2001
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepFileSceneHandler.cc,v 1.17 2003/12/09 15:39:26 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// $Id: G4HepRepFileSceneHandler.cc,v 1.18 2004/03/15 08:00:22 perl Exp $
// GEANT4 tag $Name: geant4-06-01 $
//
//
// Joseph Perl 27th January 2002
@@ -59,6 +59,7 @@ G4int G4HepRepFileSceneHandler::fSceneIdCount = 0;
G4int G4HepRepFileSceneHandler::fSceneCount = 0;
// No. of extanct scene handlers.
G4HepRepFileSceneHandler::G4HepRepFileSceneHandler(G4VGraphicsSystem& system,
const G4String& name):
G4VSceneHandler(system, fSceneIdCount++, name),
@@ -72,8 +73,10 @@ G4HepRepFileSceneHandler::G4HepRepFileSceneHandler(G4VGraphicsSystem& system,
fileCounter = 0;
}
G4HepRepFileSceneHandler::~G4HepRepFileSceneHandler() {}
void G4HepRepFileSceneHandler::EstablishSpecials
(G4PhysicalVolumeModel& pvModel) {
pvModel.DefinePointersToWorkingSpace (&fCurrentDepth,
@@ -81,14 +84,17 @@ void G4HepRepFileSceneHandler::EstablishSpecials
&fpCurrentLV);
}
void G4HepRepFileSceneHandler::BeginModeling() {
G4VSceneHandler::BeginModeling(); // Required: see G4VSceneHandler.hh.
}
void G4HepRepFileSceneHandler::EndModeling() {
G4VSceneHandler::EndModeling(); // Required: see G4VSceneHandler.hh.
}
#ifdef G4HEPREPFILEDEBUG
void G4HepRepFileSceneHandler::PrintThings() {
G4cout <<
@@ -107,6 +113,7 @@ void G4HepRepFileSceneHandler::PrintThings() {
}
#endif
void G4HepRepFileSceneHandler::AddThis(const G4Box& box) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -118,6 +125,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Box& box) {
G4VSceneHandler::AddThis(box); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Cons& cons) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -129,6 +137,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Cons& cons) {
G4VSceneHandler::AddThis(cons); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Tubs& tubs) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -140,6 +149,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Tubs& tubs) {
G4VSceneHandler::AddThis(tubs); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Trd& trd) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -151,6 +161,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Trd& trd) {
G4VSceneHandler::AddThis(trd); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Trap& trap) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -162,6 +173,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Trap& trap) {
G4VSceneHandler::AddThis(trap); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Sphere& sphere) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -173,6 +185,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Sphere& sphere) {
G4VSceneHandler::AddThis(sphere); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Para& para) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -184,6 +197,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Para& para) {
G4VSceneHandler::AddThis(para); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Torus& torus) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -195,6 +209,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Torus& torus) {
G4VSceneHandler::AddThis(torus); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Polycone& polycone) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -206,6 +221,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Polycone& polycone) {
G4VSceneHandler::AddThis(polycone); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4Polyhedra& polyhedra) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -217,6 +233,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4Polyhedra& polyhedra) {
G4VSceneHandler::AddThis(polyhedra); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis(const G4VSolid& solid) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -228,6 +245,7 @@ void G4HepRepFileSceneHandler::AddThis(const G4VSolid& solid) {
G4VSceneHandler::AddThis(solid); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddThis (const G4VTrajectory& traj) {
#ifdef G4HEPREPFILEDEBUG
G4cout << "G4HepRepFileSceneHandler::AddThis(G4VTrajectory&) " << G4endl;
@@ -243,7 +261,7 @@ void G4HepRepFileSceneHandler::AddThis (const G4VTrajectory& traj) {
CheckFileOpen();
// Add the Event Data Type if it hasn't already been added.
// If this is the first trajectory, add the Event Data type and define attributes.
// If this is the first trajectory or hit, add the Event Data type and define attributes.
if (strcmp("Event Data",hepRepXMLWriter->prevTypeName[0])!=0) {
hepRepXMLWriter->addType("Event Data",0);
hepRepXMLWriter->addInstance();
@@ -412,13 +430,15 @@ void G4HepRepFileSceneHandler::AddThis (const G4VTrajectory& traj) {
}
}
void G4HepRepFileSceneHandler::AddThis (const G4VHit& hit) {
#ifdef G4HEPREPFILEDEBUG
G4cout << "G4HepRepFileSceneHandler::AddThis(G4VHit&) " << G4endl;
#endif
G4VSceneHandler::AddThis (hit);
G4VSceneHandler::AddThis(hit); // Invoke default action.
}
void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyline& polyline) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -439,6 +459,7 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyline& polyline) {
}
void G4HepRepFileSceneHandler::AddPrimitive (const G4Polymarker& line) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -460,6 +481,7 @@ void G4HepRepFileSceneHandler::AddPrimitive (const G4Polymarker& line) {
}
}
#ifdef G4HEPREPFILEDEBUG
void G4HepRepFileSceneHandler::AddPrimitive(const G4Text& text) {
#else
@@ -475,6 +497,7 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Text&) {
G4cout << "G4HepRepFileSceneHandler::AddPrimitive G4Text : not yet implemented. " << G4endl;
}
void G4HepRepFileSceneHandler::AddPrimitive(const G4Circle& circle) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -495,6 +518,7 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Circle& circle) {
hepRepXMLWriter->addPoint(center.x(), center.y(), center.z());
}
void G4HepRepFileSceneHandler::AddPrimitive(const G4Square& square) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -515,6 +539,7 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Square& square) {
hepRepXMLWriter->addPoint(center.x(), center.y(), center.z());
}
void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -545,6 +570,7 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) {
} while (notLastFace);
}
void G4HepRepFileSceneHandler::AddPrimitive(const G4NURBS&) {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -555,10 +581,12 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4NURBS&) {
G4cout << "G4HepRepFileSceneHandler::AddPrimitive G4NURBS : not implemented. " << G4endl;
}
G4HepRepFileXMLWriter *G4HepRepFileSceneHandler::GetHepRepXMLWriter() {
return hepRepXMLWriter;
}
void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
const G4Visible visible) {
#ifdef G4HEPREPFILEDEBUG
@@ -570,7 +598,6 @@ void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
// Open the HepRep output file if it is not already open.
CheckFileOpen();
// Handle Type declaration for Event Data.
// Should be able to just test on fReadyForTransients, but this seems to
// be falsely false if no geometry has yet been drawn.
// So I test on both !fpCurrentPV (means no geometry has yet been drawn)
@@ -581,15 +608,46 @@ void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
hepRepXMLWriter->addInstance();
}
if (strcmp("Line",primName)==0)
// Applications have the option of either calling AddThis(G4VTrajectory&) and
// AddThis(G4VHits&), or of just decomposing these into simpler primitives.
// In the former case, drawing will be handled above and will include setting of
// physics attributes.
// In the latter case, which is an older style of working, we end up drawing the
// trajectories and hits here, where we have no access to physics attributes.
// We receive primitives here. We can figure out that these are transients, but we
// have to guess exactly what these transients represent.
// We assume the primitives are being used as in G4VTrajectory, hence we assume:
// Lines are Trajectories
// Squares that come after we've seen trajectories are Auxiliary Points
// Circles that come after we've seen trajectories are Step Points
// Other primitives are Hits
int layer;
if (strcmp("Line",primName)==0) {
hepRepXMLWriter->addType("Trajectories",1);
else {
if (strcmp(hepRepXMLWriter->prevTypeName[1],"Trajectories")==0)
hepRepXMLWriter->addType("Trajectory Points",2);
else
hepRepXMLWriter->addType("Trajectory Points",1);
layer = 100;
} else {
if (strcmp(hepRepXMLWriter->prevTypeName[1],"Trajectories")==0 &&
strcmp("Square",primName)==0)
{
hepRepXMLWriter->addType("AuxiliaryPoints",2);
layer = 110;
} else {
if (strcmp(hepRepXMLWriter->prevTypeName[1],"Trajectories")==0 &&
strcmp("Circle",primName)==0)
{
hepRepXMLWriter->addType("StepPoints",2);
layer = 120;
} else {
hepRepXMLWriter->addType("Hits",1);
layer = 130;
}
}
}
hepRepXMLWriter->addAttValue("Layer",layer);
hepRepXMLWriter->addInstance();
// Handle Type declaration for Detector Geometry,
@@ -614,6 +672,7 @@ void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
}
// Additional attributes.
hepRepXMLWriter->addAttValue("Layer",hepRepXMLWriter->typeDepth);
hepRepXMLWriter->addAttValue("LVol", fpCurrentLV->GetName());
hepRepXMLWriter->addAttValue("Solid", fpCurrentLV->GetSolid()->GetName());
hepRepXMLWriter->addAttValue("EType", fpCurrentLV->GetSolid()->GetEntityType());
@@ -624,7 +683,6 @@ void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
}
hepRepXMLWriter->addAttValue("DrawAs",primName);
hepRepXMLWriter->addAttValue("Layer",hepRepXMLWriter->typeDepth);
// Handle color attribute, avoiding drawing anything black on black.
G4Colour colour = GetColour(visible);
@@ -651,6 +709,7 @@ void G4HepRepFileSceneHandler::AddHepRepInstance(const char* primName,
hepRepXMLWriter->addAttValue("Visibility",true);
}
void G4HepRepFileSceneHandler::CheckFileOpen() {
#ifdef G4HEPREPFILEDEBUG
G4cout <<
@@ -681,6 +740,7 @@ void G4HepRepFileSceneHandler::CheckFileOpen() {
}
}
void G4HepRepFileSceneHandler::ClearTransientStore () {
G4VSceneHandler::ClearTransientStore ();
if (fpViewer) {
@@ -20,8 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepFileViewer.cc,v 1.11 2003/07/12 19:48:15 duns Exp $
// GEANT4 tag $Name: geant4-06-00 $
// $Id: G4HepRepFileViewer.cc,v 1.12 2004/03/15 08:00:22 perl Exp $
// GEANT4 tag $Name: geant4-06-01 $
#include "G4HepRepFileViewer.hh"
@@ -71,6 +71,7 @@ void G4HepRepFileViewer::ShowView () {
G4cout << "G4HepRepFileViewer::ShowView" << G4endl;
#endif
G4VViewer::ShowView();
hepRepXMLWriter->close();
if (hepRepXMLWriter->isOpen)
hepRepXMLWriter->close();
}
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepMessenger.cc,v 1.4 2003/12/11 21:55:55 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
#include "G4HepRepMessenger.hh"
@@ -20,6 +20,9 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepSceneHandler.cc,v 1.70 2004/02/05 18:41:49 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
/**
* @author Mark Donszelmann, Joseph Perl
@@ -430,20 +433,18 @@ void G4HepRepSceneHandler::AddPrimitive (const G4Polymarker& line) {
setMarker(instance, line);
// Default MarkName is set to Circle for this Type.
switch (line.GetMarkerType()) {
case line.dots:
setAttribute(instance, "Fill", true);
setColor(instance, GetColor(line), G4String("FillColor"));
break;
case line.circles:
break;
case line.squares:
setAttribute(instance, "MarkName", G4String("Box"));
break;
case line.line:
default:
setAttribute(instance, "MarkName", G4String("Plus"));
break;
int mtype = line.GetMarkerType();
// Cannot be case statement since line.xxx is not a constant
if (mtype == line.dots) {
setAttribute(instance, "Fill", true);
setColor(instance, GetColor(line), G4String("FillColor"));
} else if (mtype == line.circles) {
} else if (line.squares) {
setAttribute(instance, "MarkName", G4String("Box"));
} else {
// line.line + default
setAttribute(instance, "MarkName", G4String("Plus"));
}
for (size_t i=0; i < line.size(); i++) {
@@ -20,6 +20,8 @@
// * statement, and all its terms. *
// ********************************************************************
//
// $Id: G4HepRepViewer.cc,v 1.22 2003/12/11 21:55:55 duns Exp $
// GEANT4 tag $Name: geant4-06-00-patch-01 $
//
/**
+9 -2
View File
@@ -5,14 +5,21 @@ G4HepRepFileSceneHandler.cc
G4HepRepFileViewer.cc
HepRepXMLWriter.cc
and heprep2 files:
G4HepRep.cc
G4HepRepSceneHandler.cc
G4HepRepMessenger.cc
G4HepRepViewer.cc
and the zlib sources
the other sources (heprep2) are copies from the FreeHEP library
the other sources are copies from the FreeHEP library
(java.freehep.org) and are maintained there.
The files starting with G4 are geant4 compliant, the others may not be.
Changes made here may be overwritten.
11 July 2003
11 December 2003
Mark Donszelmann
@@ -56,7 +56,7 @@ bool XMLHepRepWriter::write(HepRep* heprep, string name) {
zip->putNextEntry(ZipCDirEntry(name));
}
xml->openDoc();
xml->setAttribute("xmlns", "http://www.freehep.org/HepRep");
xml->setAttribute("xmlns", "http://java.freehep.org/schemas/heprep/2.0");
xml->setAttribute("xmlns", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
xml->setAttribute("xsi", "schemaLocation", "HepRep.xsd");
xml->openTag(nameSpace, "heprep");
@@ -1,82 +0,0 @@
#include "zipios++/zipios-config.h"
#include "zipios++/meta-iostreams.h"
#include "zipios++/ziphead.h"
#include "zipios++/zipheadio.h"
using namespace std ;
using namespace zipios ;
char *_progname ;
void printUsage() ;
void exitUsage( int exit_code ) ;
int main( int argc, char *argv[] ) {
_progname = argv[ 0 ] ;
if ( argc != 3 )
exitUsage( 1 ) ;
ofstream exef( argv[ 1 ], ios::app | ios::binary ) ;
if( ! exef ) {
cout << "Error: Unable to open " << argv[ 1 ] << " for writing" << endl ;
exitUsage( 1 ) ;
}
ifstream zipf( argv[ 2 ], ios::in | ios::binary ) ;
if( ! zipf ) {
cout << "Error: Unable to open " << argv[ 2 ] << " for reading." << endl ;
exitUsage( 1 ) ;
}
// get eof pos (to become zip file starting position).
uint32 zip_start = exef.tellp() ;
cout << "zip start will be at " << zip_start << endl ;
// Append zip file to exe file
exef << zipf.rdbuf() ;
// write zipfile start offset to file
writeUint32( zip_start, exef ) ;
exef.close() ;
zipf.close() ;
return 0;
}
void printUsage() {
cout << "Usage: " << _progname << " exe-file zipfile" << endl ;
}
void exitUsage( int exit_code ) {
printUsage() ;
exit( exit_code ) ;
}
/** \file
\anchor appendzip_anchor
Source code to a small program appendzip that appends a zip
archive to another file. Run appendzip without arguments to
get a helpful usage message.
*/
/*
Zipios++ - a small C++ library that provides easy access to .zip files.
Copyright (C) 2000 Thomas Søndergaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -1,7 +1,7 @@
#include "zipios++/zipios-config.h"
#include <assert.h>
#include <cassert>
#include "zipios++/meta-iostreams.h"
#include <string>
+3 -3
View File
@@ -1,11 +1,11 @@
/* compress.c -- compress a memory buffer
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* @(#) $Id: compress.cc,v 1.1 2003/07/11 06:01:44 duns Exp $ */
/* @(#) $Id: compress.cc,v 1.2 2004/02/03 19:34:44 duns Exp $ */
#include "zlib.h"
#include "HepRep-zlib.h"
/* ===========================================================================
Compresses the source buffer into the destination buffer. The level
+2 -2
View File
@@ -1,6 +1,6 @@
/* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/*
@@ -47,7 +47,7 @@
*
*/
/* @(#) $Id: deflate.cc,v 1.5 2003/07/11 06:33:52 duns Exp $ */
/* @(#) $Id: deflate.cc,v 1.6 2004/02/03 19:34:44 duns Exp $ */
#include "deflate.h"
@@ -3,7 +3,7 @@
#include "zipios++/meta-iostreams.h"
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/fcollexceptions.h"
#include "zipios++/deflateoutputstreambuf.h"
@@ -52,7 +52,7 @@ bool DeflateOutputStreambuf::init( int comp_level ) {
static const int default_mem_level = 8 ;
// _zs.next_in and avail_in must be set according to
// zlib.h (inline doc).
// HepRep-zlib.h (inline doc).
_zs.next_in = reinterpret_cast< unsigned char * >( &( _invec[ 0 ] ) ) ;
_zs.avail_in = 0 ;
+3 -3
View File
@@ -1,15 +1,15 @@
/* gzio.c -- IO on .gz files
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*
* Compile this file with -DNO_DEFLATE to avoid the compression code.
*/
/* @(#) $Id: gzio.cc,v 1.4 2003/07/12 15:19:56 duns Exp $ */
/* @(#) $Id: gzio.cc,v 1.5 2004/02/03 19:34:44 duns Exp $ */
#include <stdio.h>
#include "zutil.h"
#include "HepRep-zutil.h"
struct internal_state {int dummy;}; /* for buggy compilers */
@@ -6,7 +6,7 @@
#include <algorithm>
#include "zipios++/meta-iostreams.h"
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/gzipoutputstreambuf.h"
+2 -2
View File
@@ -1,9 +1,9 @@
/* infblock.c -- interpret and process block types to last block
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
#include "zutil.h"
#include "HepRep-zutil.h"
#include "infblock.h"
#include "inftrees.h"
#include "infcodes.h"
+2 -2
View File
@@ -1,9 +1,9 @@
/* infcodes.c -- process literals and length/distance pairs
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
#include "zutil.h"
#include "HepRep-zutil.h"
#include "inftrees.h"
#include "infblock.h"
#include "infcodes.h"
+2 -2
View File
@@ -1,9 +1,9 @@
/* inffast.c -- process literals and length/distance pairs fast
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
#include "zutil.h"
#include "HepRep-zutil.h"
#include "inftrees.h"
#include "infblock.h"
#include "infcodes.h"
+2 -2
View File
@@ -1,9 +1,9 @@
/* inflate.c -- zlib interface to inflate modules
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
#include "zutil.h"
#include "HepRep-zutil.h"
#include "infblock.h"
struct inflate_blocks_state {int dummy;}; /* for buggy compilers */
@@ -3,7 +3,7 @@
#include "zipios++/meta-iostreams.h"
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/fcollexceptions.h"
#include "zipios++/inflateinputstreambuf.h"
@@ -120,7 +120,7 @@ bool InflateInputStreambuf::reset( int stream_position ) {
}
// _zs.next_in and avail_in must be set according to
// zlib.h (inline doc).
// HepRep-zlib.h (inline doc).
_zs.next_in = reinterpret_cast< unsigned char * >( &( _invec[0] ) ) ;
_zs.avail_in = 0 ;
+2 -2
View File
@@ -1,9 +1,9 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
#include "zutil.h"
#include "HepRep-zutil.h"
#include "inftrees.h"
#if !defined(BUILDFIXED) && !defined(STDC)
+2 -2
View File
@@ -1,9 +1,9 @@
/* inflate_util.c -- data and routines common to blocks and codes
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
#include "zutil.h"
#include "HepRep-zutil.h"
#include "infblock.h"
#include "inftrees.h"
#include "infcodes.h"
+2 -2
View File
@@ -1,6 +1,6 @@
/* trees.c -- output deflated data using Huffman coding
* Copyright (C) 1995-1998 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/*
@@ -29,7 +29,7 @@
* Addison-Wesley, 1983. ISBN 0-201-06672-6.
*/
/* @(#) $Id: trees.cc,v 1.2 2003/07/11 07:45:14 duns Exp $ */
/* @(#) $Id: trees.cc,v 1.3 2004/02/03 19:34:44 duns Exp $ */
/* #define GEN_TREES_H */
+3 -3
View File
@@ -1,11 +1,11 @@
/* uncompr.c -- decompress a memory buffer
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* @(#) $Id: uncompr.cc,v 1.1 2003/07/11 06:01:45 duns Exp $ */
/* @(#) $Id: uncompr.cc,v 1.2 2004/02/03 19:34:44 duns Exp $ */
#include "zlib.h"
#include "HepRep-zlib.h"
/* ===========================================================================
Decompresses the source buffer into the destination buffer. sourceLen is
+3 -3
View File
@@ -9,12 +9,12 @@
/* adler32.c -- compute the Adler-32 checksum of a data stream
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* @(#) $Id: zadler32.cc,v 1.1 2003/07/11 06:01:45 duns Exp $ */
/* @(#) $Id: zadler32.cc,v 1.2 2004/02/03 19:34:44 duns Exp $ */
#include "zlib.h"
#include "HepRep-zlib.h"
#define BASE 65521L /* largest prime smaller than 65536 */
#define NMAX 5552
+3 -3
View File
@@ -9,12 +9,12 @@
/* crc32.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* @(#) $Id: zcrc32.cc,v 1.1 2003/07/11 06:01:45 duns Exp $ */
/* @(#) $Id: zcrc32.cc,v 1.2 2004/02/03 19:34:44 duns Exp $ */
#include "zlib.h"
#include "HepRep-zlib.h"
#define local static
@@ -4,7 +4,7 @@
#include <algorithm>
#include "zipios++/meta-iostreams.h"
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/zipinputstreambuf.h"
#include "zipios_common.h"
@@ -6,7 +6,7 @@
#include <algorithm>
#include "zipios++/meta-iostreams.h"
#include <zlib.h>
#include <HepRep-zlib.h>
#include "zipios++/zipoutputstreambuf.h"
+3 -3
View File
@@ -1,11 +1,11 @@
/* zutil.c -- target dependent utility functions for the compression library
* Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
* For conditions of distribution and use, see copyright notice in HepRep-zlib.h
*/
/* @(#) $Id: zutil.cc,v 1.1 2003/07/11 06:01:46 duns Exp $ */
/* @(#) $Id: zutil.cc,v 1.2 2004/02/03 19:34:44 duns Exp $ */
#include "zutil.h"
#include "HepRep-zutil.h"
struct internal_state {int dummy;}; /* for buggy compilers */
+11 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.238 2003/11/27 11:51:56 johna Exp $
$Id: History,v 1.241 2004/03/16 08:46:58 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -24,6 +24,16 @@ committal in the CVS repository !
History file for visualization category
---------------------------------------
14 March 2004 Joseph Perl (vis-V06-00-01)
- HepRepFile handle duplicate ShowView.
- HepRepFile improve layering and hierarchy for hits.
1st December 2003 John Allison
- Added checks and minor improvment of behaviour at end of event and run:
o G4VisManager::EndOfRun: added check on MarkForClearingTransientStore.
o G4VisCommandsScene.cc: For "/vis/scene/endOf[Event|Run]Action refresh",
SetMarkForClearingTransientStore(true).
27th November 2003 John Allison (vis-V05-02-06)
- Added /vis/scene/endOfRunAction.
- Includes vis-HepRep-V05-02-08.
+5 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.29 2003/10/03 15:06:56 gcosmo Exp $
$Id: History,v 1.30 2004/02/17 18:17:20 johna Exp $
-------------------------------------------------------------------
=========================================================
@@ -20,6 +20,10 @@ committal in the CVS repository !
History file for visualization/OpenGL
-------------------------------------
17th February 2004 John Allison (opengl-V06-00-00)
- Fixed bug #581: wrong order of statements in
G4OpenGLXViewer::~G4OpenGLXViewer (see bug report).
4th October 2003 Gabriele Cosmo (vis-V05-02-01)
- GNUmakefile:
o replaced "digits+hits" with "digits_hits".
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.6 2001/08/09 20:16:56 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateViewer.hh,v 1.7 2002/10/16 10:44:13 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateWin32.hh,v 1.6 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// OpenGLImmediateWin32 graphics system factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.7 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Class G4OpenGLImmediateWin32Viewer : a class derived from
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateX.hh,v 1.6 2001/07/11 10:08:48 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXViewer.hh,v 1.7 2001/07/14 21:47:42 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXm.hh,v 1.6 2001/07/11 10:08:49 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.7 2001/07/14 21:47:43 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLSceneHandler.hh,v 1.14 2003/06/10 17:58:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 27th March 1996
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLSceneHandler.icc,v 1.5 2001/08/09 20:16:06 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 20th January 1998
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.14 2003/06/16 17:13:38 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredViewer.hh,v 1.8 2001/08/14 18:03:15 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredWin32.hh,v 1.6 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// OpenGLStoredWin32 graphics system factory.
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredWin32Viewer.hh,v 1.5 2002/10/16 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Class G4OpenGLStoredWin32Viewer : a class derived from
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredX.hh,v 1.6 2001/07/11 10:08:50 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXViewer.hh,v 1.5 2001/07/14 21:47:46 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 7th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXm.hh,v 1.5 2001/07/11 10:08:50 gunter Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLStoredXmViewer.hh,v 1.5 2001/07/14 21:47:47 johna Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 10th February 1997
@@ -22,7 +22,7 @@
//
//
// $Id: G4OpenGLTransform3D.hh,v 1.5 2003/06/10 17:41:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-06-00 $
// GEANT4 tag $Name: geant4-05-02-patch-01 $
//
//
// Andrew Walkden 24th October 1996

Some files were not shown because too many files have changed in this diff Show More