Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: CMakeLists.txt,v 1.1 2010-09-29 19:11:49 bmorgan Exp $
|
||||
# $Id: CMakeLists.txt 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: GNUmakefile,v 1.24 2006-05-22 08:54:13 allison Exp $
|
||||
# $Id: GNUmakefile 68732 2013-04-05 09:44:10Z gcosmo $
|
||||
|
||||
name := G4visHepRep
|
||||
|
||||
@@ -22,7 +22,7 @@ include $(G4INSTALL)/config/interactivity.gmk
|
||||
ifdef G4LIB_USE_ZLIB
|
||||
CPPFLAGS += -DG4LIB_USE_ZLIB
|
||||
ifdef G4LIB_BUILD_ZLIB
|
||||
CPPFLAGS += -I$(G4BASE)/visualization/externals/zlib/include
|
||||
CPPFLAGS += -I$(G4BASE)/externals/zlib/include
|
||||
endif
|
||||
else
|
||||
CPPFLAGS += -DCHEPREP_NO_ZLIB
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.$Id: History,v 1.136 2010-11-07 22:29:30 perl Exp $
|
||||
.$Id: History 71534 2013-06-17 16:07:53Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -20,6 +20,31 @@ committal in the CVS repository !
|
||||
History file for visualization/HepRep sub-category
|
||||
--------------------------------------------------
|
||||
|
||||
16th June 2013 John Allison (vis-HepRep-V09-06-06)
|
||||
o G4HepRepSceneHandler.cc: Added an assert to keep Coverity happy.
|
||||
|
||||
26th March 2013 Ben Morgan (vis-HepRep-V09-06-05)
|
||||
- sources.cmake:
|
||||
o BUGFIX #1322 : Update include paths/library linking to use new
|
||||
ZLIB variables allowing transparent use of internal/external ZLIB
|
||||
as required.
|
||||
- G4HepRepSceneHandler:
|
||||
o BUGFIX #1322 : Remove #ifndef block on G4LIB_USE_ZLIB as we now
|
||||
always have zlib available.
|
||||
|
||||
24th February 2013 John Allison (vis-HepRep-V09-06-04)
|
||||
- G4HepRepMessenger, G4HepRepSceneHandler:
|
||||
o Removed unused fields as warned by new clang compiler.
|
||||
|
||||
29th January 2013 John Allison (vis-HepRep-V09-06-03)
|
||||
- More Coverity fixes and un-doing of some previous ones.
|
||||
|
||||
12th and 13th January 2013 John Allison (vis-HepRep-V09-06-02)
|
||||
o Coverity fixes.
|
||||
|
||||
2nd December 2012 John Allison (vis-HepRep-V09-06-00)
|
||||
- Remove NURBS.
|
||||
|
||||
8th August 2012 John Allison (vis-HepRep-V09-05-05 and 06)
|
||||
- G4HepRepSceneHandler.cc: Intercepted 2D primitives.
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRep.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepFile.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepFileSceneHandler.hh 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 27th January 2002
|
||||
@@ -98,7 +98,6 @@ public:
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive(const G4Polyhedron&);
|
||||
void AddPrimitive(const G4NURBS&);
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepFileViewer.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
// File and Version Information:
|
||||
// $Id$
|
||||
// $Id: G4HepRepFileXMLWriter.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// Description:
|
||||
// Create a HepRep XML File (HepRep version 1).
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepMessenger.hh 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
//
|
||||
//
|
||||
#ifndef G4HepRepMessenger_HH
|
||||
@@ -103,7 +103,6 @@ class G4HepRepMessenger : public G4UImessenger {
|
||||
G4UIcmdWithABool* useSolidsCommand;
|
||||
|
||||
G4bool invisibles;
|
||||
G4UIcmdWithABool* writeInvisiblesCommand;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepSceneHandler.hh 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -96,7 +96,6 @@ class G4HepRepSceneHandler: public G4VSceneHandler {
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polyhedron&);
|
||||
void AddPrimitive (const G4NURBS&);
|
||||
|
||||
void AddPrimitive (const G4Polymarker&);
|
||||
void AddPrimitive (const G4Scale& scale);
|
||||
@@ -112,9 +111,9 @@ class G4HepRepSceneHandler: public G4VSceneHandler {
|
||||
void closeFile();
|
||||
|
||||
private:
|
||||
G4HepRepSceneHandler (const G4HepRepSceneHandler&);
|
||||
G4HepRepSceneHandler& operator= (const G4HepRepSceneHandler&);
|
||||
static G4int sceneIdCount;
|
||||
const G4ModelingParameters* originalMP; // Keeps pointer to original.
|
||||
G4ModelingParameters* nonCullingMP; // For temporary non-culling.
|
||||
|
||||
G4Transform3D transform;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepViewer.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: AbstractXMLWriter.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: AbstractXMLWriter.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: BHepRepWriter.h,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: BHepRepWriter.h 66870 2013-01-14 23:38:59Z adotti $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRep.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRep.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAction.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAction.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAttDef.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAttDef.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAttValue.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAttValue.h 66870 2013-01-14 23:38:59Z adotti $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAttribute.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAttribute.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepDefinition.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepDefinition.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepFactory.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepFactory.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepInstance.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepInstance.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepInstanceTree.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepInstanceTree.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepPoint.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepPoint.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepTreeID.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepTreeID.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepType.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepType.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepTypeTree.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepTypeTree.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DeflateOutputStreamBuffer.h,v 1.6 2009-05-08 09:26:58 gcosmo Exp $
|
||||
* @version $Id: DeflateOutputStreamBuffer.h 66870 2013-01-14 23:38:59Z adotti $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: GZIPOutputStream.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: GZIPOutputStream.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: GZIPOutputStreamBuffer.h,v 1.4 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: GZIPOutputStreamBuffer.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* print, println methods taking other arguments may not be indented properly.
|
||||
*
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: IndentPrintWriter.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: IndentPrintWriter.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: XMLHepRepFactory.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: XMLHepRepFactory.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: XMLHepRepWriter.h,v 1.4 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: XMLHepRepWriter.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: XMLWriter.h,v 1.3 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: XMLWriter.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: ZipEntry.h,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: ZipEntry.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: ZipOutputStream.h,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: ZipOutputStream.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: ZipOutputStreamBuffer.h,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: ZipOutputStreamBuffer.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: config.h,v 1.4 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: config.h 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#-----------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4visHepRep
|
||||
# Package: Geant4.src.G4visualization.G4visHepRep
|
||||
@@ -11,12 +11,13 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake,v 1.2 2010-09-30 13:50:34 bmorgan Exp $
|
||||
# $Id: sources.cmake 68732 2013-04-05 09:44:10Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
|
||||
@@ -29,7 +30,6 @@ include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/externals/zlib/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/modeling/include)
|
||||
|
||||
@@ -38,73 +38,72 @@ include_directories(${CMAKE_SOURCE_DIR}/source/visualization/modeling/include)
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4visHepRep
|
||||
HEADERS
|
||||
G4HepRep.hh
|
||||
G4HepRepFile.hh
|
||||
G4HepRepFileSceneHandler.hh
|
||||
G4HepRepFileViewer.hh
|
||||
G4HepRepFileXMLWriter.hh
|
||||
G4HepRepMessenger.hh
|
||||
G4HepRepSceneHandler.hh
|
||||
G4HepRepViewer.hh
|
||||
SOURCES
|
||||
BHepRepWriter.cc
|
||||
DefaultHepRep.cc
|
||||
DefaultHepRepAction.cc
|
||||
DefaultHepRepAttDef.cc
|
||||
DefaultHepRepAttValue.cc
|
||||
DefaultHepRepAttribute.cc
|
||||
DefaultHepRepDefinition.cc
|
||||
DefaultHepRepFactory.cc
|
||||
DefaultHepRepInstance.cc
|
||||
DefaultHepRepInstanceTree.cc
|
||||
DefaultHepRepPoint.cc
|
||||
DefaultHepRepTreeID.cc
|
||||
DefaultHepRepType.cc
|
||||
DefaultHepRepTypeTree.cc
|
||||
DeflateOutputStreamBuffer.cc
|
||||
G4HepRep.cc
|
||||
G4HepRepFile.cc
|
||||
G4HepRepFileSceneHandler.cc
|
||||
G4HepRepFileViewer.cc
|
||||
G4HepRepFileXMLWriter.cc
|
||||
G4HepRepMessenger.cc
|
||||
G4HepRepSceneHandler.cc
|
||||
G4HepRepViewer.cc
|
||||
GZIPOutputStream.cc
|
||||
GZIPOutputStreamBuffer.cc
|
||||
IndentPrintWriter.cc
|
||||
XMLHepRepFactory.cc
|
||||
XMLHepRepWriter.cc
|
||||
XMLWriter.cc
|
||||
ZipOutputStream.cc
|
||||
ZipOutputStreamBuffer.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4csg
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4graphics_reps
|
||||
G4hits
|
||||
G4intercoms
|
||||
G4materials
|
||||
G4modeling
|
||||
G4specsolids
|
||||
G4tracking
|
||||
G4vis_management
|
||||
G4zlib
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4digits_hits
|
||||
G4geometry
|
||||
G4global
|
||||
G4graphics_reps
|
||||
G4intercoms
|
||||
G4materials
|
||||
G4modeling
|
||||
G4tracking
|
||||
G4vis_management
|
||||
G4zlib
|
||||
LINK_LIBRARIES
|
||||
)
|
||||
HEADERS
|
||||
G4HepRep.hh
|
||||
G4HepRepFile.hh
|
||||
G4HepRepFileSceneHandler.hh
|
||||
G4HepRepFileViewer.hh
|
||||
G4HepRepFileXMLWriter.hh
|
||||
G4HepRepMessenger.hh
|
||||
G4HepRepSceneHandler.hh
|
||||
G4HepRepViewer.hh
|
||||
SOURCES
|
||||
BHepRepWriter.cc
|
||||
DefaultHepRep.cc
|
||||
DefaultHepRepAction.cc
|
||||
DefaultHepRepAttDef.cc
|
||||
DefaultHepRepAttValue.cc
|
||||
DefaultHepRepAttribute.cc
|
||||
DefaultHepRepDefinition.cc
|
||||
DefaultHepRepFactory.cc
|
||||
DefaultHepRepInstance.cc
|
||||
DefaultHepRepInstanceTree.cc
|
||||
DefaultHepRepPoint.cc
|
||||
DefaultHepRepTreeID.cc
|
||||
DefaultHepRepType.cc
|
||||
DefaultHepRepTypeTree.cc
|
||||
DeflateOutputStreamBuffer.cc
|
||||
G4HepRep.cc
|
||||
G4HepRepFile.cc
|
||||
G4HepRepFileSceneHandler.cc
|
||||
G4HepRepFileViewer.cc
|
||||
G4HepRepFileXMLWriter.cc
|
||||
G4HepRepMessenger.cc
|
||||
G4HepRepSceneHandler.cc
|
||||
G4HepRepViewer.cc
|
||||
GZIPOutputStream.cc
|
||||
GZIPOutputStreamBuffer.cc
|
||||
IndentPrintWriter.cc
|
||||
XMLHepRepFactory.cc
|
||||
XMLHepRepWriter.cc
|
||||
XMLWriter.cc
|
||||
ZipOutputStream.cc
|
||||
ZipOutputStreamBuffer.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4csg
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4graphics_reps
|
||||
G4hits
|
||||
G4intercoms
|
||||
G4materials
|
||||
G4modeling
|
||||
G4specsolids
|
||||
G4tracking
|
||||
G4vis_management
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4digits_hits
|
||||
G4geometry
|
||||
G4global
|
||||
G4graphics_reps
|
||||
G4intercoms
|
||||
G4materials
|
||||
G4modeling
|
||||
G4tracking
|
||||
G4vis_management
|
||||
LINK_LIBRARIES
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: BHepRepWriter.cc,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: BHepRepWriter.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRep.cc,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRep.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAction.cc,v 1.8 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAction.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAttDef.cc,v 1.8 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAttDef.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -18,47 +18,79 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAttValue.cc,v 1.10 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAttValue.cc 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
std::string DefaultHepRepAttValue::labelStrings[LABELSTRINGS_LEN];
|
||||
|
||||
DefaultHepRepAttValue::DefaultHepRepAttValue(string aName, string aValue, int aShowLabel)
|
||||
: name(aName), type(HepRepConstants::TYPE_STRING), stringValue(aValue), showLabelValue(aShowLabel) {
|
||||
|
||||
: name(aName)
|
||||
, type(HepRepConstants::TYPE_STRING)
|
||||
, stringValue(aValue)
|
||||
, longValue(0)
|
||||
, doubleValue(0.)
|
||||
, booleanValue(false)
|
||||
, showLabelValue(aShowLabel)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
DefaultHepRepAttValue::DefaultHepRepAttValue(string aName, int64 aValue, int aShowLabel)
|
||||
: name(aName), type(HepRepConstants::TYPE_LONG), longValue(aValue), showLabelValue(aShowLabel) {
|
||||
|
||||
: name(aName)
|
||||
, type(HepRepConstants::TYPE_LONG)
|
||||
, longValue(aValue)
|
||||
, doubleValue(0.)
|
||||
, booleanValue(false)
|
||||
, showLabelValue(aShowLabel)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
DefaultHepRepAttValue::DefaultHepRepAttValue(string aName, int aValue, int aShowLabel)
|
||||
: name(aName), type(HepRepConstants::TYPE_INT), longValue(aValue), showLabelValue(aShowLabel) {
|
||||
|
||||
: name(aName)
|
||||
, type(HepRepConstants::TYPE_INT)
|
||||
, longValue(aValue)
|
||||
, doubleValue(0.)
|
||||
, booleanValue(false)
|
||||
, showLabelValue(aShowLabel)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
DefaultHepRepAttValue::DefaultHepRepAttValue(string aName, double aValue, int aShowLabel)
|
||||
: name(aName), type(HepRepConstants::TYPE_DOUBLE), doubleValue(aValue), showLabelValue(aShowLabel) {
|
||||
|
||||
: name(aName)
|
||||
, type(HepRepConstants::TYPE_DOUBLE)
|
||||
, longValue(0)
|
||||
, doubleValue(aValue)
|
||||
, booleanValue(false)
|
||||
, showLabelValue(aShowLabel)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
DefaultHepRepAttValue::DefaultHepRepAttValue(string aName, bool aValue, int aShowLabel)
|
||||
: name(aName), type(HepRepConstants::TYPE_BOOLEAN), booleanValue(aValue), showLabelValue(aShowLabel) {
|
||||
|
||||
: name(aName)
|
||||
, type(HepRepConstants::TYPE_BOOLEAN)
|
||||
, longValue(0)
|
||||
, doubleValue(0.)
|
||||
, booleanValue(aValue)
|
||||
, showLabelValue(aShowLabel)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
DefaultHepRepAttValue::DefaultHepRepAttValue(string aName, vector<double> aValue, int aShowLabel)
|
||||
: name(aName), type(HepRepConstants::TYPE_COLOR), colorValue(aValue), showLabelValue(aShowLabel) {
|
||||
|
||||
: name(aName)
|
||||
, type(HepRepConstants::TYPE_COLOR)
|
||||
, longValue(0)
|
||||
, doubleValue(0.)
|
||||
, booleanValue(false)
|
||||
, colorValue(aValue)
|
||||
, showLabelValue(aShowLabel)
|
||||
{
|
||||
init();
|
||||
}
|
||||
}
|
||||
|
||||
DefaultHepRepAttValue::~DefaultHepRepAttValue() {
|
||||
}
|
||||
@@ -71,14 +103,22 @@ void DefaultHepRepAttValue::init() {
|
||||
}
|
||||
|
||||
HepRepAttValue* DefaultHepRepAttValue::copy() {
|
||||
// Coverity issues warnings here. It looks to me (JA) that "return" is
|
||||
// missing on severeal lines.
|
||||
switch(type) {
|
||||
case HepRepConstants::TYPE_COLOR: new DefaultHepRepAttValue(name, colorValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_STRING: new DefaultHepRepAttValue(name, stringValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_LONG: new DefaultHepRepAttValue(name, longValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_INT: new DefaultHepRepAttValue(name, (int)longValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_DOUBLE: new DefaultHepRepAttValue(name, doubleValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_BOOLEAN: new DefaultHepRepAttValue(name, booleanValue, showLabelValue);
|
||||
default: return new DefaultHepRepAttValue(name, "Unknown type stored in HepRepAttDef", showLabelValue);
|
||||
// case HepRepConstants::TYPE_COLOR: new DefaultHepRepAttValue(name, colorValue, showLabelValue);
|
||||
// case HepRepConstants::TYPE_STRING: new DefaultHepRepAttValue(name, stringValue, showLabelValue);
|
||||
// case HepRepConstants::TYPE_LONG: new DefaultHepRepAttValue(name, longValue, showLabelValue);
|
||||
// case HepRepConstants::TYPE_INT: new DefaultHepRepAttValue(name, (int)longValue, showLabelValue);
|
||||
// case HepRepConstants::TYPE_DOUBLE: new DefaultHepRepAttValue(name, doubleValue, showLabelValue);
|
||||
// case HepRepConstants::TYPE_BOOLEAN: new DefaultHepRepAttValue(name, booleanValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_COLOR: return new DefaultHepRepAttValue(name, colorValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_STRING: return new DefaultHepRepAttValue(name, stringValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_LONG: return new DefaultHepRepAttValue(name, longValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_INT: return new DefaultHepRepAttValue(name, (int)longValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_DOUBLE: return new DefaultHepRepAttValue(name, doubleValue, showLabelValue);
|
||||
case HepRepConstants::TYPE_BOOLEAN: return new DefaultHepRepAttValue(name, booleanValue, showLabelValue);
|
||||
default: return new DefaultHepRepAttValue(name, "Unknown type stored in HepRepAttDef", showLabelValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepAttribute.cc,v 1.8 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepAttribute.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepDefinition.cc,v 1.8 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepDefinition.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepFactory.cc,v 1.6 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepFactory.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepInstance.cc,v 1.7 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepInstance.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepInstanceTree.cc,v 1.11 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepInstanceTree.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepPoint.cc,v 1.5 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepPoint.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepTreeID.cc,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepTreeID.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepType.cc,v 1.8 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepType.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DefaultHepRepTypeTree.cc,v 1.7 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DefaultHepRepTypeTree.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: DeflateOutputStreamBuffer.cc,v 1.6 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: DeflateOutputStreamBuffer.cc 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
@@ -92,6 +92,10 @@ namespace cheprep {
|
||||
zStream.zalloc = Z_NULL;
|
||||
zStream.zfree = Z_NULL;
|
||||
zStream.opaque = Z_NULL;
|
||||
zStream.msg = 0;
|
||||
zStream.next_in = 0;
|
||||
zStream.next_out = 0;
|
||||
zStream.state = 0;
|
||||
#endif // CHEPREP_NO_ZLIB
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRep.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepFile.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 1 October 2001
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepFileSceneHandler.cc 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Joseph Perl 27th January 2002
|
||||
@@ -50,7 +50,6 @@
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Square.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "G4TrajectoriesModel.hh"
|
||||
@@ -83,6 +82,11 @@ G4VSceneHandler(system, fSceneIdCount++, name)
|
||||
doneInitTraj = false;
|
||||
drawingHit = false;
|
||||
doneInitHit = false;
|
||||
trajContext = 0;
|
||||
trajAttValues = 0;
|
||||
trajAttDefs = 0;
|
||||
hitAttValues = 0;
|
||||
hitAttDefs = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -631,7 +635,7 @@ void G4HepRepFileSceneHandler::AddCompound (const G4VTrajectory& traj) {
|
||||
// instead need to do point drawing from here (in order to obtain the points attributes,
|
||||
// not available from AddPrimitive(...point). Instead, such a call will just serve to set the
|
||||
// flag that tells us that point drawing was requested for this trajectory (depends on several
|
||||
// factors including i_mode, trajContext and filtering).
|
||||
// factors including trajContext and filtering).
|
||||
drawingTraj = true;
|
||||
doneInitTraj = false;
|
||||
G4VSceneHandler::AddCompound(traj);
|
||||
@@ -720,15 +724,14 @@ void G4HepRepFileSceneHandler::AddCompound (const G4VTrajectory& traj) {
|
||||
strcmp(iAttVal->GetName(),"Pos-Y")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Pos-Z")!=0)
|
||||
hepRepXMLWriter->addAttValue(iAttVal->GetName(), iAttVal->GetValue());
|
||||
delete pointAttValues;
|
||||
}
|
||||
delete rawPointAttValues;
|
||||
}
|
||||
|
||||
// Clean up point attributes.
|
||||
if (pointAttDefs)
|
||||
delete pointAttDefs;
|
||||
|
||||
delete pointAttDefs;
|
||||
delete pointAttValues;
|
||||
delete rawPointAttValues;
|
||||
|
||||
// Each trajectory point is made of a single primitive, a point.
|
||||
hepRepXMLWriter->addPrimitive();
|
||||
G4Point3D vertex = aTrajectoryPoint->GetPosition();
|
||||
@@ -819,15 +822,14 @@ void G4HepRepFileSceneHandler::AddCompound (const G4VTrajectory& traj) {
|
||||
strcmp(iAttVal->GetName(),"Pos-Y")!=0 &&
|
||||
strcmp(iAttVal->GetName(),"Pos-Z")!=0)
|
||||
hepRepXMLWriter->addAttValue(iAttVal->GetName(), iAttVal->GetValue());
|
||||
delete pointAttValues;
|
||||
}
|
||||
delete rawPointAttValues;
|
||||
}
|
||||
|
||||
// Clean up point attributes.
|
||||
if (pointAttDefs)
|
||||
delete pointAttDefs;
|
||||
|
||||
delete pointAttDefs;
|
||||
delete pointAttValues;
|
||||
delete rawPointAttValues;
|
||||
|
||||
// Each trajectory point is made of a single primitive, a point.
|
||||
G4Point3D vertex = aTrajectoryPoint->GetPosition();
|
||||
|
||||
@@ -1268,17 +1270,6 @@ void G4HepRepFileSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) {
|
||||
}
|
||||
|
||||
|
||||
void G4HepRepFileSceneHandler::AddPrimitive(const G4NURBS&) {
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
G4cout <<
|
||||
"G4HepRepFileSceneHandler::AddPrimitive(const G4NURBS& nurbs) called."
|
||||
<< G4endl;
|
||||
PrintThings();
|
||||
#endif
|
||||
G4cout << "G4HepRepFileSceneHandler::AddPrimitive G4NURBS : not implemented. " << G4endl;
|
||||
}
|
||||
|
||||
|
||||
G4HepRepFileXMLWriter *G4HepRepFileSceneHandler::GetHepRepXMLWriter() {
|
||||
return hepRepXMLWriter;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepFileViewer.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
|
||||
#include "G4HepRepFileViewer.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
// File and Version Information:
|
||||
// $Id$
|
||||
// $Id: G4HepRepFileXMLWriter.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
//
|
||||
// Description:
|
||||
// Create a HepRep XML File (HepRep version 1).
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepMessenger.cc 66870 2013-01-14 23:38:59Z adotti $
|
||||
//
|
||||
#include "G4HepRepMessenger.hh"
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepSceneHandler.cc 71534 2013-06-17 16:07:53Z gcosmo $
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <iomanip>
|
||||
#include <fstream>
|
||||
#include <cmath>
|
||||
#include <cassert>
|
||||
|
||||
//HepRep
|
||||
#include "HEPREP/HepRep.h"
|
||||
@@ -58,7 +59,6 @@
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Square.hh"
|
||||
#include "G4Text.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4VSolid.hh"
|
||||
@@ -92,6 +92,7 @@ G4int G4HepRepSceneHandler::sceneIdCount = 0;
|
||||
|
||||
G4HepRepSceneHandler::G4HepRepSceneHandler (G4VGraphicsSystem& system, const G4String& name)
|
||||
: G4VSceneHandler (system, sceneIdCount++, name),
|
||||
out (0),
|
||||
geometryLayer ("Geometry"),
|
||||
eventLayer ("Event"),
|
||||
calHitLayer ("CalHit"),
|
||||
@@ -140,7 +141,8 @@ G4HepRepSceneHandler::~G4HepRepSceneHandler () {
|
||||
delete factory;
|
||||
factory = NULL;
|
||||
|
||||
dynamic_cast<G4HepRep*>(GetGraphicsSystem())->removeSceneHandler();
|
||||
G4HepRep* pHepRepSystem = dynamic_cast<G4HepRep*>(GetGraphicsSystem());
|
||||
if (pHepRepSystem) pHepRepSystem->removeSceneHandler();
|
||||
}
|
||||
|
||||
|
||||
@@ -206,35 +208,6 @@ void G4HepRepSceneHandler::open(G4String name) {
|
||||
int dot = name.length() - extension.length();
|
||||
baseName = (dot >= 0) ? name.substr(0, dot) : "";
|
||||
|
||||
#ifndef G4LIB_USE_ZLIB
|
||||
if (writeGZ) {
|
||||
cerr << endl;
|
||||
cerr << "WARNING: the .gz output file you are creating will be a plain file," << endl;
|
||||
cerr << " since compression support (ZLIB) was not compiled into the Geant4." << endl;
|
||||
cerr << " To avoid confusion with real gz files, the output filename has been" << endl;
|
||||
cerr << " extended with the name '.no-gz'." << endl;
|
||||
cerr << " A plain heprep or bheprep file can be fairly large." << endl;
|
||||
}
|
||||
if (writeZip) {
|
||||
cerr << endl;
|
||||
cerr << "WARNING: the .zip output file you are creating will not be compressed," << endl;
|
||||
cerr << " since compression support (ZLIB) was not compiled into the Geant4." << endl;
|
||||
cerr << " A zip file containing non-compressed heprep or bheprep files can" << endl;
|
||||
cerr << " be fairly large." << endl;
|
||||
}
|
||||
if (writeGZ || writeZip) {
|
||||
cerr << "SOLUTION: To add compression support using ZLIB, you need to:" << endl;
|
||||
cerr << " 1. Define G4LIB_USE_ZLIB and recompile the visualization category." << endl;
|
||||
cerr << " 2. Optionally define G4_LIB_BUILD_ZLIB if your system does not have" << endl;
|
||||
cerr << " zlib installed (e.g. WIN32-VC)." << endl;
|
||||
cerr << " 3. Relink your application code." << endl;
|
||||
cerr << endl;
|
||||
}
|
||||
if (writeGZ) {
|
||||
extension = extension + ".no-gz";
|
||||
writeGZ = false;
|
||||
}
|
||||
#endif // G4LIB_USE_ZLIB
|
||||
} else {
|
||||
// Default for no extension
|
||||
extension = ".heprep.zip";
|
||||
@@ -423,7 +396,7 @@ bool G4HepRepSceneHandler::closeHepRep(bool final) {
|
||||
char eventFormat[128];
|
||||
sprintf(eventFormat, "%s%d%s%s", "event-%0", eventNumberWidth, "d", (writeBinary ? ".bheprep" : ".heprep"));
|
||||
sprintf(eventName, eventFormat, eventNumber);
|
||||
writer->write(_heprep, G4String(eventName));
|
||||
if (writer) writer->write(_heprep, G4String(eventName));
|
||||
|
||||
eventNumber++;
|
||||
}
|
||||
@@ -1006,29 +979,6 @@ void G4HepRepSceneHandler::AddPrimitive (const G4Square& square) {
|
||||
factory->createHepRepPoint(instance, center.x(), center.y(), center.z());
|
||||
}
|
||||
|
||||
void G4HepRepSceneHandler::AddPrimitive (const G4NURBS&) {
|
||||
#ifdef PDEBUG
|
||||
cout << "G4HepRepSceneHandler::AddPrimitive(G4NURBS&) " << endl;
|
||||
#endif
|
||||
if (dontWrite()) return;
|
||||
|
||||
/*** You may need this
|
||||
if (fProcessing2D) {
|
||||
static G4bool warned = false;
|
||||
if (!warned) {
|
||||
warned = true;
|
||||
G4Exception
|
||||
("G4HepRepSceneHandler::AddPrimitive (const G4NURBS&)",
|
||||
"vis-HepRep1007", JustWarning,
|
||||
"2D NURBS not implemented. Ignored.");
|
||||
}
|
||||
return;
|
||||
}
|
||||
***/
|
||||
|
||||
cout << "G4HepRepSceneHandler::AddPrimitive G4NURBS : not yet implemented. " << endl;
|
||||
}
|
||||
|
||||
void G4HepRepSceneHandler::AddPrimitive (const G4Scale& scale) {
|
||||
if (dontWrite()) return;
|
||||
G4VSceneHandler::AddPrimitive(scale);
|
||||
@@ -1486,6 +1436,7 @@ HepRepInstance* G4HepRepSceneHandler::getGeometryOrEventInstance(HepRepType* typ
|
||||
} else {
|
||||
G4PhysicalVolumeModel* pPVModel =
|
||||
dynamic_cast<G4PhysicalVolumeModel*>(fpModel);
|
||||
assert(pPVModel); // To keep Coverity happy.
|
||||
G4LogicalVolume* pCurrentLV = pPVModel->GetCurrentLV();
|
||||
G4int currentDepth = pPVModel->GetCurrentDepth();
|
||||
G4Material* pCurrentMaterial = pPVModel->GetCurrentMaterial();
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4HepRepViewer.cc 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
//
|
||||
|
||||
/**
|
||||
@@ -65,7 +65,9 @@ G4HepRepViewer::~G4HepRepViewer () {
|
||||
#ifdef SDEBUG
|
||||
cout << "G4HepRepViewer::~G4HepRepViewer" << endl;
|
||||
#endif
|
||||
dynamic_cast<G4HepRep*>(GetSceneHandler()->GetGraphicsSystem())->removeViewer();
|
||||
G4HepRep* pHepRepSystem =
|
||||
dynamic_cast<G4HepRep*>(GetSceneHandler()->GetGraphicsSystem());
|
||||
if (pHepRepSystem) pHepRepSystem->removeViewer();
|
||||
}
|
||||
|
||||
|
||||
@@ -107,11 +109,13 @@ void G4HepRepViewer::ShowView () {
|
||||
G4VViewer::ShowView();
|
||||
|
||||
G4HepRepSceneHandler* sceneHandler = dynamic_cast<G4HepRepSceneHandler*>(GetSceneHandler());
|
||||
if (sceneHandler->closeHepRep()) {
|
||||
if (sceneHandler) {
|
||||
if (sceneHandler->closeHepRep()) {
|
||||
sceneHandler->openHepRep();
|
||||
|
||||
G4HepRepMessenger* messenger = G4HepRepMessenger::GetInstance();
|
||||
|
||||
G4HepRepMessenger* messenger = G4HepRepMessenger::GetInstance();
|
||||
if (messenger->appendGeometry()) geometryIncluded = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: GZIPOutputStreamBuffer.cc,v 1.4 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: GZIPOutputStreamBuffer.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ using namespace std;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: IndentPrintWriter.cc,v 1.14 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: IndentPrintWriter.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: XMLHepRepFactory.cc,v 1.5 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: XMLHepRepFactory.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -14,13 +14,14 @@ using namespace HEPREP;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: XMLHepRepWriter.cc,v 1.15 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: XMLHepRepWriter.cc 68043 2013-03-13 14:27:49Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
XMLHepRepWriter::XMLHepRepWriter(ostream* os, bool randomAccess, bool useCompression)
|
||||
: out(os),
|
||||
compress(useCompression) {
|
||||
compress(useCompression),
|
||||
xml(0) {
|
||||
|
||||
this->nameSpace = NAMESPACE;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ using namespace std;
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: XMLWriter.cc,v 1.12 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: XMLWriter.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: ZipOutputStreamBuffer.cc,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: ZipOutputStreamBuffer.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: GZIPOutputStream.cc,v 1.4 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: GZIPOutputStream.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/**
|
||||
* @author Mark Donszelmann
|
||||
* @version $Id: ZipOutputStream.cc,v 1.9 2005-06-02 21:28:45 duns Exp $
|
||||
* @version $Id: ZipOutputStream.cc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
*/
|
||||
namespace cheprep {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user