Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -1,76 +1,43 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4geometry
|
||||
# Package: Geant4.src.G4analysis
|
||||
#
|
||||
# Top level CMakeLists.txt for a Geant4 Global Library
|
||||
# or collection of sublibraries
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if (GEANT4_USE_FREETYPE)
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
add_definitions(-DTOOLS_USE_FREETYPE)
|
||||
add_definitions(-DTOOLS_USE_EXPAT)
|
||||
endif()
|
||||
|
||||
if (GEANT4_USE_HDF5)
|
||||
add_definitions(-DTOOLS_USE_HDF5)
|
||||
endif()
|
||||
|
||||
add_subdirectory(accumulables)
|
||||
add_subdirectory(csv)
|
||||
add_subdirectory(factory)
|
||||
# g4tools needs additional CMake setup
|
||||
add_subdirectory(g4tools)
|
||||
add_subdirectory(hntools)
|
||||
add_subdirectory(management)
|
||||
add_subdirectory(root)
|
||||
add_subdirectory(xml)
|
||||
if (GEANT4_USE_HDF5)
|
||||
add_subdirectory(hdf5)
|
||||
|
||||
set(G4analysis_COMPONENTS
|
||||
accumulables/sources.cmake
|
||||
csv/sources.cmake
|
||||
factory/sources.cmake
|
||||
g4tools/sources.cmake
|
||||
hntools/sources.cmake
|
||||
management/sources.cmake
|
||||
root/sources.cmake
|
||||
xml/sources.cmake
|
||||
)
|
||||
|
||||
if(GEANT4_USE_HDF5)
|
||||
add_definitions(-DTOOLS_USE_HDF5)
|
||||
list(APPEND G4analysis_COMPONENTS hdf5/sources.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
if (GEANT4_USE_HDF5)
|
||||
GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4analysis
|
||||
COMPONENTS
|
||||
accumulables/sources.cmake
|
||||
csv/sources.cmake
|
||||
factory/sources.cmake
|
||||
g4tools/sources.cmake
|
||||
hdf5/sources.cmake
|
||||
hntools/sources.cmake
|
||||
management/sources.cmake
|
||||
root/sources.cmake
|
||||
xml/sources.cmake
|
||||
)
|
||||
else()
|
||||
GEANT4_GLOBAL_LIBRARY_TARGET(NAME G4analysis
|
||||
COMPONENTS
|
||||
accumulables/sources.cmake
|
||||
csv/sources.cmake
|
||||
factory/sources.cmake
|
||||
g4tools/sources.cmake
|
||||
hntools/sources.cmake
|
||||
management/sources.cmake
|
||||
root/sources.cmake
|
||||
xml/sources.cmake
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
geant4_global_library_target(NAME G4analysis
|
||||
COMPONENTS ${G4analysis_COMPONENTS}
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# Install fonts
|
||||
#
|
||||
if (GEANT4_USE_FREETYPE)
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
install(DIRECTORY fonts/
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}/fonts
|
||||
PATTERN ".svn" EXCLUDE
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
+139
-119
@@ -16,9 +16,29 @@ committal in the SVN repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
June 10, 2020 J. Madsen (analysis-V10-06-03)
|
||||
- (bug-fix) Added a null-pointer check to ntupleDescription->fNtuple in
|
||||
G4RootPNtupleManager::Merge. This happened during testing of new
|
||||
G4TaskRunManager in basic/B5, which defaults to a higher
|
||||
number of threads than G4MTRunManager.
|
||||
|
||||
May 22, 2020 Hrivnacova (analysis-V10-06-02)
|
||||
- Updated to g4tools 5.1.0 (Guy Barrand):
|
||||
Corrections to handle automatic min/max axes values in case of log scale.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
April 29, 2020 G. Folger (analysis-V10-06-01)
|
||||
- (trivial) fix for clang10, affects header g4tools/include/tools/gl2ps
|
||||
|
||||
December 9, 2019 B. Morgan (analysis-V10-06-00)
|
||||
- Cleanup CMake build, removing obsolete granular library options and
|
||||
explicit include_directories.
|
||||
- Update granular dependencies in preparation for modularization
|
||||
- Remove uneeded links to externals in factory
|
||||
|
||||
December 3, 2019 Hrivnacova (analysis-V10-05-13)
|
||||
- Use consistently the same default value of rowMode
|
||||
in G4RootAnalysisManager::SetNtupleRowWise() as defined in the
|
||||
- Use consistently the same default value of rowMode
|
||||
in G4RootAnalysisManager::SetNtupleRowWise() as defined in the
|
||||
G4VAnalysisManager base class.
|
||||
|
||||
November 19, 2019 G. Cosmo (analysis-V10-05-12)
|
||||
@@ -36,10 +56,10 @@ November 11, 2019 B. Morgan (analysis-V10-05-09)
|
||||
- Link directly to FreeType and HDF5 impormted targets
|
||||
|
||||
November 8, 2019 I. Hrivnacova (analysis-V10-05-08)
|
||||
- In G4PlotManager: Disabled PAW encoding
|
||||
- In G4PlotManager: Disabled PAW encoding
|
||||
(this fixes a problem with unwanted axis labels in Greek)
|
||||
- Updated to g4tools 5.0.4 (Guy Barrand):
|
||||
- sg/plotter: added function set_encoding(), set_encoding_none() which allow
|
||||
- sg/plotter: added function set_encoding(), set_encoding_none() which allow
|
||||
to disable (unwanted) paw specific encoding
|
||||
- Fixed Coverity warnings
|
||||
|
||||
@@ -62,7 +82,7 @@ October 14, 2019 I. Hrivnacova (analysis-V10-05-05)
|
||||
and analoguos getters
|
||||
- New UI commands
|
||||
/analysis/[h,p][1,2,3]/set[X,Y,Z]axisLog true|false
|
||||
- Fix in g4tools for axis labels with log scale
|
||||
- Fix in g4tools for axis labels with log scale
|
||||
|
||||
October 9, 2019 I. Hrivnacova (analysis-V10-05-04)
|
||||
- Updated to g4tools 5.0.1 (Guy Barrand):
|
||||
@@ -103,15 +123,15 @@ March 11, 2019 G. Cosmo (analysis-V10-05-00)
|
||||
November 28, 2018 I. Hrivnacova (analysis-V10-04-10)
|
||||
- Use the same mutex in Root pntuple add_row and end_fill.
|
||||
This should fix occassional failures of tests in MT mode.
|
||||
|
||||
|
||||
November 21, 2018 I. Hrivnacova (analysis-V10-04-09)
|
||||
- Added G4RootAnalysisManager::SetNtupleRowWise(G4bool rowWise):
|
||||
this allows to choose rowWise/columnWise mode also in sequential mode
|
||||
- Added "boolean reset" argument in G4AnalysisManager::CloseFile() function:
|
||||
this allows to close a file without resetting data
|
||||
this allows to close a file without resetting data
|
||||
(used in MPI example)
|
||||
- Allow overriding selected functions in G4RootAnalysisManager, G4RootNtupleManager
|
||||
and G4TNtupleManager: needed for an external implementation of MPI ntuple merging
|
||||
- Allow overriding selected functions in G4RootAnalysisManager, G4RootNtupleManager
|
||||
and G4TNtupleManager: needed for an external implementation of MPI ntuple merging
|
||||
in MPI examples
|
||||
|
||||
November 9, 2018 G. Cosmo (analysis-V10-04-08)
|
||||
@@ -127,7 +147,7 @@ October 11, 2018 I. Hrivnacova (analysis-V10-04-06)
|
||||
|
||||
October 11, 2018 I. Hrivnacova (analysis-V10-04-05)
|
||||
- Modified management of plotting:
|
||||
G4PlotManager is now instantiated with G4AnalysisManager what makes
|
||||
G4PlotManager is now instantiated with G4AnalysisManager what makes
|
||||
possible to remove static G4PlotParameters.
|
||||
(This fixes the problem report ##2083.)
|
||||
|
||||
@@ -150,7 +170,7 @@ May 23, 2018 I. Hrivnacova (analysis-V10-04-02)
|
||||
February 15, 2018 J. Madsen (analysis-V10-04-01)
|
||||
- Fixed a deadlock issue with G4RootPNtupleManager where the mutex
|
||||
was locked before being passed to ROOT
|
||||
|
||||
|
||||
December 21, 2017 G. Cosmo (analysis-V10-04-00)
|
||||
- Fixed self-consistency in headers (missing #include) in G4BaseAnalysisManager,
|
||||
and G4PlotManager.
|
||||
@@ -174,7 +194,7 @@ October 19, 2017 I. Hrivnacova (analysis-V10-03-14)
|
||||
|
||||
September 26, 2017 I. Hrivnacova (analysis-V10-03-13)
|
||||
- Updated to g4tools 3.7.0 (Guy Barrand):
|
||||
- Update in colorf, colors to make possible to use the tools/colors color
|
||||
- Update in colorf, colors to make possible to use the tools/colors color
|
||||
table in G4Colour class.
|
||||
- Coverity fixes graphics/plotting code.
|
||||
See History_tools for the complete list of modifications.
|
||||
@@ -198,7 +218,7 @@ July 27, 2017 I. Hrivnacova (analysis-V10-03-08)
|
||||
- Adding support for Hdf5
|
||||
- Updated to g4tools 3.4.0 (Guy Barrand):
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
|
||||
July 21, 2017 I. Hrivnacova (analysis-V10-03-07)
|
||||
- Updated to g4tools 3.3.0 (Guy Barrand):
|
||||
Adding support for HDF5, improved tests.
|
||||
@@ -221,16 +241,16 @@ July 20, 2017 I. Hrivnacova (analysis-V10-03-04)
|
||||
functions in G4VAnalysisReader (needed for HDF5)
|
||||
|
||||
April 12, 2017 I. Hrivnacova (analysis-V10-03-03)
|
||||
- Corrected handling of open file failure
|
||||
- Corrected handling of open file failure
|
||||
(This fixes problem report #1957.)
|
||||
|
||||
March 14, 2017 I. Hrivnacova (analysis-V10-03-02)
|
||||
- Added GetP[1,2]Id(const G4String&) functions to
|
||||
- Added GetP[1,2]Id(const G4String&) functions to
|
||||
the G4AnaysisManager public interface.
|
||||
(This fixes problem report #1949.)
|
||||
|
||||
March 03, 2017 I. Hrivnacova (analysis-V10-03-01)
|
||||
- Fixed problem of removing non-empty ntuple files
|
||||
- Fixed problem of removing non-empty ntuple files
|
||||
in user application where ntuples are created after
|
||||
open file.
|
||||
(This mode is used in dna examples, eg. dnaphysics.)
|
||||
@@ -244,7 +264,7 @@ November 17, 2016 I. Hrivnacova (analysis-V10-02-25)
|
||||
- Updated to g4tools 2.3.0 (Guy Barrand):
|
||||
Adding methods to tools/impi for passing ntuple data.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
|
||||
November 03, 2016 I. Hrivnacova (analysis-V10-02-24)
|
||||
- Updated to g4tools 2.2.0 (Guy Barrand):
|
||||
Coverity fixes,
|
||||
@@ -253,7 +273,7 @@ November 03, 2016 I. Hrivnacova (analysis-V10-02-24)
|
||||
|
||||
October 30, 2016 I. Hrivnacova (analysis-V10-02-23)
|
||||
- Simplified G4RootAnalysisManager::GetNtupleFileNumber() to avoid using
|
||||
G4Threading::GetNumberOfRunningWorkerThreads() which seems to be failing
|
||||
G4Threading::GetNumberOfRunningWorkerThreads() which seems to be failing
|
||||
on gcc and icc plaftorms
|
||||
- Added temporary debug printing from this method
|
||||
|
||||
@@ -316,7 +336,7 @@ September 26, 2016 I. Hrivnacova (analysis-V10-02-11)
|
||||
|
||||
September 8, 2016 I. Hrivnacova (analysis-V10-02-10)
|
||||
- Enable creating/configurion profiles without cut values (vmin, vmax).
|
||||
This feature was disabled by a check for the values in G4VAnalysisManager;
|
||||
This feature was disabled by a check for the values in G4VAnalysisManager;
|
||||
these values are now treated in a special way.
|
||||
- Fixed duplicating Csv ntuple header
|
||||
|
||||
@@ -325,7 +345,7 @@ September 6, 2016 I. Hrivnacova (analysis-V10-02-09)
|
||||
(to be propagated in the patch to 10.2)
|
||||
|
||||
July 4, 2016 I. Hrivnacova (analysis-V10-02-08)
|
||||
- Adding missing inline keyword to functions defined in
|
||||
- Adding missing inline keyword to functions defined in
|
||||
G4ParameterManager.icc
|
||||
|
||||
June 24, 2016 I. Hrivnacova (analysis-V10-02-07)
|
||||
@@ -338,7 +358,7 @@ June 23, 2016 I. Hrivnacova (analysis-V10-02-06)
|
||||
and removed kUser (not needed anymore)
|
||||
- Added access to paremeters via iterators and ids
|
||||
(defined by the order of registering)
|
||||
- Introduced G4MergeFunction<T> type and apply merging via a function
|
||||
- Introduced G4MergeFunction<T> type and apply merging via a function
|
||||
defined accorting to the merge mode
|
||||
(thanks to Jonathan Madsen for providing an example of the code)
|
||||
- Return 0. instead of 0 when the return type is double
|
||||
@@ -396,7 +416,7 @@ November 3, 2015 I. Hrivnacova (analysis-V10-00-46)
|
||||
of deleting non-empty Root file containing only ntuples.
|
||||
|
||||
November 2, 2015 I. Hrivnacova (analysis-V10-01-43)
|
||||
- Fixed G4Parameter constructor
|
||||
- Fixed G4Parameter constructor
|
||||
|
||||
Oct 30, 2015 I. Hrivnacova (analysis-V10-01-42)
|
||||
- Fixed handling ntuples created in MT mode on master thread
|
||||
@@ -438,7 +458,7 @@ Sep 18, 2015 I. Hrivnacova (analysis-V10-01-36)
|
||||
Sep 18, 2015 I. Hrivnacova (analysis-V10-01-35)
|
||||
- Updated to g4tools 1.24.2 (Guy Barrand):
|
||||
- tools/wcsv_ntuple, tools/wroot/ntuple : have class icol public.
|
||||
- tools/mpi/wrmpi : fixed use of TOOLS_USE_MPI_PACK_NOT_CONST
|
||||
- tools/mpi/wrmpi : fixed use of TOOLS_USE_MPI_PACK_NOT_CONST
|
||||
- See History_tools for the complete list of modifications.
|
||||
- Use tools ntuple column base type (icol, iobj), which access is now enabled in tools,
|
||||
to avoid casting to/from void* and type check in FillNtupleXColumn (where both column type and
|
||||
@@ -446,7 +466,7 @@ Sep 18, 2015 I. Hrivnacova (analysis-V10-01-35)
|
||||
- Simplified definitions of G4TNtupleManager pure virtual functions
|
||||
|
||||
Sep 16, 2015 I. Hrivnacova (analysis-V10-01-34)
|
||||
- In G4TNtupleManager::FillNtupleTColumn:
|
||||
- In G4TNtupleManager::FillNtupleTColumn:
|
||||
changed Tvalue in const T& value to match exactlly with fill()
|
||||
functions in tools
|
||||
|
||||
@@ -454,16 +474,16 @@ Sep 15, 2015 I. Hrivnacova (analysis-V10-01-33)
|
||||
- Do not delete ntuple with Root output type
|
||||
|
||||
Sep 14, 2015 I. Hrivnacova (analysis-V10-01-32)
|
||||
- One more fix in G4RootNtupleManager - exact match of arguments in
|
||||
- One more fix in G4RootNtupleManager - exact match of arguments in
|
||||
template specialization
|
||||
|
||||
Sep 14, 2015 I. Hrivnacova (analysis-V10-01-31)
|
||||
- Added declaration for template specializations in G4RootNtupleManager.hh;
|
||||
Trying to fix vc12 compiler error:
|
||||
Trying to fix vc12 compiler error:
|
||||
'none of the 5 overloads could convert all the argument types'
|
||||
|
||||
Sep 14, 2015 I. Hrivnacova (analysis-V10-01-30)
|
||||
- Added scope G4Analysis:: to all calls to make_unique
|
||||
- Added scope G4Analysis:: to all calls to make_unique
|
||||
(to avoid ambiguity error on vc12 with std::make_unique )
|
||||
|
||||
Sep 14, 2015 I. Hrivnacova (analysis-V10-01-29)
|
||||
@@ -473,7 +493,7 @@ Sep 12, 2015 I. Hrivnacova (analysis-V10-01-28)
|
||||
- Removed G4CsvNtupleManager.icc file, not used
|
||||
|
||||
Sep 11, 2015 I. Hrivnacova (analysis-V10-01-27)
|
||||
- Fixed compilation warnings about unused variables
|
||||
- Fixed compilation warnings about unused variables
|
||||
|
||||
Sep 11, 2015 I. Hrivnacova (analysis-V10-01-26)
|
||||
- Fixed compilation with gcc 5.1:
|
||||
@@ -515,12 +535,12 @@ Aug 12, 2015 I. Hrivnacova (analysis-V10-01-21)
|
||||
|
||||
Jul 01, 2015 I. Hrivnacova (analysis-V10-01-20)
|
||||
- Updated to g4tools 1.23.1 (Guy Barrand):
|
||||
Finalize interfaces to MPI;
|
||||
Finalize interfaces to MPI;
|
||||
prepare the ground for plot style files.
|
||||
See History_tools for the complete list of modifications.
|
||||
- Added G4VAnalysisManager::Merge(tools::histo::hmpi*)
|
||||
- Added G4VAnalysisManager::Merge(tools::histo::hmpi*)
|
||||
and G4MMPIToolsManager class which implements histogram & profiles
|
||||
MPI merging using tools/histo/hmpi interface
|
||||
MPI merging using tools/histo/hmpi interface
|
||||
|
||||
Jun 23, 2015 I. Hrivnacova (analysis-V10-00-45)
|
||||
- Fixed G4Analysis::Tokenize() which was failing when processsing a string
|
||||
@@ -533,26 +553,26 @@ Jun 10, 2015 I. Hrivnacova (analysis-V10-01-18)
|
||||
- Make new functions SetNtupleSColumn() in G4VRNtupleManager
|
||||
pure virtual.
|
||||
|
||||
Jun 03, 2015 I. Hrivnacova (analysis-V10-01-17)
|
||||
Jun 03, 2015 I. Hrivnacova (analysis-V10-01-17)
|
||||
- Updated to g4tools 1.22.1 (Guy Barrand):
|
||||
Revisit structure for plotting related code.
|
||||
Revisit structure for plotting related code.
|
||||
Added methods for writing multiple pages in a file.
|
||||
- Integrated changes in g4tools:
|
||||
- Integrated changes in g4tools:
|
||||
generating a single plot file with multiple pages.
|
||||
|
||||
Jun 03, 2015 I. Hrivnacova (analysis-V10-01-16)
|
||||
Jun 03, 2015 I. Hrivnacova (analysis-V10-01-16)
|
||||
- Added functions for batch plotting:
|
||||
o to activate batch plotting of a selected hitsogram/profile:
|
||||
analysisManger->SetH1Plotting(id, true);
|
||||
o the output .ps file is then create on Write() call
|
||||
in addition to standard output files
|
||||
o Plotting available for 1D, 2D histograms
|
||||
o Plotting available for 1D, 2D histograms
|
||||
- Updated to g4tools 1.21.0 (Guy Barrand):
|
||||
Revisit #include paths to avoid too much -I when compiling.
|
||||
|
||||
May 19, 2015 I. Hrivnacova (analysis-V10-01-15)
|
||||
May 19, 2015 I. Hrivnacova (analysis-V10-01-15)
|
||||
- Updated to g4tools 1.20.0 (Guy Barrand):
|
||||
Added "batch plotting" facility.
|
||||
Added "batch plotting" facility.
|
||||
|
||||
May 6, 2015 I. Hrivnacova (analysis-V10-01-14)
|
||||
- Fixed command directory names and code clean-up.
|
||||
@@ -566,7 +586,7 @@ May 6, 2015 I. Hrivnacova (analysis-V10-01-12)
|
||||
|
||||
May 5, 2015 I. Hrivnacova (analysis-V10-01-11)
|
||||
- Implemented activation of ntuples
|
||||
- Implemented setX,Y,Z commands for setting histograms/profiles
|
||||
- Implemented setX,Y,Z commands for setting histograms/profiles
|
||||
parameters per dimensiion. They can be used as an alternative to the
|
||||
complex set commands.
|
||||
Note: The parameters per dimensions have to be set sucessively; eg.
|
||||
@@ -574,19 +594,19 @@ May 5, 2015 I. Hrivnacova (analysis-V10-01-11)
|
||||
/analysis/h2/setY ...
|
||||
Incomplete or ordre-reverted setting will result in issuing a warning
|
||||
and will be ignored.
|
||||
- Restructured messenger classes to avoid code duplications.
|
||||
- Restructured messenger classes to avoid code duplications.
|
||||
|
||||
May 3, 2015 I. Hrivnacova (analysis-V10-01-10)
|
||||
- Implemented support for ntuple vector columns with Csv output
|
||||
- Added Set/GetCompressionLevel() functions to G4AnalysisManager
|
||||
- Added Set/GetCompressionLevel() functions to G4AnalysisManager
|
||||
(used only with Root output) and changed its default value to 1 (was 9))
|
||||
|
||||
April 14, 2015 I. Hrivnacova (analysis-V10-01-09)
|
||||
April 14, 2015 I. Hrivnacova (analysis-V10-01-09)
|
||||
- Updated to g4tools 1.19.2 (Guy Barrand):
|
||||
Fixed compilation on Mac, clang 3.4.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
April 13, 2015 I. Hrivnacova (analysis-V10-01-08)
|
||||
April 13, 2015 I. Hrivnacova (analysis-V10-01-08)
|
||||
- Updated to g4tools 1.19.1 (Guy Barrand):
|
||||
csv: handle vector column if using the ntuple_booking way
|
||||
See History_tools for the complete list of modifications.
|
||||
@@ -594,15 +614,15 @@ April 13, 2015 I. Hrivnacova (analysis-V10-01-08)
|
||||
April 9, 2015 I. Hrivnacova (analysis-V10-00-44)
|
||||
tag to be included in the patch release:
|
||||
- Updated to g4tools 1.17.2 (Guy Barrand):
|
||||
Changes for Windows (MinGW) - fixing problem #1721 (mainly to change
|
||||
Changes for Windows (MinGW) - fixing problem #1721 (mainly to change
|
||||
#ifdef WIN32 to #ifdef _MSC_VER, which more clean)
|
||||
|
||||
April 02, 2015 I. Hrivnacova (analysis-V10-01-07)
|
||||
April 02, 2015 I. Hrivnacova (analysis-V10-01-07)
|
||||
- Updated to g4tools 1.19.0 (Guy Barrand):
|
||||
- Csv handles vector columns
|
||||
- Changes for Windows (MinGW) - fixing problem #1721 (mainly to change
|
||||
- Changes for Windows (MinGW) - fixing problem #1721 (mainly to change
|
||||
#ifdef WIN32 to #ifdef _MSC_VER, which more clean)
|
||||
- Various optimisations to be faster in converting numbers to strings
|
||||
- Various optimisations to be faster in converting numbers to strings
|
||||
(huge improvements with that around csv and xml tuples)
|
||||
- See History_tools for the complete list of modifications.
|
||||
|
||||
@@ -618,9 +638,9 @@ March 17, 2015 I. Hrivnacova (analysis-V10-01-06)
|
||||
use of a temorary sub-ntuple is needed
|
||||
|
||||
March 13, 2015 I. Hrivnacova (analysis-V10-01-05)
|
||||
- Fixed false warnings about unknown column type when an ntuple contains
|
||||
a column of a vector type and is created via ntuple booking
|
||||
|
||||
- Fixed false warnings about unknown column type when an ntuple contains
|
||||
a column of a vector type and is created via ntuple booking
|
||||
|
||||
March 13, 2015 I. Hrivnacova (analysis-V10-01-04)
|
||||
- Fixed G4AnalysisManager::IsActive() - now taken into all Hn & Pn
|
||||
managers
|
||||
@@ -651,7 +671,7 @@ December 5, 2014 G. Cosmo (analysis-V10-01-00)
|
||||
|
||||
November 24, 2014 I. Hrivnacova (analysis-V10-00-41)
|
||||
- Fixed update to g4tools 1.16.3:
|
||||
the update of g4tools/src/csz_inflate.cc with Coverity fix
|
||||
the update of g4tools/src/csz_inflate.cc with Coverity fix
|
||||
was missing
|
||||
|
||||
November 07, 2014 I. Hrivnacova (analysis-V09-06-33)
|
||||
@@ -665,7 +685,7 @@ November 05, 2014 I. Hrivnacova (analysis-V10-00-39)
|
||||
- Fixed Coverity defect in G4XmlNtupleManager
|
||||
|
||||
October 27, 2014 I. Hrivnacova (analysis-V10-00-38)
|
||||
- Revised (and simplified) numbering of warnings in exception messages
|
||||
- Revised (and simplified) numbering of warnings in exception messages
|
||||
|
||||
October 25, 2014 I. Hrivnacova (analysis-V10-00-37)
|
||||
- Updated to g4tools 1.16.3 (by G. Barrand):
|
||||
@@ -674,9 +694,9 @@ October 25, 2014 I. Hrivnacova (analysis-V10-00-37)
|
||||
|
||||
October 22, 2014 I. Hrivnacova (analysis-V10-00-36)
|
||||
- Updated to g4tools 1.16.2 (by G. Barrand):
|
||||
modifs for example code to read csv ntuple by using ntuple_binding
|
||||
modifs for example code to read csv ntuple by using ntuple_binding
|
||||
see History_tools for complete list of modifications.
|
||||
- Added writing commented header (default) for csv ntuple
|
||||
- Added writing commented header (default) for csv ntuple
|
||||
- Implemented reading csv ntuples
|
||||
- Removed H1, H2, P1 dummy manager classes and H3, P3 moved in
|
||||
hbook implementation in examples
|
||||
@@ -684,15 +704,15 @@ October 22, 2014 I. Hrivnacova (analysis-V10-00-36)
|
||||
- Added checks for ntupleId in RNtupleManager classes
|
||||
|
||||
October 22, 2014 I. Hrivnacova (analysis-V10-00-35)
|
||||
- Fixed compiler warning in tools/wroot/leaf:
|
||||
- Fixed compiler warning in tools/wroot/leaf:
|
||||
base class tools::wroot::ibo should be explicitly initialized in the copy constructor
|
||||
|
||||
October 21, 2014 I. Hrivnacova (analysis-V10-00-34)
|
||||
- Updated to g4tools 1.16.1 (by G. Barrand):
|
||||
Fixed reading root ntuple with column of std::string type
|
||||
Fixed reading root ntuple with column of std::string type
|
||||
by using ntuple_binding.
|
||||
see History_tools for complete list of modifications.
|
||||
|
||||
|
||||
October 20, 2014 I. Hrivnacova (analysis-V10-00-33)
|
||||
- Updated to g4tools 1.16.0 (by G. Barrand)
|
||||
Write/read ntuple with std::string columns,
|
||||
@@ -712,7 +732,7 @@ October 07, 2014 I. Hrivnacova (analysis-V10-00-30)
|
||||
- Implemented G4CsvAnalysisReader: reading all histograms and profiles;
|
||||
ntuples noy yet done
|
||||
- Updated to g4tools 1.15.2 (by G. Barrand)
|
||||
Fixed reading csv histograms and profiles (rcsv_histo)
|
||||
Fixed reading csv histograms and profiles (rcsv_histo)
|
||||
|
||||
September 30, 2014 I. Hrivnacova (analysis-V10-00-29)
|
||||
- Updated to g4tools 1.15.1 (by G. Barrand)
|
||||
@@ -742,10 +762,10 @@ September 11, 2014 I. Hrivnacova (analysis-V10-00-24)
|
||||
- Added reading P1, P2, H3
|
||||
- Modifications to fit to all outputs
|
||||
- Support for both user defined file names and "generic" file names
|
||||
(generated automatically by G4AnalysisManager from the base name)
|
||||
(generated automatically by G4AnalysisManager from the base name)
|
||||
- Introduced G4BaseFileManager and separated implementation for
|
||||
output/input file managers
|
||||
- Implemented reading P1, P2 in G4RootAnalysisReader;
|
||||
- Implemented reading P1, P2 in G4RootAnalysisReader;
|
||||
prepared code for H3 which reading is not yet available in tools
|
||||
- Implemented G4XmlAnalysisReader (complete)
|
||||
- Fixed writing ntuples when more than one ntuple is defined (Xml)
|
||||
@@ -763,7 +783,7 @@ September 02, 2014 I. Hrivnacova (analysis-V10-00-21)
|
||||
- Fixed Coverity defects:
|
||||
- Initialization of data members in G4VAnalysisManager
|
||||
- Provided assignment operator for G4HnDimensionInformation
|
||||
- Removed unused data member in G4HnDimensionInformation
|
||||
- Removed unused data member in G4HnDimensionInformation
|
||||
|
||||
July 28, 2014 I. Hrivnacova (analysis-V10-00-20)
|
||||
- Removed unsused data member in G4P1DummyManager
|
||||
@@ -777,7 +797,7 @@ July 24, 2014 I. Hrivnacova (analysis-V10-00-19)
|
||||
|
||||
July 23, 2014 I. Hrivnacova (analysis-V10-00-18)
|
||||
- Updated to g4tools 1.11.1 (by G. Barrand):
|
||||
Fixed problem on Windows with including windows.h.
|
||||
Fixed problem on Windows with including windows.h.
|
||||
|
||||
July 23, 2014 I. Hrivnacova (analysis-V09-06-32)
|
||||
- Fixed applying unit to min, max values in H1, H2 managers
|
||||
@@ -788,23 +808,23 @@ July 18, 2014 I. Hrivnacova (analysis-V10-00-17)
|
||||
See History_tools for complete list of modifications.
|
||||
|
||||
July 02, 2014 I. Hrivnacova (analysis-V10-00-16)
|
||||
- Replaced use of std::cout with G4cout in Root managers
|
||||
- Replaced use of std::cout with G4cout in Root managers
|
||||
(to fix data race reported by A. Dotti)
|
||||
|
||||
June 27, 2014 G. Cosmo (analysis-V10-00-15)
|
||||
- Get rid of obsolete 'register' keyword in csz_inflate.cc..
|
||||
|
||||
June 12, 2014 I. Hrivnacova (analysis-V10-00-14)
|
||||
- Added typedefs and functions for accessing iterators
|
||||
- Added typedefs and functions for accessing iterators
|
||||
over H1, H2, Ntuples;
|
||||
Usage:
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
for (G4H1Iterator it = analysisManager->BeginH1();
|
||||
G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
|
||||
for (G4H1Iterator it = analysisManager->BeginH1();
|
||||
it != analysisManager->EndH1(); it++ ) {
|
||||
G4H1* h1 = *it;
|
||||
// call any h1 function define in tools
|
||||
}
|
||||
- Added G4AnalysisManager functions to access FirstIds
|
||||
}
|
||||
- Added G4AnalysisManager functions to access FirstIds
|
||||
G4int GetFirst[H1|H2|Ntuple|NtupleColumn]Id() const;
|
||||
|
||||
June 11, 2014 I. Hrivnacova (analysis-V10-00-13)
|
||||
@@ -819,7 +839,7 @@ June 03, 2014 I. Hrivnacova (analysis-V09-06-31)
|
||||
(this addresses problem report #1633)
|
||||
|
||||
May 16, 2014 I. Hrivnacova (analysis-V10-00-11)
|
||||
- Fixed Coverity defects.
|
||||
- Fixed Coverity defects.
|
||||
- Updated to g4tools 1.10.0 (by G. Barrand):
|
||||
See History_tools for complete list of modifications.
|
||||
|
||||
@@ -827,25 +847,25 @@ April 25, 2014 I. Hrivnacova (analysis-V10-00-10)
|
||||
April 25, 2014 I. Hrivnacova (analysis-V09-06-30)
|
||||
- Fixed implementation of compound commands in G4H[1,2,n]Messenger classes
|
||||
using new G4AnalysisUtilities::Tokenize() function.
|
||||
This allows to pass multi-word strings within "" and fixes problem report
|
||||
This allows to pass multi-word strings within "" and fixes problem report
|
||||
#1616.
|
||||
- Fixed G4H2ToolsManager::SetH2YAxisTitle: set title to y-axis and not x-axis.
|
||||
This addresses problem report #1620.
|
||||
This addresses problem report #1620.
|
||||
|
||||
April 16, 2014 I. Hrivnacova (analysis-V09-06-29)
|
||||
- Do not allow creating objects with empty names
|
||||
(this addresses problem report #1579)
|
||||
|
||||
April 14, 2014 I. Hrivnacova (analysis-V10-00-09)
|
||||
- Use G4Threading::IsMultithreadedApplication() instead of
|
||||
G4AnalysisManagerState::IsMT() (now removed);
|
||||
- Use G4Threading::IsMultithreadedApplication() instead of
|
||||
G4AnalysisManagerState::IsMT() (now removed);
|
||||
this function fixes files clean-up at the end of sequential
|
||||
application built against multi-threaded Geant4 libraries.
|
||||
application built against multi-threaded Geant4 libraries.
|
||||
|
||||
April 14, 2014 I. Hrivnacova (analysis-V10-00-08)
|
||||
- Do not allow creating objects with empty names
|
||||
(this addresses problem report #1579)
|
||||
- Introduced independent numbering of warnings from reader
|
||||
- Introduced independent numbering of warnings from reader
|
||||
- Renamed g4tools/src/inflate.cc in csz_inflate.cc to avoid confusion with
|
||||
zlib inflate.cc
|
||||
|
||||
@@ -868,15 +888,15 @@ April 10, 2014 I. Hrivnacova (analysis-V10-00-05)
|
||||
|
||||
March 12, 2014 I. Hrivnacova (analysis-V09-06-28)
|
||||
March 11, 2014 I. Hrivnacova (analysis-V10-00-04)
|
||||
- Fixed H1, H2 functions to access xmin, xmax and width
|
||||
- Fixed H1, H2 functions to access xmin, xmax and width
|
||||
(do not apply function and unit to return values)
|
||||
|
||||
March 10, 2014 I. Hrivnacova (analysis-V09-06-27)
|
||||
- Fixed bug in /analysis/h1/setAscii command
|
||||
- Fixed bug in /analysis/h1/setAscii command
|
||||
(introduced with refactoring messenger classes in analysis-V09-06-19)
|
||||
|
||||
March 05, 2014 I. Hrivnacova (analysis-V10-00-03)
|
||||
- Fixed bug in /analysis/h1/setAscii command
|
||||
- Fixed bug in /analysis/h1/setAscii command
|
||||
(introduced with refactoring messenger classes in analysis-V09-06-19)
|
||||
|
||||
February 05, 2014 I. Hrivnacova (analysis-V10-00-02)
|
||||
@@ -890,10 +910,10 @@ February 04, 2014 I. Hrivnacova (analysis-V10-00-01)
|
||||
// Create columns of vector in the last created ntuple
|
||||
G4int CreateNtupleTColumn(
|
||||
const G4String& name, std::vector<int>& vector);
|
||||
G4int CreateNtupleTColumn(G4int ntupleId,
|
||||
G4int CreateNtupleTColumn(G4int ntupleId,
|
||||
const G4String& name, std::vector<int>& vector);
|
||||
where T can be I, F, T
|
||||
- Updated to g4tools 1.8.0 (by G. Barrand)
|
||||
- Updated to g4tools 1.8.0 (by G. Barrand)
|
||||
See History_tools for complete list of modifications.
|
||||
|
||||
January 21, 2014 I. Hrivnacova (analysis-V10-00-00)
|
||||
@@ -909,11 +929,11 @@ October 02, 2013 I. Hrivnacova (analysis-V09-06-25)
|
||||
a master instance of analysis manager.
|
||||
|
||||
September 30, 2013 I. Hrivnacova (analysis-V09-06-24)
|
||||
- Removed static G4AnalysisManager::Create(G4bool isMaster) function
|
||||
- Removed static G4AnalysisManager::Create(G4bool isMaster) function
|
||||
(the master/worker is now identified automatically)
|
||||
- Removed instances counter and its mutex
|
||||
- Removed instances counter and its mutex
|
||||
- Reimplemented G4AnalysisManagerState::IsMT() with use of
|
||||
G4Threading functions
|
||||
G4Threading functions
|
||||
- Removed virtual declaration for GetH1, GetH2, GetNtuple functions
|
||||
in manager classes (to follow NVI pattern)
|
||||
- Fixed installing of g4analysis_defs.hh header
|
||||
@@ -921,30 +941,30 @@ September 30, 2013 I. Hrivnacova (analysis-V09-06-24)
|
||||
- Fixed g4csv_defs.hh (G4Ntuple is the ntuple type, and not a pointer)
|
||||
|
||||
September 17, 2013 I. Hrivnacova (analysis-V09-06-23)
|
||||
- Use thread Id (now available) in generating file names instead
|
||||
- Use thread Id (now available) in generating file names instead
|
||||
of thread Pid.
|
||||
|
||||
September 02, 2013 I. Hrivnacova (analysis-V09-06-22)
|
||||
- Updated to g4tools 1.7.0 (by G. Barrand):
|
||||
Fixed problem report #1523 (incorrect setting the list of free blocks
|
||||
Fixed problem report #1523 (incorrect setting the list of free blocks
|
||||
in the ROOT file).
|
||||
See History_tools for complete list of modifications.
|
||||
|
||||
September 02, 2013 I. Hrivnacova (analysis-V09-06-21)
|
||||
- Fixed saving binScheme in H2 information
|
||||
- Fixed saving binScheme in H2 information
|
||||
|
||||
August 26, 2013 I. Hrivnacova (analysis-V09-06-20)
|
||||
- Fixed Coverity defects
|
||||
- Fixed Coverity defects
|
||||
(missing copy constructor and assignment operator in G4VH1Manager
|
||||
and G4VH2Manager)
|
||||
|
||||
August 26, 2013 A.Dotti (analysis-V09-06-19)
|
||||
- New interface for functions in G4Threading.hh,
|
||||
- New interface for functions in G4Threading.hh,
|
||||
now in G4Threading namespace
|
||||
And also (I. Hrivnacova):
|
||||
- Added a possibility to define logarithmic binning for H1 and H2
|
||||
- Reorganized messenger classes per objects: they are now associated
|
||||
with the public interface (G4VAnalysisManager)
|
||||
with the public interface (G4VAnalysisManager)
|
||||
- Fixed path to g4tools in test/build
|
||||
|
||||
August 1, 2013 I.Hrivnacova (analysis-V09-06-18)
|
||||
@@ -953,7 +973,7 @@ August 1, 2013 I.Hrivnacova (analysis-V09-06-18)
|
||||
|
||||
July 15, 2013 I.Hrivnacova (analysis-V09-06-17)
|
||||
- Added set_property(...GEANT4_BUILDTREE_INCLUDE_DIRS) in
|
||||
g4tools/CMakeLists.txt
|
||||
g4tools/CMakeLists.txt
|
||||
|
||||
July 15, 2013 I.Hrivnacova (analysis-V09-06-16)
|
||||
- Added GLOBAL_DEPENDENCIES lists in sources.cmake files
|
||||
@@ -963,7 +983,7 @@ July 15, 2013 I.Hrivnacova (analysis-V09-06-15)
|
||||
(previous tag failed on linking error on Mac)
|
||||
|
||||
July 15, 2013 I.Hrivnacova (analysis-V09-06-14)
|
||||
- Introduced subdirectories:
|
||||
- Introduced subdirectories:
|
||||
csv, g4tools, hntools, management, root, xml
|
||||
and updated CMake & GNUmake files accordingly
|
||||
|
||||
@@ -984,11 +1004,11 @@ July 11, 2013 I.Hrivnacova (analysis-V09-06-12)
|
||||
void SetH2Activation(G4int id, G4bool activation);
|
||||
|
||||
June 20, 2013 I.Hrivnacova (analysis-V09-06-11)
|
||||
- Fixed the problem in Root files clean-up (manifested in
|
||||
- Fixed the problem in Root files clean-up (manifested in
|
||||
examples/advanced/microbeam):
|
||||
non-empty Root file was deleted when only ntuples and no histograms
|
||||
were booked and the application was built against MT Geant4 but run
|
||||
in sequential mode.
|
||||
non-empty Root file was deleted when only ntuples and no histograms
|
||||
were booked and the application was built against MT Geant4 but run
|
||||
in sequential mode.
|
||||
|
||||
June 11, 2013 I.Hrivnacova (analysis-V09-06-10)
|
||||
- Fixed deleting fNtuple in G4RootNtupleDescription
|
||||
@@ -1004,7 +1024,7 @@ May 31, 2013 I.Hrivnacova (analysis-V09-06-08)
|
||||
|
||||
April 18, 2013 I.Hrivnacova (analysis-V09-06-07)
|
||||
- Manager classes updated for MT:
|
||||
Added fgMasterInstance, fIsMaster data members and functions for
|
||||
Added fgMasterInstance, fIsMaster data members and functions for
|
||||
mergings histograms (Root, Xml) from worker tom master:
|
||||
void AddH1Vector(std::vector<tools::histo::h1d*>& h1Vector);
|
||||
void AddH2Vector(std::vector<tools::histo::h2d*>& h2Vector);
|
||||
@@ -1033,14 +1053,14 @@ March 21, 2013 I.Hrivnacova (analysis-V09-06-01)
|
||||
- Adding use of zlib in GNUmakefile (needed for compression)
|
||||
|
||||
December 17, 2012 I.Hrivnacova (analysis-V09-06-00)
|
||||
- Added 'svn:keywords' property to all files (except for tools)
|
||||
- Added 'svn:keywords' property to all files (except for tools)
|
||||
|
||||
October 26, 2012 I.Hrivnacova (analysis-V09-05-15)
|
||||
- Updated to g4tools 1.4.3 (by G. Barrand) - see History_tools;
|
||||
includes bug correction for histo/h3::fill
|
||||
|
||||
October 14, 2012 I.Hrivnacova (analysis-V09-05-14)
|
||||
- Adding function G4VAnalysisManager::SetActivation(..)
|
||||
- Adding function G4VAnalysisManager::SetActivation(..)
|
||||
for setting activation to all histograms of one type
|
||||
- Adding commands to activate/inactivate 1D, 2D histograms
|
||||
- Fixed GetH1[2]Width: return the correct value also when histogram is
|
||||
@@ -1064,15 +1084,15 @@ August 28, 2012 I.Hrivnacova (analysis-V09-05-10)
|
||||
|
||||
August 22, 2012 I.Hrivnacova (analysis-V09-05-09)
|
||||
- Updated to g4tools 1.4.1 (by G. Barrand) - see History_tools
|
||||
- Adding setters/getters for histogram axis titles
|
||||
- Adding setters/getters for histogram axis titles
|
||||
and commands for setting histogram title and axis titles
|
||||
|
||||
August 20, 2012 I.Hrivnacova (analysis-V09-05-08)
|
||||
- Updated to g4tools 1.3.2 (by G. Barrand) - see History_tools
|
||||
- Adding a possibility to fill h1, h2 with values with automatically
|
||||
- Adding a possibility to fill h1, h2 with values with automatically
|
||||
applied function (eg. log10, exp)
|
||||
- Pass units via a name instead of value
|
||||
- Adding getters for many h1, h2 attributes
|
||||
- Adding getters for many h1, h2 attributes
|
||||
- Adding ScaleH1(), ScaleH2()
|
||||
- Fixed warning in G4RootAnalysisManager when trying to fill inactivated
|
||||
histogram
|
||||
@@ -1081,12 +1101,12 @@ August 20, 2012 I.Hrivnacova (analysis-V09-05-08)
|
||||
July 27, 2012 I.Hrivnacova (analysis-V09-05-07)
|
||||
- Updated to g4tools 1.3.1 (by G. Barrand) - see History_tools
|
||||
- Messages from Fill functions only in verbose level 3
|
||||
- Fixes in memory management:
|
||||
- Fixes in memory management:
|
||||
delete file before opening a new one (all);
|
||||
delete ntuple before closing a file (csv, xml)
|
||||
|
||||
July 25, 2012 I.Hrivnacova (analysis-V09-05-06)
|
||||
- Fix returned values in newly added functions for accessing additional
|
||||
- Fix returned values in newly added functions for accessing additional
|
||||
information. (This fixes compiler warnings.)
|
||||
|
||||
July 24, 2012 I.Hrivnacova (analysis-V09-05-05)
|
||||
@@ -1102,7 +1122,7 @@ July 24, 2012 I.Hrivnacova (analysis-V09-05-03)
|
||||
- Adding an additional information to the analysis objects
|
||||
(defined in G4HnInformation.hh):
|
||||
units, activation, ascii output
|
||||
- Implemented a possibility to book histograms/ntuples
|
||||
- Implemented a possibility to book histograms/ntuples
|
||||
before opening a file
|
||||
- Adding a messenger class allowing to configure file and directories
|
||||
names, verbosity level and histogram parameters interactively.
|
||||
@@ -1115,8 +1135,8 @@ February 23, 2012 I.Hrivnacova (analysis-V09-05-01)
|
||||
setting Ids etc. so that these parameters cannot be changed once
|
||||
they were used
|
||||
- Changed return type for the functions with locks to G4bool
|
||||
- Renamed FirstNtupleId data member and its setter to FirstNtupleColumnId
|
||||
to better reflect its meaning
|
||||
- Renamed FirstNtupleId data member and its setter to FirstNtupleColumnId
|
||||
to better reflect its meaning
|
||||
- Adding W009-W012 warning in exception_classification.txt
|
||||
|
||||
February 14, 2012 I.Hrivnacova (analysis-V09-05-00)
|
||||
@@ -1134,23 +1154,23 @@ November 30th 2011 B.Morgan (analysis-V09-04-15)
|
||||
mode.
|
||||
|
||||
November 24 2001 I.Hrivnacova (analysis-V09-04-14)
|
||||
- Updated to g4tools-1.0.5 (G. Barrand):
|
||||
- Updated to g4tools-1.0.5 (G. Barrand):
|
||||
- wroot : streamers, buffer, wbuf, named :
|
||||
arrange to avoid the usage of the std::vector<>::data() method
|
||||
arrange to avoid the usage of the std::vector<>::data() method
|
||||
which is quite not portable for the moment.
|
||||
- remove the no more needed (and problematic) tools/vdata file.
|
||||
- remove the no more needed (and problematic) tools/vdata file.
|
||||
|
||||
November 24 2001 I.Hrivnacova (analysis-V09-04-13)
|
||||
- tools/vdata: restored protection __GXX_EXPERIMENTAL_CXX0X__
|
||||
which got lost with update to g4tools-1.0.4
|
||||
|
||||
|
||||
November 24 2001 I.Hrivnacova (analysis-V09-04-12)
|
||||
- Updated to g4tools-1.0.4 (G. Barrand):
|
||||
- Updated to g4tools-1.0.4 (G. Barrand):
|
||||
- Fix in tools/vdata:
|
||||
Adding a protection against an empty vector
|
||||
|
||||
Adding a protection against an empty vector
|
||||
|
||||
November 19 2001 I.Hrivnacova (analysis-V09-04-11)
|
||||
- Updated to g4tools-1.0.3 (G. Barrand):
|
||||
- Updated to g4tools-1.0.3 (G. Barrand):
|
||||
- Removed warning in CHBOOK/CHPWDF
|
||||
- Remove #ifdef WIN32 in wroot/date.
|
||||
|
||||
@@ -1168,13 +1188,13 @@ October 18 2011 I.Hrivnacova (analysis-V09-04-08)
|
||||
October 17 2011 I.Hrivnacova (analysis-V09-04-07)
|
||||
- Added support for H2 histograms
|
||||
- Added verbose printing (for levels: 0,1,2)
|
||||
- Updated to g4tools-1.0.2 (G. Barrand):
|
||||
- Updated to g4tools-1.0.2 (G. Barrand):
|
||||
- Removed "inline" keyword for the methods having code implementation
|
||||
within classes. Dixit C++ docs, this kind of method is treated defacto
|
||||
as "inline". The keyword "inline" remains or for functions or for the
|
||||
within classes. Dixit C++ docs, this kind of method is treated defacto
|
||||
as "inline". The keyword "inline" remains or for functions or for the
|
||||
few methods having their implementation outside the class.
|
||||
- Fixed some warnings (coming from Coverity or some specific version of g++)
|
||||
about the lacking of calling the copy constructor of an inherited interface
|
||||
- Fixed some warnings (coming from Coverity or some specific version of g++)
|
||||
about the lacking of calling the copy constructor of an inherited interface
|
||||
in some copy constructors.
|
||||
- wroot/tree : have the streaming of the list of leaves. This permits to have
|
||||
the ROOT/TTree::Scan() method working when looking for a ntuple
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
5.1.0:
|
||||
- tools/sg/plotter, data_axis, plottables, h2plot : corrections to handle automatic min/max in case of log scale.
|
||||
- tools/histo/base_histo : [min,max]_bin_height_with_entries(). Used by the plotter.
|
||||
- tools/wcsv_histo : h_header(), p_header() functions.
|
||||
- tools/gl2ps : cast ~1UL to double.
|
||||
- tools/test/cpp/waxml.cpp, wcsv_histo.cpp,wcsv_ntuple.cpp,wcsv_ntuple_booking.cpp :
|
||||
have output file name of the form : out_<app>_<etc>.[aida,csv]
|
||||
- tools/test/*.ps : new version to take into account modifs done in the plotter.
|
||||
- various modifications coming from other usage of inlib/exlib.
|
||||
|
||||
5.0.5:
|
||||
- tools/gl2ps : gl2psPDFgroupListWriteXObjectResources : add a break at end of case GL2PS_PIXMAP.
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4analysismng
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,51 +1,29 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4hntools
|
||||
# Package: Geant4.src.G4analysis.G4hntools
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
# Module : G4accumulables
|
||||
# Package: Geant4.src.G4analysis.G4accumulables
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4accumulables
|
||||
HEADERS
|
||||
G4MergeMode.hh
|
||||
G4AccumulableManager.hh
|
||||
G4AccumulableManager.icc
|
||||
G4Accumulable.hh
|
||||
G4Accumulable.icc
|
||||
G4VAccumulable.hh
|
||||
G4VAccumulable.icc
|
||||
SOURCES
|
||||
G4MergeMode.cc
|
||||
G4AccumulableManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
# G4analysismng
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
geant4_define_module(NAME G4accumulables
|
||||
HEADERS
|
||||
G4MergeMode.hh
|
||||
G4AccumulableManager.hh
|
||||
G4AccumulableManager.icc
|
||||
G4Accumulable.hh
|
||||
G4Accumulable.icc
|
||||
G4VAccumulable.hh
|
||||
G4VAccumulable.icc
|
||||
SOURCES
|
||||
G4MergeMode.cc
|
||||
G4AccumulableManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4csv
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,61 +1,38 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4csv
|
||||
# Package: Geant4.src.G4analysis.G4csv
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/hntools/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4csv
|
||||
HEADERS
|
||||
G4CsvAnalysisManager.hh
|
||||
G4CsvAnalysisManager.icc
|
||||
G4CsvAnalysisReader.hh
|
||||
G4CsvAnalysisReader.icc
|
||||
G4CsvFileManager.hh
|
||||
G4CsvNtupleManager.hh
|
||||
G4CsvRFileManager.hh
|
||||
G4CsvRNtupleManager.hh
|
||||
g4csv_defs.hh
|
||||
g4csv.hh
|
||||
SOURCES
|
||||
G4CsvAnalysisManager.cc
|
||||
G4CsvAnalysisReader.cc
|
||||
G4CsvFileManager.cc
|
||||
G4CsvNtupleManager.cc
|
||||
G4CsvRFileManager.cc
|
||||
G4CsvRNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
geant4_define_module(NAME G4csv
|
||||
HEADERS
|
||||
G4CsvAnalysisManager.hh
|
||||
G4CsvAnalysisManager.icc
|
||||
G4CsvAnalysisReader.hh
|
||||
G4CsvAnalysisReader.icc
|
||||
G4CsvFileManager.hh
|
||||
G4CsvNtupleManager.hh
|
||||
G4CsvRFileManager.hh
|
||||
G4CsvRNtupleManager.hh
|
||||
g4csv_defs.hh
|
||||
g4csv.hh
|
||||
SOURCES
|
||||
G4CsvAnalysisManager.cc
|
||||
G4CsvAnalysisReader.cc
|
||||
G4CsvFileManager.cc
|
||||
G4CsvNtupleManager.cc
|
||||
G4CsvRFileManager.cc
|
||||
G4CsvRNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4analysismng
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,61 +1,33 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4csv
|
||||
# Package: Geant4.src.G4analysis.G4analysismng
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
# Module : G4analysisfac
|
||||
# Package: Geant4.src.G4analysis.G4analysisfac
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
if (GEANT4_USE_HDF5)
|
||||
include_directories(${HDF5_INCLUDE_DIRS})
|
||||
set(G4analysisfac_LINK_LIBRARIES Geant4::HDF5)
|
||||
endif()
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
set(G4analysisfac_LINK_LIBRARIES Freetype::Freetype ${G4analysisfac_LINK_LIBRARIES})
|
||||
endif()
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/hntools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/csv/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/root/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/xml/include)
|
||||
if (GEANT4_USE_HDF5)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/hdf5/include)
|
||||
# Optional additional links
|
||||
if(GEANT4_USE_HDF5)
|
||||
set(G4analysisfac_G4hdf5 G4hdf5)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4analysisfac
|
||||
HEADERS
|
||||
g4analysis.hh
|
||||
g4analysis_defs.hh
|
||||
SOURCES
|
||||
g4analysis.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${G4analysisfac_LINK_LIBRARIES}
|
||||
geant4_define_module(NAME G4analysisfac
|
||||
HEADERS
|
||||
g4analysis.hh
|
||||
g4analysis_defs.hh
|
||||
SOURCES
|
||||
g4analysis.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4csv
|
||||
G4root
|
||||
G4xml
|
||||
${G4analysisfac_G4hdf5}
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#-----------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.g4tools
|
||||
#
|
||||
# CMakeLists.txt for g4tools. We do not use the usual Geant4 sources.cmake
|
||||
# approach because G4analysis requires a custom install solution for its
|
||||
# headers. The 'tools' subdirectory contains many headers that are needed and
|
||||
# CMakeLists.txt for g4tools, retained due to the nested headers.
|
||||
# The 'tools' subdirectory contains many headers that are needed and
|
||||
# these are in a nested structure which needs to be replicated when we
|
||||
# install, i.e:
|
||||
# <INCLUDE>
|
||||
@@ -14,13 +12,6 @@
|
||||
# +- histo
|
||||
# | +- h1d
|
||||
# ...
|
||||
#
|
||||
# Nevertheless, we're able to build the library via the standard
|
||||
# GEANT4_LIBRARY_TARGET macro.
|
||||
#
|
||||
# Created on: 28/07/2011
|
||||
#
|
||||
#
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
@@ -45,12 +36,3 @@ install(DIRECTORY include/
|
||||
install(FILES tools.license
|
||||
DESTINATION ${CMAKE_INSTALL_DATADIR}
|
||||
)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Finally we need to build C source code file(s)
|
||||
#
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace tools {
|
||||
|
||||
class args {
|
||||
#ifdef TOOLS_MEM
|
||||
public:
|
||||
TOOLS_SCLASS(tools::args)
|
||||
#endif
|
||||
public:
|
||||
|
||||
@@ -25,9 +25,14 @@ public:
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
bool set_is_log(bool a_v) {if(m_is_log==a_v) return false;m_is_log = a_v;return true;}
|
||||
bool set_min_value(float a_v) {if(m_min_value==a_v) return false;m_min_value = a_v;return true;}
|
||||
bool set_max_value(float a_v) {if(m_max_value==a_v) return false;m_max_value = a_v;return true;}
|
||||
#ifdef tools_data_axis //g4tools backcomp :
|
||||
bool is_log(bool a_v) {if(m_is_log==a_v) return false;m_is_log = a_v;return true;}
|
||||
bool min_value(float a_v) {if(m_min_value==a_v) return false;m_min_value = a_v;return true;}
|
||||
bool max_value(float a_v) {if(m_max_value==a_v) return false;m_max_value = a_v;return true;}
|
||||
#endif
|
||||
float min_value() const {return m_min_value;}
|
||||
float max_value() const {return m_max_value;}
|
||||
bool is_log() const {return m_is_log;}
|
||||
|
||||
@@ -42,6 +42,7 @@ TOOLS_GLOBAL_STRING(format_lua)
|
||||
TOOLS_GLOBAL_STRING(format_py)
|
||||
TOOLS_GLOBAL_STRING(format_kumac)
|
||||
TOOLS_GLOBAL_STRING(format_insh)
|
||||
TOOLS_GLOBAL_STRING(format_shp)
|
||||
|
||||
#define TOOLS_GLOBAL_EXT(a_name)\
|
||||
inline const std::string& s_ext_##a_name() {\
|
||||
@@ -81,6 +82,7 @@ TOOLS_GLOBAL_EXT(lua)
|
||||
TOOLS_GLOBAL_EXT(py)
|
||||
TOOLS_GLOBAL_EXT(kumac)
|
||||
TOOLS_GLOBAL_EXT(insh)
|
||||
TOOLS_GLOBAL_EXT(shp)
|
||||
|
||||
#undef TOOLS_GLOBAL_EXT
|
||||
|
||||
@@ -116,6 +118,7 @@ inline void formats(std::vector<std::string>& a_v) {
|
||||
a_v.push_back(s_format_py());
|
||||
a_v.push_back(s_format_kumac());
|
||||
a_v.push_back(s_format_insh());
|
||||
a_v.push_back(s_format_shp());
|
||||
}
|
||||
|
||||
inline std::string ext_fmt(const std::string& a_ext) {
|
||||
@@ -151,6 +154,7 @@ inline std::string ext_fmt(const std::string& a_ext) {
|
||||
if(a_ext==s_ext_py()) return s_format_py();
|
||||
if(a_ext==s_ext_kumac()) return s_format_kumac();
|
||||
if(a_ext==s_ext_insh()) return s_format_insh();
|
||||
if(a_ext==s_ext_shp()) return s_format_shp();
|
||||
return s_format_guessed();
|
||||
}
|
||||
|
||||
@@ -185,6 +189,7 @@ inline bool need_placement(const std::string& a_format) {
|
||||
//if(a_format==s_format_py()) return true;
|
||||
//if(a_format==s_format_kumac()) return true;
|
||||
//if(a_format==s_format_insh()) return true;
|
||||
//if(a_format==s_format_shp()) return true; //load in dynamic_sg.
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -319,4 +319,26 @@ inline bool is_heprep(const std::string& a_file,bool& a_is){
|
||||
|
||||
}}
|
||||
|
||||
#include <climits>
|
||||
|
||||
namespace tools {
|
||||
namespace file {
|
||||
|
||||
inline bool is_shp(const std::string& a_file,bool& a_is){
|
||||
long sz;
|
||||
if(!size(a_file,sz)) {a_is = false;return false;}
|
||||
// below logic from shapelib-1.5.0/shpopen.c.
|
||||
unsigned char head[100];
|
||||
{unsigned int num = 100;
|
||||
if(!signature(a_file,head,num)) {a_is = false;return false;}
|
||||
if(num!=100) {a_is = false;return true;}}
|
||||
unsigned int _sz = (static_cast<unsigned int>(head[24])<<24)|(head[25]<<16)|(head[26]<<8)|head[27];
|
||||
if(_sz<(UINT_MAX/2)) _sz *= 2;
|
||||
else _sz = (UINT_MAX/2)*2;
|
||||
a_is = sz==long(_sz)?true:false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2413,12 +2413,12 @@ static void tools_gl2psParseFeedbackBuffer(tools_GLint used)
|
||||
case TOOLS_GL2PS_LINE_CAP_TOKEN :
|
||||
current += 2;
|
||||
used -= 2;
|
||||
lcap = current[1];
|
||||
lcap = (tools_GLint)current[1]; //G.Barrand : _MSC_VER : cast.
|
||||
break;
|
||||
case TOOLS_GL2PS_LINE_JOIN_TOKEN :
|
||||
current += 2;
|
||||
used -= 2;
|
||||
ljoin = current[1];
|
||||
ljoin = (tools_GLint)current[1]; //G.Barrand : _MSC_VER : cast.
|
||||
break;
|
||||
case TOOLS_GL2PS_LINE_WIDTH_TOKEN :
|
||||
current += 2;
|
||||
@@ -4359,7 +4359,8 @@ static int tools_tools_tools_gl2psPrintPDFShaderStreamDataCoord(tools_GL2PSverte
|
||||
int offs = 0;
|
||||
unsigned long imap;
|
||||
tools_GLfloat diff;
|
||||
double dmax = ~1UL;
|
||||
//double dmax = ~1UL;
|
||||
double dmax = (double)~1UL; //G.Barrand : clang10 : cast.
|
||||
char edgeflag = 0;
|
||||
|
||||
/* FIXME: temp bux fix for 64 bit archs: */
|
||||
@@ -4402,7 +4403,8 @@ static int tools_tools_tools_gl2psPrintPDFShaderStreamDataRGB(tools_GL2PSvertex
|
||||
{
|
||||
int offs = 0;
|
||||
unsigned long imap;
|
||||
double dmax = ~1UL;
|
||||
//double dmax = ~1UL;
|
||||
double dmax = (double)~1UL; //G.Barrand : clang10 : cast.
|
||||
|
||||
/* FIXME: temp bux fix for 64 bit archs: */
|
||||
if(sizeof(unsigned long) == 8) dmax = dmax - 2048.;
|
||||
@@ -4427,7 +4429,8 @@ static int tools_tools_tools_gl2psPrintPDFShaderStreamDataAlpha(tools_GL2PSverte
|
||||
{
|
||||
int offs = 0;
|
||||
unsigned long imap;
|
||||
double dmax = ~1UL;
|
||||
//double dmax = ~1UL;
|
||||
double dmax = (double)~1UL; //G.Barrand : clang10 : cast.
|
||||
|
||||
/* FIXME: temp bux fix for 64 bit archs: */
|
||||
if(sizeof(unsigned long) == 8) dmax = dmax - 2048.;
|
||||
@@ -6412,7 +6415,7 @@ TOOLS_GL2PSDLL_API tools_GLint tools_gl2psLineJoin(tools_GLint value)
|
||||
if(!tools_gl2ps_context) return TOOLS_GL2PS_UNINITIALIZED;
|
||||
|
||||
tools_glPassThrough(TOOLS_GL2PS_LINE_JOIN_TOKEN);
|
||||
tools_glPassThrough(value);
|
||||
tools_glPassThrough((tools_GLfloat)value); //G.Barrand : _MSC_VER : cast.
|
||||
|
||||
return TOOLS_GL2PS_SUCCESS;
|
||||
}
|
||||
@@ -6422,7 +6425,7 @@ TOOLS_GL2PSDLL_API tools_GLint tools_gl2psLineWidth(tools_GLfloat value)
|
||||
if(!tools_gl2ps_context) return TOOLS_GL2PS_UNINITIALIZED;
|
||||
|
||||
tools_glPassThrough(TOOLS_GL2PS_LINE_WIDTH_TOKEN);
|
||||
tools_glPassThrough(value);
|
||||
tools_glPassThrough((tools_GLfloat)value); //G.Barrand : _MSC_VER : cast.
|
||||
|
||||
return TOOLS_GL2PS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -606,10 +606,10 @@ inline bool hatcher::compute_single_polyline (vec3f* tabPoints,unsigned int aNum
|
||||
fNormal[2]*AB[0]-fNormal[0]*AB[2],
|
||||
fNormal[0]*AB[1]-fNormal[1]*AB[0]);
|
||||
|
||||
float normAB =(float)std::sqrt(std::pow(AB[0],2)+
|
||||
float normAB =(float)sqrt(std::pow(AB[0],2)+
|
||||
std::pow(AB[1],2)+
|
||||
std::pow(AB[2],2));
|
||||
float normABPerpVector =(float)std::sqrt(std::pow(ABPerpVector[0],2)+
|
||||
float normABPerpVector =(float)sqrt(std::pow(ABPerpVector[0],2)+
|
||||
std::pow(ABPerpVector[1],2)+
|
||||
std::pow(ABPerpVector[2],2));
|
||||
|
||||
@@ -643,7 +643,7 @@ inline bool hatcher::compute_single_polyline (vec3f* tabPoints,unsigned int aNum
|
||||
|
||||
// normalize vector to match the shift size
|
||||
float param = 1.0f;
|
||||
param = (float)std::sqrt((std::pow(fShift,2))/(
|
||||
param = (float)sqrt((std::pow(fShift,2))/(
|
||||
std::pow(dirShiftVector[0],2)+
|
||||
std::pow(dirShiftVector[1],2)+
|
||||
std::pow(dirShiftVector[2],2)));
|
||||
|
||||
@@ -172,6 +172,42 @@ public:
|
||||
return value;
|
||||
}
|
||||
|
||||
bool min_bin_height_with_entries(TH& a_value) const {
|
||||
TH value = 0;
|
||||
bool first = true;
|
||||
for(TO ibin=0;ibin<parent::m_bin_number;ibin++) {
|
||||
if(!histo::is_out(parent::m_axes,ibin) && (parent::m_bin_entries[ibin]>0) ) {
|
||||
TH vbin = get_bin_height(ibin);
|
||||
if(first) {
|
||||
first = false;
|
||||
value = vbin;
|
||||
} else {
|
||||
if(vbin<=value) value = vbin;
|
||||
}
|
||||
}
|
||||
}
|
||||
a_value = value;
|
||||
return first?false:true; //return true if at least one bin with entries processed.
|
||||
}
|
||||
|
||||
bool max_bin_height_with_entries(TH& a_value) const {
|
||||
TH value = 0;
|
||||
bool first = true;
|
||||
for(TO ibin=0;ibin<parent::m_bin_number;ibin++) {
|
||||
if(!histo::is_out(parent::m_axes,ibin) && (parent::m_bin_entries[ibin]>0) ) {
|
||||
TH vbin = get_bin_height(ibin);
|
||||
if(first) {
|
||||
first = false;
|
||||
value = vbin;
|
||||
} else {
|
||||
if(vbin>=value) value = vbin;
|
||||
}
|
||||
}
|
||||
}
|
||||
a_value = value;
|
||||
return first?false:true; //return true if at least one bin with entries processed.
|
||||
}
|
||||
|
||||
bool has_entries_per_bin() const { //to detect histos coming from TH streaming out of a root file.
|
||||
// it assumes that update_fast_getters() had been applied.
|
||||
if(parent::m_in_range_entries) return true;
|
||||
|
||||
@@ -314,6 +314,16 @@ public:\
|
||||
}\
|
||||
return true;\
|
||||
}\
|
||||
\
|
||||
bool is_diagonal() const {\
|
||||
unsigned int _D = dimension();\
|
||||
for(unsigned int r=0;r<_D;r++) {\
|
||||
for(unsigned int c=0;c<_D;c++) {\
|
||||
if(c!=r) {if(value(r,c)!=zero()) return false;}\
|
||||
}\
|
||||
}\
|
||||
return true;\
|
||||
}\
|
||||
\
|
||||
template <class PREC>\
|
||||
bool is_diagonal_prec(const PREC& a_prec,PREC(*a_fabs)(const T&)) const {\
|
||||
@@ -325,6 +335,33 @@ public:\
|
||||
}\
|
||||
return true;\
|
||||
}\
|
||||
\
|
||||
bool is_identity() const {\
|
||||
unsigned int _D = dimension();\
|
||||
{for(unsigned int r=0;r<_D;r++) {\
|
||||
if(value(r,r)!=one()) return false;\
|
||||
}}\
|
||||
{for(unsigned int r=0;r<_D;r++) {\
|
||||
for(unsigned int c=0;c<_D;c++) {\
|
||||
if(c!=r) {if(value(r,c)!=zero()) return false;}\
|
||||
}\
|
||||
}}\
|
||||
return true;\
|
||||
}\
|
||||
\
|
||||
template <class PREC>\
|
||||
bool is_identity_prec(const PREC& a_prec,PREC(*a_fabs)(const T&)) const {\
|
||||
unsigned int _D = dimension();\
|
||||
{for(unsigned int r=0;r<_D;r++) {\
|
||||
if(!numbers_are_equal(value(r,r),one(),a_prec,a_fabs)) return false;\
|
||||
}}\
|
||||
{for(unsigned int r=0;r<_D;r++) {\
|
||||
for(unsigned int c=0;c<_D;c++) {\
|
||||
if(c!=r) {if(!is_zero(value(r,c),a_prec,a_fabs)) return false;}\
|
||||
}\
|
||||
}}\
|
||||
return true;\
|
||||
}\
|
||||
\
|
||||
const T* data() const {return m_vec;}\
|
||||
unsigned int size() const {return dim2();}\
|
||||
|
||||
@@ -260,6 +260,40 @@ public:
|
||||
a_m.v33(w*w + x*x + y*y + z*z);
|
||||
}
|
||||
|
||||
template <class MAT3>
|
||||
T value_3(MAT3& a_m) const {
|
||||
//Return this rotation in the form of a 3D matrix.
|
||||
//NOTE : in coin3d/SbRotation, it looks as if "w <-> -w", but coin3d/SbMatrix logic is transposed relative to us.
|
||||
|
||||
const T x = m_quat.v0();
|
||||
const T y = m_quat.v1();
|
||||
const T z = m_quat.v2();
|
||||
const T w = m_quat.v3();
|
||||
// q = w + x * i + y * j + z * k
|
||||
|
||||
// first row :
|
||||
a_m.v00(w*w + x*x - y*y - z*z);
|
||||
a_m.v01(2*x*y - 2*w*z);
|
||||
a_m.v02(2*x*z + 2*w*y);
|
||||
|
||||
// second row :
|
||||
a_m.v10(2*x*y + 2*w*z);
|
||||
a_m.v11(w*w - x*x + y*y - z*z);
|
||||
a_m.v12(2*y*z - 2*w*x);
|
||||
|
||||
// third row :
|
||||
a_m.v20(2*x*z - 2*w*y);
|
||||
a_m.v21(2*y*z + 2*w*x);
|
||||
a_m.v22(w*w - x*x - y*y + z*z);
|
||||
|
||||
// fourth row :
|
||||
//a_m.v30(0);
|
||||
//a_m.v31(0);
|
||||
//a_m.v32(0);
|
||||
//a_m.v33(w*w + x*x + y*y + z*z);
|
||||
return w*w + x*x + y*y + z*z; //should be 1.
|
||||
}
|
||||
|
||||
void mul_vec(const VEC3& a_in,VEC3& a_out) const {
|
||||
const T x = m_quat.v0();
|
||||
const T y = m_quat.v1();
|
||||
|
||||
@@ -42,13 +42,14 @@ template <class K,class V> inline void clear(std::map<K,V*>& a_m){safe_clear<K,V
|
||||
#endif
|
||||
|
||||
template <class K,class V>
|
||||
inline void delete_key(std::map<K,V*>& a_m,const K& a_key){
|
||||
inline bool delete_key(std::map<K,V*>& a_m,const K& a_key){
|
||||
typedef typename std::map<K,V*>::iterator it_t;
|
||||
it_t it = a_m.find(a_key);
|
||||
if(it==a_m.end()) return;
|
||||
if(it==a_m.end()) return false;
|
||||
V* obj = (*it).second;
|
||||
a_m.erase(it);
|
||||
delete obj;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class K,class V>
|
||||
|
||||
@@ -79,6 +79,11 @@ inline bool dpow(const double& a_x,const double& a_y,double& a_v) {
|
||||
return true;
|
||||
}
|
||||
|
||||
inline double dgaussian(const double& a_x,const double& a_mean,const double& a_sigma) {
|
||||
double _tmp = (a_x-a_mean)/a_sigma;
|
||||
return ::exp(-_tmp*_tmp/2.0)/(a_sigma*::sqrt(2*pi()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,12 +45,16 @@ inline bool is_Android() {return false;}
|
||||
|
||||
|
||||
#if defined(ANDROID) || TARGET_OS_IPHONE
|
||||
inline bool small_screen() {return true;}
|
||||
inline bool no_cursor() {return true;}
|
||||
inline bool stop_app_button() {return true;}
|
||||
inline bool small_screen() {return true;}
|
||||
//inline bool no_cursor() {return true;}
|
||||
inline bool stop_app_button() {return true;} //the device has a button to stop the app.
|
||||
#elif defined(EMSCRIPTEN)
|
||||
inline bool small_screen() {return false;}
|
||||
//inline bool no_cursor() {return false;}
|
||||
inline bool stop_app_button() {return true;} //the device has a button to stop the app.
|
||||
#else
|
||||
inline bool small_screen() {return false;}
|
||||
inline bool no_cursor() {return false;}
|
||||
//inline bool no_cursor() {return false;}
|
||||
inline bool stop_app_button() {return false;}
|
||||
#endif
|
||||
#if TARGET_OS_IPHONE
|
||||
@@ -100,6 +104,8 @@ inline const char* os() {
|
||||
static const char s_s[] = "iOS";
|
||||
#elif defined(ANDROID)
|
||||
static const char s_s[] = "Android";
|
||||
#elif defined(EMSCRIPTEN)
|
||||
static const char s_s[] = "emscripten";
|
||||
#elif defined(_WIN32)
|
||||
static const char s_s[] = "Windows_NT";
|
||||
#elif __APPLE__
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
return m_mean + displ;
|
||||
}
|
||||
FLAT& flat() {return m_flat;}
|
||||
void set_seed(unsigned int a_seed) {m_flat.set_seed(a_seed);}
|
||||
protected:
|
||||
FLAT& m_flat;
|
||||
REAL m_mean;
|
||||
@@ -85,6 +86,7 @@ public:
|
||||
return -a_log(v)/m_rate;
|
||||
}
|
||||
FLAT& flat() {return m_flat;}
|
||||
void set_seed(unsigned int a_seed) {m_flat.set_seed(a_seed);}
|
||||
protected:
|
||||
FLAT& m_flat;
|
||||
REAL m_rate;
|
||||
@@ -112,6 +114,7 @@ public:
|
||||
a_y = REAL(2) * u * v / s;
|
||||
}
|
||||
FLAT& flat() {return m_flat;}
|
||||
void set_seed(unsigned int a_seed) {m_flat.set_seed(a_seed);}
|
||||
protected:
|
||||
FLAT& m_flat;
|
||||
};
|
||||
@@ -140,6 +143,7 @@ public:
|
||||
a_y *= a;
|
||||
}
|
||||
FLAT& flat() {return m_flat;}
|
||||
void set_seed(unsigned int a_seed) {m_flat.set_seed(a_seed);}
|
||||
protected:
|
||||
FLAT& m_flat;
|
||||
};
|
||||
@@ -188,6 +192,48 @@ protected:
|
||||
REAL m_mean;
|
||||
};
|
||||
|
||||
template <class FLAT,class REAL,class UINT>
|
||||
class rbinomial {
|
||||
public:
|
||||
rbinomial(FLAT& a_flat,UINT a_n = 1,REAL a_p = REAL(0.5)):m_flat(a_flat),m_n(a_n),m_p(a_p){}
|
||||
virtual ~rbinomial(){}
|
||||
public:
|
||||
rbinomial(const rbinomial& a_from):m_flat(a_from.m_flat),m_n(a_from.m_n),m_p(a_from.m_p){}
|
||||
rbinomial& operator=(const rbinomial& a_from) {
|
||||
m_n = a_from.m_n;
|
||||
m_p = a_from.m_p;
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
UINT shoot() const {
|
||||
// from ROOT/TRandom.cxx.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// Generates a random integer N according to the binomial law.
|
||||
/// Coded from Los Alamos report LA-5061-MS.
|
||||
///
|
||||
/// N is binomially distributed between 0 and ntot inclusive
|
||||
/// with mean prob*ntot and prob is between 0 and 1.
|
||||
///
|
||||
/// Note: This function should not be used when ntot is large (say >100).
|
||||
/// The normal approximation is then recommended instead
|
||||
/// (with mean =*ntot+0.5 and standard deviation sqrt(ntot*prob*(1-prob)).
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
if((m_p<REAL(0))||(REAL(1)<m_p)) return 0;
|
||||
UINT n = 0;
|
||||
for(UINT i=0;i<m_n;i++) {
|
||||
if(m_flat.shoot()>m_p) continue;
|
||||
n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
FLAT& flat() {return m_flat;}
|
||||
void set_seed(unsigned int a_seed) {m_flat.set_seed(a_seed);}
|
||||
protected:
|
||||
FLAT& m_flat;
|
||||
UINT m_n;
|
||||
REAL m_p;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,15 +7,59 @@
|
||||
#include "randT"
|
||||
#include "rtausmed"
|
||||
|
||||
#include "S_STRING"
|
||||
#include "scast"
|
||||
|
||||
namespace tools {
|
||||
|
||||
class rgaussd : public rgauss<rtausmed,double> {
|
||||
class irandd {
|
||||
public:
|
||||
virtual ~irandd() {}
|
||||
public:
|
||||
virtual void* cast(const std::string&) const = 0;
|
||||
public:
|
||||
virtual double shootd() const = 0;
|
||||
};
|
||||
|
||||
class rbinomiald : public virtual irandd, public rbinomial<rtausmed,double,unsigned int> {
|
||||
typedef rbinomial<rtausmed,double,unsigned int> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rbinomiald)
|
||||
public:
|
||||
virtual void* cast(const std::string& a_class) const {
|
||||
if(void* p = cmp_cast<rbinomiald>(this,a_class)) return p;
|
||||
return 0;
|
||||
}
|
||||
virtual double shootd() const {return shoot();}
|
||||
public:
|
||||
rbinomiald(unsigned int a_n = 1,double a_p = 0.5):parent(m_flat,a_n,a_p),m_flat(){}
|
||||
virtual ~rbinomiald(){}
|
||||
public:
|
||||
rbinomiald(const rbinomiald& a_from):irandd(a_from),parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rbinomiald& operator=(const rbinomiald& a_from) {
|
||||
parent::operator=(a_from);
|
||||
m_flat = a_from.m_flat;
|
||||
return *this;
|
||||
}
|
||||
protected:
|
||||
rtausmed m_flat;
|
||||
};
|
||||
|
||||
class rgaussd : public virtual irandd, public rgauss<rtausmed,double> {
|
||||
typedef rgauss<rtausmed,double> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rgaussd)
|
||||
public:
|
||||
virtual void* cast(const std::string& a_class) const {
|
||||
if(void* p = cmp_cast<rgaussd>(this,a_class)) return p;
|
||||
return 0;
|
||||
}
|
||||
virtual double shootd() const {return shoot();}
|
||||
public:
|
||||
rgaussd(double a_mean = 0,double a_std_dev = 1):parent(m_flat,a_mean,a_std_dev),m_flat(){}
|
||||
virtual ~rgaussd(){}
|
||||
public:
|
||||
rgaussd(const rgaussd& a_from):parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rgaussd(const rgaussd& a_from):irandd(a_from),parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rgaussd& operator=(const rgaussd& a_from) {
|
||||
parent::operator=(a_from);
|
||||
m_flat = a_from.m_flat;
|
||||
@@ -27,13 +71,21 @@ protected:
|
||||
rtausmed m_flat;
|
||||
};
|
||||
|
||||
class rexpd : public rexp<rtausmed,double> {
|
||||
class rexpd : public virtual irandd, public rexp<rtausmed,double> {
|
||||
typedef rexp<rtausmed,double> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rexpd)
|
||||
public:
|
||||
virtual void* cast(const std::string& a_class) const {
|
||||
if(void* p = cmp_cast<rexpd>(this,a_class)) return p;
|
||||
return 0;
|
||||
}
|
||||
virtual double shootd() const {return shoot();}
|
||||
public:
|
||||
rexpd(double a_rate = 1):parent(m_flat,a_rate),m_flat(){}
|
||||
virtual ~rexpd(){}
|
||||
public:
|
||||
rexpd(const rexpd& a_from):parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rexpd(const rexpd& a_from):irandd(a_from),parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rexpd& operator=(const rexpd& a_from) {
|
||||
parent::operator=(a_from);
|
||||
m_flat = a_from.m_flat;
|
||||
@@ -47,6 +99,8 @@ protected:
|
||||
|
||||
class rdir2d : public rdir2<rtausmed,double> {
|
||||
typedef rdir2<rtausmed,double> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rdir2d)
|
||||
public:
|
||||
rdir2d():parent(m_flat),m_flat(){}
|
||||
virtual ~rdir2d(){}
|
||||
@@ -63,6 +117,8 @@ protected:
|
||||
|
||||
class rdir3d : public rdir3<rtausmed,double> {
|
||||
typedef rdir3<rtausmed,double> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rdir3d)
|
||||
public:
|
||||
rdir3d():parent(m_flat),m_flat(){}
|
||||
virtual ~rdir3d(){}
|
||||
@@ -87,13 +143,21 @@ protected:
|
||||
|
||||
namespace tools {
|
||||
|
||||
class rbwd : public rbw<rtausmed,double> {
|
||||
class rbwd : public virtual irandd, public rbw<rtausmed,double> {
|
||||
typedef rbw<rtausmed,double> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rbwd)
|
||||
public:
|
||||
virtual void* cast(const std::string& a_class) const {
|
||||
if(void* p = cmp_cast<rbwd>(this,a_class)) return p;
|
||||
return 0;
|
||||
}
|
||||
virtual double shootd() const {return shoot();}
|
||||
public:
|
||||
rbwd(double a_mean = 0,double a_gamma = 1):parent(m_flat,a_mean,a_gamma),m_flat(){}
|
||||
virtual ~rbwd(){}
|
||||
public:
|
||||
rbwd(const rbwd& a_from):parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rbwd(const rbwd& a_from):irandd(a_from),parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rbwd& operator=(const rbwd& a_from) {
|
||||
parent::operator=(a_from);
|
||||
m_flat = a_from.m_flat;
|
||||
@@ -111,14 +175,21 @@ protected:
|
||||
|
||||
namespace tools {
|
||||
|
||||
// NOTE : not used yet.
|
||||
class rpoissd : public rpoiss<rtausmed,double,uint64> {
|
||||
class rpoissd : public virtual irandd, public rpoiss<rtausmed,double,uint64> {
|
||||
typedef rpoiss<rtausmed,double,uint64> parent;
|
||||
public:
|
||||
TOOLS_SCLASS(tools::rpoissd)
|
||||
public:
|
||||
virtual void* cast(const std::string& a_class) const {
|
||||
if(void* p = cmp_cast<rpoissd>(this,a_class)) return p;
|
||||
return 0;
|
||||
}
|
||||
virtual double shootd() const {return double(shoot());}
|
||||
public:
|
||||
rpoissd(double a_mean = 1):parent(m_flat,a_mean),m_flat(){}
|
||||
virtual ~rpoissd(){}
|
||||
public:
|
||||
rpoissd(const rpoissd& a_from):parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rpoissd(const rpoissd& a_from):irandd(a_from),parent(m_flat),m_flat(a_from.m_flat){}
|
||||
rpoissd& operator=(const rpoissd& a_from) {
|
||||
parent::operator=(a_from);
|
||||
m_flat = a_from.m_flat;
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
#ifndef tools_sg_GL_action
|
||||
#define tools_sg_GL_action
|
||||
|
||||
#include <tools/sg/render_action>
|
||||
|
||||
#include "GL_manager"
|
||||
|
||||
#include <tools/sg/render_action>
|
||||
|
||||
namespace tools {
|
||||
namespace sg {
|
||||
|
||||
@@ -526,6 +526,7 @@ public:
|
||||
}
|
||||
|
||||
::glLineWidth(_state.m_line_width);
|
||||
|
||||
::glPointSize(_state.m_point_size);
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
@@ -130,6 +130,7 @@ public:
|
||||
it += 4;
|
||||
}}
|
||||
#endif //__APPLE__
|
||||
clean_gstos();
|
||||
reset_touched();
|
||||
}
|
||||
if(xyzs.empty()) return;
|
||||
|
||||
@@ -74,6 +74,9 @@ public:
|
||||
virtual void render(render_action& a_action) {
|
||||
_mult_matrix(a_action);
|
||||
set_state(a_action);
|
||||
//{mat4f& _mtx = a_action.projection_matrix();
|
||||
// a_action.out() << "debug : tools::sg::base_camera::render : proj :" << std::endl;
|
||||
// a_action.out() << _mtx << std::endl;}
|
||||
a_action.load_proj_matrix(a_action.projection_matrix());
|
||||
a_action.load_model_matrix(a_action.model_matrix());
|
||||
}
|
||||
|
||||
@@ -34,8 +34,8 @@ public:
|
||||
virtual bool write(io::iwbuf&) = 0;
|
||||
virtual bool read(io::irbuf&) = 0;
|
||||
virtual bool dump(std::ostream&) = 0;
|
||||
//virtual bool s_value(std::string& a_s) const = 0;
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s_value(std::string&) const = 0;
|
||||
virtual bool s2value(const std::string&) = 0;
|
||||
protected:
|
||||
field():m_touched(true){
|
||||
#ifdef TOOLS_MEM
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
#define tools_sg_GL_manager
|
||||
|
||||
#include "gl"
|
||||
#include "../glbuf"
|
||||
|
||||
#include <tools/sg/render_manager>
|
||||
#include <tools/mapmanip>
|
||||
|
||||
#include <cmath> //::sqrt
|
||||
|
||||
#include "../glbuf"
|
||||
|
||||
#ifdef TOOLS_MEM
|
||||
#include <tools/mem>
|
||||
#endif
|
||||
|
||||
@@ -138,9 +138,17 @@ public: //plottable
|
||||
}
|
||||
}
|
||||
public: //bins1D
|
||||
virtual void bins_Sw_range(float& a_mn,float& a_mx) const {
|
||||
a_mn = (float)m_data.min_bin_height();
|
||||
a_mx = (float)m_data.max_bin_height();
|
||||
virtual void bins_Sw_range(float& a_mn,float& a_mx,bool a_with_entries) const {
|
||||
if(a_with_entries && m_data.has_entries_per_bin()) {
|
||||
double mn,mx;
|
||||
m_data.min_bin_height_with_entries(mn);
|
||||
m_data.max_bin_height_with_entries(mx);
|
||||
a_mn = float(mn);
|
||||
a_mx = float(mx);
|
||||
} else {
|
||||
a_mn = (float)m_data.min_bin_height();
|
||||
a_mx = (float)m_data.max_bin_height();
|
||||
}
|
||||
}
|
||||
virtual unsigned int bins() const {return m_data.axis().bins();}
|
||||
virtual float axis_min() const {return (float)m_data.axis().lower_edge();}
|
||||
@@ -148,6 +156,9 @@ public: //bins1D
|
||||
virtual float bin_lower_edge(int aI) const {return (float)m_data.axis().bin_lower_edge(aI);}
|
||||
virtual float bin_upper_edge(int aI) const {return (float)m_data.axis().bin_upper_edge(aI);}
|
||||
|
||||
virtual bool has_entries_per_bin() const {return m_data.has_entries_per_bin();}
|
||||
virtual unsigned int bin_entries(int aI) const {return m_data.bin_entries(aI);}
|
||||
|
||||
virtual float bin_Sw(int aI) const {return (float)m_data.bin_height(aI);}
|
||||
|
||||
virtual float bin_error(int aI) const {return (float)m_data.bin_error(aI);}
|
||||
@@ -241,9 +252,17 @@ public: //plottable
|
||||
}
|
||||
}
|
||||
public: //bins2D
|
||||
virtual void bins_Sw_range(float& a_mn,float& a_mx) const {
|
||||
a_mn = (float)m_data.min_bin_height();
|
||||
a_mx = (float)m_data.max_bin_height();
|
||||
virtual void bins_Sw_range(float& a_mn,float& a_mx,bool a_with_entries) const {
|
||||
if(a_with_entries && m_data.has_entries_per_bin()) {
|
||||
double mn,mx;
|
||||
m_data.min_bin_height_with_entries(mn);
|
||||
m_data.max_bin_height_with_entries(mx);
|
||||
a_mn = float(mn);
|
||||
a_mx = float(mx);
|
||||
} else {
|
||||
a_mn = (float)m_data.min_bin_height();
|
||||
a_mx = (float)m_data.max_bin_height();
|
||||
}
|
||||
}
|
||||
virtual unsigned int x_bins() const {return m_data.axis_x().bins();}
|
||||
virtual unsigned int y_bins() const {return m_data.axis_y().bins();}
|
||||
@@ -347,9 +366,17 @@ public:
|
||||
public:
|
||||
virtual unsigned int bins() const {return m_data.axis().bins();}
|
||||
|
||||
virtual void bins_Sw_range(float& a_mn,float& a_mx) const {
|
||||
a_mn = (float)m_data.min_bin_height();
|
||||
a_mx = (float)m_data.max_bin_height();
|
||||
virtual void bins_Sw_range(float& a_mn,float& a_mx,bool a_with_entries) const {
|
||||
if(a_with_entries && m_data.has_entries_per_bin()) {
|
||||
double mn,mx;
|
||||
m_data.min_bin_height_with_entries(mn);
|
||||
m_data.max_bin_height_with_entries(mx);
|
||||
a_mn = float(mn);
|
||||
a_mx = float(mx);
|
||||
} else {
|
||||
a_mn = (float)m_data.min_bin_height();
|
||||
a_mx = (float)m_data.max_bin_height();
|
||||
}
|
||||
}
|
||||
|
||||
virtual float axis_min() const {return (float)m_data.axis().lower_edge();}
|
||||
@@ -357,6 +384,7 @@ public:
|
||||
virtual float bin_lower_edge(int aI) const {return (float)m_data.axis().bin_lower_edge(aI);}
|
||||
virtual float bin_upper_edge(int aI) const {return (float)m_data.axis().bin_upper_edge(aI);}
|
||||
|
||||
virtual bool has_entries_per_bin() const {return m_data.has_entries_per_bin();}
|
||||
virtual unsigned int bin_entries(int aI) const {return m_data.bin_entries(aI);}
|
||||
|
||||
virtual float bin_Sw(int aI) const {return (float)m_data.bin_height(aI);}
|
||||
|
||||
@@ -9,14 +9,33 @@
|
||||
// of holder copy(), the new holder receives a null object.
|
||||
|
||||
#include "node"
|
||||
|
||||
#include "sf_string"
|
||||
|
||||
namespace tools {
|
||||
namespace sg {
|
||||
|
||||
class base_holder : public node {
|
||||
TOOLS_NODE(base_holder,tools::sg::base_holder,node)
|
||||
public:
|
||||
base_holder(const std::string& a_name):parent(),m_name(a_name) {}
|
||||
virtual ~base_holder(){}
|
||||
public:
|
||||
base_holder(const base_holder& a_from):parent(a_from),m_name(a_from.m_name) {}
|
||||
base_holder& operator=(const base_holder& a_from){
|
||||
parent::operator=(a_from);
|
||||
m_name = a_from.m_name;
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
const std::string& name() const {return m_name;}
|
||||
protected:
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class holder : public node {
|
||||
typedef node parent;
|
||||
class holder : public base_holder {
|
||||
typedef base_holder parent;
|
||||
public:
|
||||
//WARNING : we do not put the T class name in the name of this class.
|
||||
// We put it in the class_name field.
|
||||
@@ -46,10 +65,9 @@ private:
|
||||
}
|
||||
public:
|
||||
holder(T* a_obj = 0,const std::string& a_name = "")
|
||||
:parent()
|
||||
:parent(a_name)
|
||||
,class_name(T::s_class())
|
||||
,m_obj(a_obj) //it takes a_obj ownership.
|
||||
,m_name(a_name)
|
||||
{
|
||||
add_fields();
|
||||
}
|
||||
@@ -61,27 +79,24 @@ public:
|
||||
:parent(a_from)
|
||||
,class_name(std::string())
|
||||
,m_obj(0)
|
||||
,m_name()
|
||||
{
|
||||
parent::m_name.clear();
|
||||
add_fields();
|
||||
}
|
||||
holder& operator=(const holder& a_from){
|
||||
parent::operator=(a_from);
|
||||
class_name.value().clear();
|
||||
m_obj = 0;
|
||||
m_name.clear();
|
||||
parent::m_name.clear();
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
const T* object() const {return m_obj;}
|
||||
T* object() {return m_obj;}
|
||||
const std::string& name() const {return m_name;}
|
||||
protected:
|
||||
T* m_obj;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
inline holder<T>* cast_holder(node& a_node) {
|
||||
typedef holder<T> h_t;
|
||||
@@ -90,6 +105,29 @@ inline holder<T>* cast_holder(node& a_node) {
|
||||
return (_h->class_name.value()==T::s_class()?_h:0);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline const holder<T>* cast_holder(const node& a_node) {
|
||||
typedef holder<T> h_t;
|
||||
h_t* _h = (h_t*)a_node.cast(h_t::s_class());
|
||||
if(!_h) return 0;
|
||||
return (_h->class_name.value()==T::s_class()?_h:0);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline const T* cast_holder_object(const node& a_node) {
|
||||
typedef holder<T> h_t;
|
||||
h_t* _h = (h_t*)a_node.cast(h_t::s_class());
|
||||
if(!_h) return 0;
|
||||
return (_h->class_name.value()==T::s_class()?_h->object():0);
|
||||
}
|
||||
template <class T>
|
||||
inline T* cast_holder_object(node& a_node) {
|
||||
typedef holder<T> h_t;
|
||||
h_t* _h = (h_t*)a_node.cast(h_t::s_class());
|
||||
if(!_h) return 0;
|
||||
return (_h->class_name.value()==T::s_class()?_h->object():0);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void remove_holders(std::vector<node*>& a_vec){
|
||||
typedef holder<T> h_t;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "../stype"
|
||||
#include "render_action"
|
||||
#include "pick_action"
|
||||
#include "bbox_action"
|
||||
|
||||
namespace tools {
|
||||
namespace sg {
|
||||
@@ -40,14 +41,32 @@ public:
|
||||
}
|
||||
|
||||
virtual void pick(pick_action& a_action) {
|
||||
tools_vforcit(line_t,lines.values(),it) {
|
||||
a_action.add_line_strip(*it,true);
|
||||
if(a_action.done()) {
|
||||
a_action.set_node(this);
|
||||
return;
|
||||
if(a_action.stop_at_first()){
|
||||
tools_vforcit(line_t,lines.values(),it) {
|
||||
a_action.add_line_strip(*it);
|
||||
if(a_action.done()) {
|
||||
a_action.set_node(this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tools_vforcit(line_t,lines.values(),it) {
|
||||
a_action.set_done(false);
|
||||
a_action.zs().clear();
|
||||
a_action.ws().clear();
|
||||
a_action.add_line_strip(*it);
|
||||
if(a_action.done()) {
|
||||
a_action.add_pick(*this,a_action.zs(),a_action.ws(),a_action.state());
|
||||
a_action.set_done(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual void bbox(bbox_action& a_action) {
|
||||
tools_vforcit(line_t,lines.values(),it) {
|
||||
a_action.add_points(*it);
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
mf(){}
|
||||
mf(const T& a_v):parent(a_v){}
|
||||
@@ -90,6 +92,8 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
mf_string():parent(){}
|
||||
mf_string(const std::string& a_v):parent(a_v){}
|
||||
@@ -153,6 +157,8 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
mf_enum():parent(){}
|
||||
mf_enum(const T& a_v):parent(a_v){}
|
||||
@@ -247,6 +253,8 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
mf_vec():parent(){}
|
||||
mf_vec(const T& a_v):parent(a_v){}
|
||||
@@ -292,6 +300,8 @@ public:
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
mf_std_vec():parent(){}
|
||||
mf_std_vec(const T& a_v):parent(a_v){}
|
||||
|
||||
@@ -36,8 +36,8 @@ public:
|
||||
// return parent::is_a(a_class);
|
||||
// }
|
||||
virtual void* cast(const std::string& a_class) const {
|
||||
if(void* p = cmp_cast<node>(this,a_class)) {return p;}
|
||||
else return 0;
|
||||
if(void* p = cmp_cast<node>(this,a_class)) return p;
|
||||
return 0;
|
||||
}
|
||||
virtual const std::string& s_cls() const = 0;
|
||||
public:
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
path.push_back(this);
|
||||
a_action.add_path(path);
|
||||
if(a_action.stop_at_first()) a_action.set_done(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
virtual void get_matrix(get_matrix_action& a_action) {
|
||||
@@ -103,7 +103,8 @@ public:
|
||||
tools_vforcit(field*,m_fields,it) (*it)->reset_touched();
|
||||
}
|
||||
public:
|
||||
node(){
|
||||
node()
|
||||
{
|
||||
#ifdef TOOLS_MEM
|
||||
mem::increment(s_class().c_str());
|
||||
#endif
|
||||
@@ -114,12 +115,15 @@ public:
|
||||
#endif
|
||||
}
|
||||
protected:
|
||||
node(const node&){
|
||||
node(const node&)
|
||||
{
|
||||
#ifdef TOOLS_MEM
|
||||
mem::increment(s_class().c_str());
|
||||
#endif
|
||||
}
|
||||
node& operator=(const node&){return *this;}
|
||||
node& operator=(const node&){
|
||||
return *this;
|
||||
}
|
||||
protected:
|
||||
void add_field(field* a_field) {
|
||||
m_fields.push_back(a_field); //it does not take ownerhship.
|
||||
@@ -246,6 +250,30 @@ public:
|
||||
//WARNING : touchy.
|
||||
return *((field*)((char*)this+a_desc.offset()));
|
||||
}
|
||||
void dump_field_descs(std::ostream& a_out) const {
|
||||
a_out << "field descs of node class " << s_cls() << " :" << std::endl;
|
||||
const std::vector<field_desc>& fds = node_desc_fields();
|
||||
tools_vforcit(field_desc,fds,itd) {
|
||||
a_out << "name " << (*itd).name()
|
||||
<< ", class " << (*itd).cls()
|
||||
<< ", offset " << (*itd).offset()
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
field* find_field_by_name(const std::string& a_name) const {
|
||||
// a_name is of the form <class>.<field>. For example for color on sg::text, there are :
|
||||
// tools::sg::back_area.color
|
||||
// tools::sg::text.color
|
||||
const std::vector<field_desc>& fds = node_desc_fields();
|
||||
tools_vforcrit(field_desc,fds,it) {
|
||||
if((*it).name()==a_name) {
|
||||
tools_vforcit(field*,m_fields,itf) {
|
||||
if(field_offset(*itf)==(*it).offset()) return (*itf);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
protected:
|
||||
field_desc::offset_t field_offset(const field* a_field) const {
|
||||
//WARNING : touchy.
|
||||
@@ -253,15 +281,6 @@ protected:
|
||||
}
|
||||
|
||||
field* find_field(const field_desc& a_rdesc) const {
|
||||
/*
|
||||
//WARNING : must not use field name since, through inheritance, a node can have two field with same name.
|
||||
// (For exa sg::text has one field "color" and another one coming from back_area).
|
||||
//::printf("debug : find_field : %s ...\n",a_rdesc.name().c_str());
|
||||
tools_vforcit(field*,m_fields,it) {
|
||||
//::printf("debug : find_field : look : %s\n",field_name(*(*it)).c_str());
|
||||
if(field_offset(*it)==a_rdesc.offset()) return (*it);
|
||||
}
|
||||
*/
|
||||
const std::vector<field_desc>& fds = node_desc_fields();
|
||||
tools_vforcit(field_desc,fds,it) {
|
||||
if((*it).name()==a_rdesc.name()) {
|
||||
@@ -274,17 +293,6 @@ protected:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void dump_field_descs(std::ostream& a_out) const {
|
||||
a_out << "field descs of node class " << s_cls() << " :" << std::endl;
|
||||
const std::vector<field_desc>& fds = node_desc_fields();
|
||||
tools_vforcit(field_desc,fds,itd) {
|
||||
a_out << "name " << (*itd).name()
|
||||
<< ", class " << (*itd).cls()
|
||||
<< ", offset " << (*itd).offset()
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void check_fields(std::ostream& a_out) const {
|
||||
const std::vector<field_desc>& fds = node_desc_fields();
|
||||
tools_vforcit(field*,m_fields,it) {
|
||||
|
||||
@@ -26,6 +26,8 @@ public:
|
||||
sf<bool> border_visible;
|
||||
sf<float> border_width;
|
||||
sf<float> border_height;
|
||||
sf<float> border_z;
|
||||
sf<float> border_scale;
|
||||
sf_vec<colorf,float> border_color;
|
||||
|
||||
// for gopaw :
|
||||
@@ -38,8 +40,8 @@ public:
|
||||
public:
|
||||
virtual const desc_fields& node_desc_fields() const {
|
||||
TOOLS_FIELD_DESC_NODE_CLASS(tools::sg::plots)
|
||||
static const desc_fields s_v(parent::node_desc_fields(),16, //WARNING : take care of count.
|
||||
TOOLS_ARG_FIELD_DESC(width),
|
||||
static const desc_fields s_v(parent::node_desc_fields(),18, //WARNING : take care of count.
|
||||
TOOLS_ARG_FIELD_DESC(width), //1
|
||||
TOOLS_ARG_FIELD_DESC(height),
|
||||
TOOLS_ARG_FIELD_DESC(cols),
|
||||
TOOLS_ARG_FIELD_DESC(rows),
|
||||
@@ -48,6 +50,8 @@ public:
|
||||
TOOLS_ARG_FIELD_DESC(border_visible),
|
||||
TOOLS_ARG_FIELD_DESC(border_width),
|
||||
TOOLS_ARG_FIELD_DESC(border_height),
|
||||
TOOLS_ARG_FIELD_DESC(border_z), //10
|
||||
TOOLS_ARG_FIELD_DESC(border_scale),
|
||||
TOOLS_ARG_FIELD_DESC(border_color),
|
||||
TOOLS_ARG_FIELD_DESC(left_margin),
|
||||
TOOLS_ARG_FIELD_DESC(right_margin),
|
||||
@@ -84,6 +88,8 @@ private:
|
||||
add_field(&border_visible);
|
||||
add_field(&border_width);
|
||||
add_field(&border_height);
|
||||
add_field(&border_z);
|
||||
add_field(&border_scale);
|
||||
add_field(&border_color);
|
||||
add_field(&left_margin);
|
||||
add_field(&right_margin);
|
||||
@@ -157,6 +163,8 @@ public:
|
||||
,border_visible(false)
|
||||
,border_width(0)
|
||||
,border_height(0)
|
||||
,border_z(0)
|
||||
,border_scale(1)
|
||||
,border_color(colorf_grey())
|
||||
,left_margin(0)
|
||||
,right_margin(0)
|
||||
@@ -190,6 +198,8 @@ public:
|
||||
,border_visible(a_from.border_visible)
|
||||
,border_width(a_from.border_width)
|
||||
,border_height(a_from.border_height)
|
||||
,border_z(a_from.border_z)
|
||||
,border_scale(a_from.border_scale)
|
||||
,border_color(a_from.border_color)
|
||||
,left_margin(a_from.left_margin)
|
||||
,right_margin(a_from.right_margin)
|
||||
@@ -229,6 +239,8 @@ public:
|
||||
border_visible = a_from.border_visible;
|
||||
border_width = a_from.border_width;
|
||||
border_height = a_from.border_height;
|
||||
border_z = a_from.border_z;
|
||||
border_scale = a_from.border_scale;
|
||||
border_color = a_from.border_color;
|
||||
|
||||
left_margin = a_from.left_margin;
|
||||
@@ -1070,12 +1082,21 @@ protected:
|
||||
if(border_width.value()<=0) return;
|
||||
if(border_height.value()<=0) return;
|
||||
|
||||
// border_scale could be used as an offscreen (inzb_[ps,png,jpeg], gl2s_pdf)
|
||||
// cooking to avoid seeing a one pixel line at some side (in general left)
|
||||
// coming from the border.
|
||||
if(border_scale.value()!=1) {
|
||||
matrix* _m = new matrix;
|
||||
_m->set_scale(border_scale.value(),border_scale.value(),1);
|
||||
m_border_sep.add(_m);
|
||||
}
|
||||
|
||||
float bw = border_width;
|
||||
float bh = border_height;
|
||||
|
||||
// do it with four externals back_area.
|
||||
|
||||
float zz = 0;
|
||||
float zz = border_z.value();
|
||||
|
||||
// top :
|
||||
{separator* sep = new separator;
|
||||
|
||||
@@ -21,7 +21,7 @@ public:
|
||||
public:
|
||||
virtual ~bins1D(){}
|
||||
public:
|
||||
virtual void bins_Sw_range(float&,float&) const = 0;
|
||||
virtual void bins_Sw_range(float&,float&,bool) const = 0;
|
||||
public:
|
||||
// axis :
|
||||
virtual unsigned int bins() const = 0;
|
||||
@@ -31,6 +31,8 @@ public:
|
||||
virtual float bin_lower_edge(int) const = 0;
|
||||
virtual float bin_upper_edge(int) const = 0;
|
||||
// bins :
|
||||
virtual bool has_entries_per_bin() const = 0;
|
||||
virtual unsigned int bin_entries(int) const = 0;
|
||||
virtual float bin_Sw(int) const = 0;
|
||||
virtual float bin_error(int) const = 0;
|
||||
public:
|
||||
@@ -48,7 +50,7 @@ public:
|
||||
public:
|
||||
virtual ~bins2D(){}
|
||||
public:
|
||||
virtual void bins_Sw_range(float&,float&) const = 0;
|
||||
virtual void bins_Sw_range(float&,float&,bool) const = 0;
|
||||
public:
|
||||
// x axis :
|
||||
virtual unsigned int x_bins() const = 0;
|
||||
|
||||
@@ -103,6 +103,8 @@ public:
|
||||
sf<bool> z_axis_is_log;
|
||||
|
||||
sf<float> value_top_margin;
|
||||
sf<float> value_bottom_margin;
|
||||
sf<bool> value_bins_with_entries;
|
||||
|
||||
sf<float> infos_width; //in percent of width.
|
||||
sf<float> infos_x_margin; //in percent of width. From right.
|
||||
@@ -178,7 +180,7 @@ public:
|
||||
public:
|
||||
virtual const desc_fields& node_desc_fields() const {
|
||||
TOOLS_FIELD_DESC_NODE_CLASS(tools::sg::plotter)
|
||||
static const desc_fields s_v(parent::node_desc_fields(),61, //WARNING : take care of count.
|
||||
static const desc_fields s_v(parent::node_desc_fields(),63, //WARNING : take care of count.
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(width),
|
||||
TOOLS_ARG_FIELD_DESC(height),
|
||||
@@ -231,13 +233,15 @@ public:
|
||||
TOOLS_ARG_FIELD_DESC(z_axis_is_log),
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(value_top_margin),
|
||||
TOOLS_ARG_FIELD_DESC(value_bottom_margin),
|
||||
TOOLS_ARG_FIELD_DESC(value_bins_with_entries),
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(infos_width),
|
||||
TOOLS_ARG_FIELD_DESC(infos_x_margin),
|
||||
TOOLS_ARG_FIELD_DESC(infos_y_margin),
|
||||
TOOLS_ARG_FIELD_DESC(infos_y_margin), //40
|
||||
TOOLS_ARG_FIELD_DESC(infos_what),
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(func2D_borders_visible), //40
|
||||
TOOLS_ARG_FIELD_DESC(func2D_borders_visible),
|
||||
TOOLS_ARG_FIELD_DESC(theta),
|
||||
TOOLS_ARG_FIELD_DESC(phi),
|
||||
TOOLS_ARG_FIELD_DESC(tau),
|
||||
@@ -251,11 +255,11 @@ public:
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(legends_origin_unit),
|
||||
TOOLS_ARG_FIELD_DESC(legends_size),
|
||||
TOOLS_ARG_FIELD_DESC(legends_string),
|
||||
TOOLS_ARG_FIELD_DESC(legends_string), //50
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(shape_automated),
|
||||
|
||||
TOOLS_ARG_FIELD_DESC_ENUMS_BEG(shape,2) //50
|
||||
TOOLS_ARG_FIELD_DESC_ENUMS_BEG(shape,2)
|
||||
"xy",xy,
|
||||
"xyz",xyz
|
||||
TOOLS_ARG_FIELD_DESC_ENUMS_END,
|
||||
@@ -271,10 +275,10 @@ public:
|
||||
TOOLS_ARG_FIELD_DESC(primitives_enforced),
|
||||
TOOLS_ARG_FIELD_DESC(inner_frame_enforced),
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(title_box_width),
|
||||
TOOLS_ARG_FIELD_DESC(title_box_width), //60
|
||||
TOOLS_ARG_FIELD_DESC(title_box_height),
|
||||
TOOLS_ARG_FIELD_DESC(title_box_x_margin),
|
||||
TOOLS_ARG_FIELD_DESC(title_box_y_margin)
|
||||
TOOLS_ARG_FIELD_DESC(title_box_y_margin) //63
|
||||
|
||||
);
|
||||
return s_v;
|
||||
@@ -359,6 +363,8 @@ private:
|
||||
add_field(&z_axis_is_log);
|
||||
|
||||
add_field(&value_top_margin);
|
||||
add_field(&value_bottom_margin);
|
||||
add_field(&value_bins_with_entries);
|
||||
|
||||
add_field(&infos_width);
|
||||
add_field(&infos_x_margin);
|
||||
@@ -403,6 +409,8 @@ public: //style
|
||||
xy_depth = a_from.xy_depth;
|
||||
curve_number_of_points = a_from.curve_number_of_points;
|
||||
value_top_margin = a_from.value_top_margin;
|
||||
value_bottom_margin = a_from.value_bottom_margin;
|
||||
value_bins_with_entries = a_from.value_bins_with_entries;
|
||||
infos_what = a_from.infos_what;
|
||||
infos_width = a_from.infos_width;
|
||||
//infos height is automatic.
|
||||
@@ -491,9 +499,10 @@ public: //style
|
||||
xy_depth = 0.01f;
|
||||
curve_number_of_points = 100;
|
||||
////////////////////////////////////////////
|
||||
// CERN-PAW seems to have 0.1F and CERN-ROOT 0.05F.
|
||||
value_top_margin = 0.1f; //percent.
|
||||
|
||||
value_top_margin = 0.1f; //percent. // CERN-PAW seems to have 0.1F and CERN-ROOT 0.05F.
|
||||
value_bottom_margin = 0.0f; //percent.
|
||||
value_bins_with_entries = true; //gopaw uses false.
|
||||
|
||||
infos_what = s_infos_what_def();
|
||||
infos_width = 0.3f;
|
||||
//infos height is automatic.
|
||||
@@ -871,6 +880,14 @@ public: //style
|
||||
float v;
|
||||
if(!to<float>(sv,v)) {style_failed(a_out,key,sv);return false;}
|
||||
value_top_margin = v;
|
||||
} else if(key=="value_bottom_margin") {
|
||||
float v;
|
||||
if(!to<float>(sv,v)) {style_failed(a_out,key,sv);return false;}
|
||||
value_bottom_margin = v;
|
||||
} else if(key=="value_bins_with_entries") {
|
||||
float v;
|
||||
if(!to<float>(sv,v)) {style_failed(a_out,key,sv);return false;}
|
||||
value_bins_with_entries = v;
|
||||
} else if(key=="infos_width") {
|
||||
float v;
|
||||
if(!to<float>(sv,v)) {style_failed(a_out,key,sv);return false;}
|
||||
@@ -1243,8 +1260,9 @@ public:
|
||||
,z_axis_max(1)
|
||||
,z_axis_is_log(false)
|
||||
|
||||
// CERN-PAW seems to have 0.1F and CERN-ROOT 0.05F.
|
||||
,value_top_margin(0.1f) //percent.
|
||||
,value_top_margin(0.1f) //percent. // CERN-PAW seems to have 0.1F and CERN-ROOT 0.05F.
|
||||
,value_bottom_margin(0.0f) //percent.
|
||||
,value_bins_with_entries(true)
|
||||
|
||||
,infos_width(0.3f) //percent of width
|
||||
,infos_x_margin(default_infos_margin()) //percent of width
|
||||
@@ -1346,6 +1364,8 @@ public:
|
||||
,z_axis_max(a_from.z_axis_max)
|
||||
,z_axis_is_log(a_from.z_axis_is_log)
|
||||
,value_top_margin(a_from.value_top_margin)
|
||||
,value_bottom_margin(a_from.value_bottom_margin)
|
||||
,value_bins_with_entries(a_from.value_bins_with_entries)
|
||||
|
||||
,infos_width(a_from.infos_width)
|
||||
,infos_x_margin(a_from.infos_x_margin)
|
||||
@@ -1465,6 +1485,8 @@ public:
|
||||
z_axis_max = a_from.z_axis_max;
|
||||
z_axis_is_log = a_from.z_axis_is_log;
|
||||
value_top_margin = a_from.value_top_margin;
|
||||
value_bottom_margin = a_from.value_bottom_margin;
|
||||
value_bins_with_entries = a_from.value_bins_with_entries;
|
||||
|
||||
infos_width = a_from.infos_width;
|
||||
infos_x_margin = a_from.infos_x_margin;
|
||||
@@ -1947,7 +1969,7 @@ public: //public
|
||||
|
||||
bool axis_2_data_frame(const vec3f& a_pos,vec3f& aDF) const {
|
||||
// a_pos is in axes coordinates.
|
||||
// aDF in data area coodinate. In [0,1][0,1][0,1].
|
||||
// aDF in data area coordinate. In [0,1][0,1][0,1].
|
||||
|
||||
// Assume that axes min,max,logScale are up to date.
|
||||
|
||||
@@ -2029,7 +2051,7 @@ public: //public
|
||||
bool axis_2_vp(const vec3f& a_pos,vec3f& a_vp) const {
|
||||
// a_pos is in axes coordinates.
|
||||
// a_vp is in viewport/screen coordinates (in [0,1]).
|
||||
vec3f d; // In data area coodinate. In [0,1][0,1][0,1].
|
||||
vec3f d; // In data area coordinate. In [0,1][0,1][0,1].
|
||||
if(!axis_2_data_frame(a_pos,d)) return false;
|
||||
return data_frame_2_vp(d,a_vp);
|
||||
}
|
||||
@@ -2037,7 +2059,7 @@ public: //public
|
||||
bool vp_2_axis(const vec3f& a_vp,vec3f& a_pos) const {
|
||||
// a_vp is in viewport/screen coordinates (in [0,1]).
|
||||
// a_pos is in axes coordinates.
|
||||
vec3f d; // In data area coodinate. In [0,1][0,1][0,1].
|
||||
vec3f d; // In data area coordinate. In [0,1][0,1][0,1].
|
||||
if(!vp_2_data_frame(a_vp,d)) return false;
|
||||
return data_frame_2_axis(d,a_pos);
|
||||
}
|
||||
@@ -2911,32 +2933,95 @@ public:
|
||||
update_primitives(a_out);
|
||||
}
|
||||
|
||||
void get_value_axis_min_max(float a_Sw_mn,float a_Sw_mx,bool a_is_log,float& a_min,float& a_max,bool a_min_visible) {
|
||||
if(a_Sw_mn>a_Sw_mx) {
|
||||
a_min = 0;
|
||||
a_max = 0;
|
||||
return;
|
||||
}
|
||||
// a_Sw_mx >= a_Sw_mn.
|
||||
if(a_is_log && (a_Sw_mn<=0) ) { //let data_axis.adjust() do something.
|
||||
a_min = a_Sw_mn;
|
||||
a_max = a_Sw_mx;
|
||||
return;
|
||||
}
|
||||
float mn;
|
||||
if(a_is_log) {
|
||||
if(value_bottom_margin.value()!=0) {
|
||||
float log_Sw_mn = flog10(a_Sw_mn);
|
||||
float log_Sw_mx = flog10(a_Sw_mx);
|
||||
float log_mn = log_Sw_mn - (log_Sw_mx-log_Sw_mn)*value_bottom_margin;
|
||||
mn = fpow(10,log_mn);
|
||||
} else {
|
||||
mn = a_Sw_mn;
|
||||
if(a_min_visible) { // arrang so that the bin with a_Sw_mn be visible.
|
||||
float log_Sw_mn = flog10(a_Sw_mn);
|
||||
mn = fpow(10,log_Sw_mn)*(1.0f-0.4f);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(value_bottom_margin.value()!=0) {
|
||||
mn = a_Sw_mn - (a_Sw_mx-a_Sw_mn)*value_bottom_margin;
|
||||
} else {
|
||||
if(a_min_visible) {
|
||||
// Arrange so that the bin with a_Sw_mn (if not 0) be visible. (If 0, it will be anyway on the x axis) :
|
||||
if(a_Sw_mn>0) {
|
||||
mn = 0; //PAW logic.
|
||||
} else if(a_Sw_mn==0) {
|
||||
mn = 0; //PAW logic. min bin will be anyway on x axis.
|
||||
} else {
|
||||
mn = a_Sw_mn; // min bin will be anyway on x axis.
|
||||
}
|
||||
} else {
|
||||
mn = a_Sw_mn; //min bin will be on x axis.
|
||||
}
|
||||
}
|
||||
}
|
||||
a_min = mn;
|
||||
|
||||
float mx;
|
||||
if(a_is_log) {
|
||||
if(value_top_margin.value()!=0) {
|
||||
float log_Sw_mn = flog10(a_Sw_mn);
|
||||
float log_Sw_mx = flog10(a_Sw_mx);
|
||||
float log_mx = log_Sw_mx + (log_Sw_mx-log_Sw_mn)*value_top_margin;
|
||||
mx = fpow(10,log_mx);
|
||||
} else {
|
||||
mx = a_Sw_mx; //max bin will be on top of frame (then not visible if same color).
|
||||
}
|
||||
} else {
|
||||
mx = a_Sw_mx + (a_Sw_mx-mn)*value_top_margin;
|
||||
//mx = a_Sw_mx + (a_Sw_mx-a_Sw_mn)*value_top_margin; //not compatible with gopaw.
|
||||
}
|
||||
a_max = mx;
|
||||
}
|
||||
|
||||
void update_axes_data(std::ostream& a_out){
|
||||
m_x_axis_data.min_value(0);
|
||||
m_x_axis_data.max_value(0);
|
||||
m_x_axis_data.is_log(x_axis_is_log);
|
||||
m_x_axis_data.set_min_value(0);
|
||||
m_x_axis_data.set_max_value(0);
|
||||
m_x_axis_data.set_is_log(x_axis_is_log);
|
||||
|
||||
m_y_axis_data.min_value(0);
|
||||
m_y_axis_data.max_value(0);
|
||||
m_y_axis_data.is_log(y_axis_is_log);
|
||||
m_y_axis_data.set_min_value(0);
|
||||
m_y_axis_data.set_max_value(0);
|
||||
m_y_axis_data.set_is_log(y_axis_is_log);
|
||||
|
||||
m_z_axis_data.min_value(0);
|
||||
m_z_axis_data.max_value(0);
|
||||
m_z_axis_data.is_log(z_axis_is_log);
|
||||
m_z_axis_data.set_min_value(0);
|
||||
m_z_axis_data.set_max_value(0);
|
||||
m_z_axis_data.set_is_log(z_axis_is_log);
|
||||
|
||||
if(!x_axis_automated) { //def = true
|
||||
m_x_axis_data.min_value(x_axis_min);
|
||||
m_x_axis_data.max_value(x_axis_max);
|
||||
m_x_axis_data.set_min_value(x_axis_min);
|
||||
m_x_axis_data.set_max_value(x_axis_max);
|
||||
}
|
||||
|
||||
if(!y_axis_automated) {
|
||||
m_y_axis_data.min_value(y_axis_min);
|
||||
m_y_axis_data.max_value(y_axis_max);
|
||||
m_y_axis_data.set_min_value(y_axis_min);
|
||||
m_y_axis_data.set_max_value(y_axis_max);
|
||||
}
|
||||
|
||||
if(!z_axis_automated) {
|
||||
m_z_axis_data.min_value(z_axis_min);
|
||||
m_z_axis_data.max_value(z_axis_max);
|
||||
m_z_axis_data.set_min_value(z_axis_min);
|
||||
m_z_axis_data.set_max_value(z_axis_max);
|
||||
}
|
||||
|
||||
bins1D* b1;
|
||||
@@ -2953,39 +3038,46 @@ public:
|
||||
if(b1) {
|
||||
|
||||
if(x_axis_automated) {
|
||||
m_x_axis_data.min_value(b1->axis_min());
|
||||
m_x_axis_data.max_value(b1->axis_max());
|
||||
m_x_axis_data.set_min_value(b1->axis_min());
|
||||
m_x_axis_data.set_max_value(b1->axis_max());
|
||||
}
|
||||
|
||||
if(y_axis_automated) {
|
||||
//::printf("debug : value %g %g %d : is log %d\n",
|
||||
// value_bottom_margin.value(),value_top_margin.value(),value_bins_with_entries.value(),
|
||||
// m_y_axis_data.is_log());
|
||||
float Sw_mn,Sw_mx;
|
||||
b1->bins_Sw_range(Sw_mn,Sw_mx,value_bins_with_entries.value());
|
||||
//::printf("debug : Sw %g %g\n",Sw_mn,Sw_mx);
|
||||
float mn,mx;
|
||||
b1->bins_Sw_range(mn,mx);
|
||||
//m_y_axis_data.min_value(mn);
|
||||
if(mn>=0) mn = 0; //PAW convention.
|
||||
m_y_axis_data.min_value(mn);
|
||||
mx = mx + (mx-mn)*value_top_margin;
|
||||
m_y_axis_data.max_value(mx);
|
||||
get_value_axis_min_max(Sw_mn,Sw_mx,m_y_axis_data.is_log(),mn,mx,true);
|
||||
//::printf("debug : mn mx %g %g\n",mn,mx);
|
||||
m_y_axis_data.set_min_value(mn);
|
||||
m_y_axis_data.set_max_value(mx);
|
||||
|
||||
m_y_axis_data.adjust();
|
||||
//::printf("debug : adjusted : mn mx %g %g\n",mn,mx);
|
||||
}
|
||||
|
||||
} if(b2) {
|
||||
if(x_axis_automated) {
|
||||
m_x_axis_data.min_value(b2->x_axis_min());
|
||||
m_x_axis_data.max_value(b2->x_axis_max());
|
||||
m_x_axis_data.set_min_value(b2->x_axis_min());
|
||||
m_x_axis_data.set_max_value(b2->x_axis_max());
|
||||
}
|
||||
|
||||
if(y_axis_automated) {
|
||||
m_y_axis_data.min_value(b2->y_axis_min());
|
||||
m_y_axis_data.max_value(b2->y_axis_max());
|
||||
m_y_axis_data.set_min_value(b2->y_axis_min());
|
||||
m_y_axis_data.set_max_value(b2->y_axis_max());
|
||||
}
|
||||
|
||||
if(z_axis_automated) {
|
||||
float Sw_mn,Sw_mx;
|
||||
b2->bins_Sw_range(Sw_mn,Sw_mx,value_bins_with_entries.value());
|
||||
float mn,mx;
|
||||
b2->bins_Sw_range(mn,mx);
|
||||
m_z_axis_data.min_value(mn);
|
||||
mx = mx + (mx-mn)*value_top_margin;
|
||||
m_z_axis_data.max_value(mx);
|
||||
get_value_axis_min_max(Sw_mn,Sw_mx,m_z_axis_data.is_log(),mn,mx,false);
|
||||
m_z_axis_data.set_min_value(mn);
|
||||
m_z_axis_data.set_max_value(mx);
|
||||
|
||||
m_z_axis_data.adjust();
|
||||
}
|
||||
} /*else if(f_binsList[0]->getDimension()==3) {
|
||||
@@ -2997,33 +3089,33 @@ public:
|
||||
} else if(first_points(p2,p3)) {
|
||||
if(p2) {
|
||||
if(x_axis_automated) {
|
||||
m_x_axis_data.min_value(p2->x_axis_min());
|
||||
m_x_axis_data.max_value(p2->x_axis_max());
|
||||
m_x_axis_data.set_min_value(p2->x_axis_min());
|
||||
m_x_axis_data.set_max_value(p2->x_axis_max());
|
||||
}
|
||||
if(y_axis_automated) {
|
||||
float ymn = p2->y_axis_min();
|
||||
float ymx = p2->y_axis_max();
|
||||
// For pawex22 ?
|
||||
//m_y_axis_data.min_value(ymn*1.1F);
|
||||
//m_y_axis_data.max_value(ymx*1.1F);
|
||||
m_y_axis_data.min_value(ymn);
|
||||
m_y_axis_data.max_value(ymx);
|
||||
//m_y_axis_data.set_min_value(ymn*1.1F);
|
||||
//m_y_axis_data.set_max_value(ymx*1.1F);
|
||||
m_y_axis_data.set_min_value(ymn);
|
||||
m_y_axis_data.set_max_value(ymx);
|
||||
}
|
||||
} else if(p3) {
|
||||
|
||||
if(x_axis_automated) {
|
||||
m_x_axis_data.min_value(p3->x_axis_min());
|
||||
m_x_axis_data.max_value(p3->x_axis_max());
|
||||
m_x_axis_data.set_min_value(p3->x_axis_min());
|
||||
m_x_axis_data.set_max_value(p3->x_axis_max());
|
||||
}
|
||||
|
||||
if(y_axis_automated) {
|
||||
m_y_axis_data.min_value(p3->y_axis_min());
|
||||
m_y_axis_data.max_value(p3->y_axis_max());
|
||||
m_y_axis_data.set_min_value(p3->y_axis_min());
|
||||
m_y_axis_data.set_max_value(p3->y_axis_max());
|
||||
}
|
||||
|
||||
if(z_axis_automated) {
|
||||
m_z_axis_data.min_value(p3->z_axis_min());
|
||||
m_z_axis_data.max_value(p3->z_axis_max());
|
||||
m_z_axis_data.set_min_value(p3->z_axis_min());
|
||||
m_z_axis_data.set_max_value(p3->z_axis_max());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3038,8 +3130,8 @@ public:
|
||||
xmn = -1;
|
||||
xmx = 1;
|
||||
}
|
||||
m_x_axis_data.min_value(xmn);
|
||||
m_x_axis_data.max_value(xmx);
|
||||
m_x_axis_data.set_min_value(xmn);
|
||||
m_x_axis_data.set_max_value(xmx);
|
||||
}
|
||||
|
||||
if(y_axis_automated) {
|
||||
@@ -3070,8 +3162,8 @@ public:
|
||||
<< " problem when getting some function value."
|
||||
<< std::endl;
|
||||
}
|
||||
m_y_axis_data.min_value(vmin);
|
||||
m_y_axis_data.max_value(vmax);
|
||||
m_y_axis_data.set_min_value(vmin);
|
||||
m_y_axis_data.set_max_value(vmax);
|
||||
m_y_axis_data.adjust();
|
||||
}
|
||||
|
||||
@@ -3083,8 +3175,8 @@ public:
|
||||
xmn = -1;
|
||||
xmx = 1;
|
||||
}
|
||||
m_x_axis_data.min_value(xmn);
|
||||
m_x_axis_data.max_value(xmx);
|
||||
m_x_axis_data.set_min_value(xmn);
|
||||
m_x_axis_data.set_max_value(xmx);
|
||||
}
|
||||
|
||||
if(y_axis_automated) {
|
||||
@@ -3094,8 +3186,8 @@ public:
|
||||
ymn = -1;
|
||||
ymx = 1;
|
||||
}
|
||||
m_y_axis_data.min_value(ymn);
|
||||
m_y_axis_data.max_value(ymx);
|
||||
m_y_axis_data.set_min_value(ymn);
|
||||
m_y_axis_data.set_max_value(ymx);
|
||||
}
|
||||
|
||||
if(z_axis_automated) {
|
||||
@@ -3141,8 +3233,8 @@ public:
|
||||
<< " problem when getting some function value."
|
||||
<< std::endl;
|
||||
}
|
||||
m_z_axis_data.min_value(vmin);
|
||||
m_z_axis_data.max_value(vmax);
|
||||
m_z_axis_data.set_min_value(vmin);
|
||||
m_z_axis_data.set_max_value(vmax);
|
||||
m_z_axis_data.adjust();
|
||||
}
|
||||
}
|
||||
@@ -3555,20 +3647,31 @@ protected: //vis bins
|
||||
//::sprintf(sid,"tools::sg::bins1D/0x%lx",
|
||||
// (unsigned long)const_cast<bins1D*>(&a_bins));
|
||||
|
||||
//bool hbe = a_bins.has_entries_per_bin();
|
||||
|
||||
float bmin = 0;
|
||||
float bmax = 0;
|
||||
|
||||
size_t xnbin = a_bins.bins();
|
||||
std::vector<rep_bin1D> bins(xnbin);
|
||||
{bool first = true;
|
||||
for(size_t ibin=0;ibin<xnbin;ibin++) {
|
||||
//if(hbe && (a_bins.bin_entries(size_t(ibin))<=0)) continue;
|
||||
float val = a_bins.bin_Sw(int(ibin));
|
||||
float xx = float(a_bins.bin_lower_edge(int(ibin)));
|
||||
float xe = float(a_bins.bin_upper_edge(int(ibin)));
|
||||
float vmin,vmax;
|
||||
//if(aSuperpose) {
|
||||
//uuugetHeight(aIndex1D,a_bins1DList,a_bins1DListSwMnMx,ibin,vmin,vmax);
|
||||
//} else {
|
||||
vmin = 0;
|
||||
vmax = a_bins.bin_Sw(int(ibin));
|
||||
//}
|
||||
bins[ibin] = rep_bin1D(xx,xe,vmin,vmax);
|
||||
}
|
||||
bins[ibin] = rep_bin1D(xx,xe,0,val);
|
||||
if(first) {
|
||||
first = false;
|
||||
bmin = val;
|
||||
bmax = val;
|
||||
} else {
|
||||
bmin = mn<float>(bmin,val);
|
||||
bmax = mx<float>(bmax,val);
|
||||
}
|
||||
}}
|
||||
|
||||
//a_bins.bins_Sw_range(bmin,bmax,false);
|
||||
|
||||
//modeling_profile could override errors_visible.
|
||||
bool errors_visible = a_errors_style.visible;
|
||||
@@ -3581,9 +3684,6 @@ protected: //vis bins
|
||||
} else if( (painting==painting_grey_scale) ||
|
||||
(painting==painting_grey_scale_inverse) ||
|
||||
(painting==painting_violet_to_red) ){
|
||||
float bmin;
|
||||
float bmax;
|
||||
a_bins.bins_Sw_range(bmin,bmax);
|
||||
{float dbins = bmax-bmin;
|
||||
if(dbins!=0.0F) {
|
||||
for(size_t index=0;index<xnbin;index++) bins[index].m_ratio = (a_bins.bin_Sw(int(index))-bmin)/dbins;
|
||||
@@ -3819,10 +3919,6 @@ protected: //vis bins
|
||||
unsigned int xnbin = a_bins.x_bins();
|
||||
unsigned int ynbin = a_bins.y_bins();
|
||||
|
||||
float bmin;
|
||||
float bmax;
|
||||
a_bins.bins_Sw_range(bmin,bmax);
|
||||
|
||||
const std::string& modeling = a_data_style.modeling;
|
||||
|
||||
if( (modeling==modeling_curve()) || (modeling==modeling_filled_curve()) ){
|
||||
@@ -3944,22 +4040,38 @@ protected: //vis bins
|
||||
|
||||
bool hbe = a_bins.has_entries_per_bin();
|
||||
|
||||
float bmin = 0;
|
||||
float bmax = 0;
|
||||
|
||||
std::vector<rep_bin2D> bins;
|
||||
{for(int jbin=ynbin-1;jbin>=0;jbin--) {
|
||||
{bool first = true;
|
||||
for(int jbin=ynbin-1;jbin>=0;jbin--) {
|
||||
for(int ibin=xnbin-1;ibin>=0;ibin--) {
|
||||
if(hbe && (a_bins.bin_entries(ibin,jbin)<=0)) continue;
|
||||
|
||||
float val = a_bins.bin_Sw(ibin,jbin);
|
||||
|
||||
float xx = a_bins.bin_lower_edge_x(ibin);
|
||||
float xe = a_bins.bin_upper_edge_x(ibin);
|
||||
float yy = a_bins.bin_lower_edge_y(jbin);
|
||||
float ye = a_bins.bin_upper_edge_y(jbin);
|
||||
|
||||
bins.push_back(rep_bin2D(xx,xe,yy,ye,val,ibin,jbin));
|
||||
|
||||
if(first) {
|
||||
first = false;
|
||||
bmin = val;
|
||||
bmax = val;
|
||||
} else {
|
||||
bmin = mn<float>(bmin,val);
|
||||
bmax = mx<float>(bmax,val);
|
||||
}
|
||||
}
|
||||
}}
|
||||
size_t number = bins.size();
|
||||
|
||||
//a_bins.bins_Sw_range(bmin,bmax,false);
|
||||
|
||||
painting_policy painting = a_data_style.painting;
|
||||
if(painting==painting_by_value) {
|
||||
m_bins_cmaps[a_index] = new by_value_colormap(a_out,m_cmaps,a_data_style.color_mapping);
|
||||
@@ -4497,8 +4609,12 @@ protected: //vis bins
|
||||
|
||||
bool hbe = a_bins.has_entries_per_bin();
|
||||
|
||||
float bmin = 0;
|
||||
float bmax = 0;
|
||||
|
||||
std::vector<rep_bin2D> bins;
|
||||
{for(int jbin=ynbin-1;jbin>=0;jbin--) {
|
||||
{bool first = true;
|
||||
for(int jbin=ynbin-1;jbin>=0;jbin--) {
|
||||
for(int ibin=xnbin-1;ibin>=0;ibin--) {
|
||||
if(hbe && (a_bins.bin_entries(ibin,jbin)<=0)) continue;
|
||||
|
||||
@@ -4510,13 +4626,20 @@ protected: //vis bins
|
||||
float ye = a_bins.bin_upper_edge_y(jbin);
|
||||
|
||||
bins.push_back(rep_bin2D(xx,xe,yy,ye,val,ibin,jbin));
|
||||
|
||||
if(first) {
|
||||
first = false;
|
||||
bmin = val;
|
||||
bmax = val;
|
||||
} else {
|
||||
bmin = mn<float>(bmin,val);
|
||||
bmax = mx<float>(bmax,val);
|
||||
}
|
||||
}
|
||||
}}
|
||||
size_t number = bins.size();
|
||||
|
||||
float bmin;
|
||||
float bmax;
|
||||
a_bins.bins_Sw_range(bmin,bmax);
|
||||
|
||||
//a_bins.bins_Sw_range(bmin,bmax,false);
|
||||
|
||||
painting_policy painting = a_style.painting;
|
||||
if(painting==painting_by_value) {
|
||||
@@ -4545,7 +4668,11 @@ protected: //vis bins
|
||||
|
||||
} else if(modeling==modeling_curve()){ //gopaw
|
||||
|
||||
float bmin = 0;
|
||||
float bmax = 0;
|
||||
|
||||
std::vector<rep_top_face2D> faces((xnbin-1)*(ynbin-1));
|
||||
{bool first = true;
|
||||
size_t facei = 0;
|
||||
unsigned int xnbin_1 = xnbin-1;
|
||||
unsigned int ynbin_1 = ynbin-1;
|
||||
@@ -4572,10 +4699,22 @@ protected: //vis bins
|
||||
float val3 = a_bins.bin_Sw(ibin+1,jbin+1);
|
||||
float val4 = a_bins.bin_Sw(ibin,jbin+1);
|
||||
|
||||
faces[facei] = rep_top_face2D(xx,xe,yy,ye,val1,val2,val3,val4);
|
||||
faces[facei] = rep_top_face2D(xx,xe,yy,ye,val1,val2,val3,val4);
|
||||
|
||||
if(first) {
|
||||
first = false;
|
||||
bmin = val1;
|
||||
bmax = val1;
|
||||
} else {
|
||||
bmin = mn<float>(bmin,val1);
|
||||
bmax = mx<float>(bmax,val1);
|
||||
}
|
||||
|
||||
facei++;
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
//a_bins.bins_Sw_range(bmin,bmax,false);
|
||||
|
||||
painting_policy painting = a_style.painting;
|
||||
if((painting==painting_by_value)||(painting==painting_by_level)) {
|
||||
@@ -4585,9 +4724,6 @@ protected: //vis bins
|
||||
}
|
||||
|
||||
if(painting==painting_by_level) { //gopaw
|
||||
float bmin;
|
||||
float bmax;
|
||||
a_bins.bins_Sw_range(bmin,bmax);
|
||||
rep_top_face2D_xyz_by_level(a_style,painting,*(m_bins_cmaps[a_index]),
|
||||
faces,a_box_x,a_box_y,a_box_z,
|
||||
bmin,bmax/*,SbString(sid.c_str())*/);
|
||||
@@ -8885,14 +9021,14 @@ protected: //etc
|
||||
|
||||
float _zoffset() const {
|
||||
// first data plane is at _zoffset.
|
||||
// last one at m_plottables.size()*_zoffset = xy_depth-_zoffset().
|
||||
return xy_depth.value()/(m_plottables.size()+1);
|
||||
// last one at m_plottables.size()*_zoffset = xy_depth.value()-_zoffset().
|
||||
return xy_depth.value()/(float(m_plottables.size())+1.0f);
|
||||
}
|
||||
float _zaxis() const {return _zoffset();}
|
||||
float _zgrid() const {return xy_depth-_zoffset()*0.5f;}
|
||||
float _zgrid() const {return xy_depth.value()-_zoffset()*0.5f;}
|
||||
float _ztext() const {return 0.01f;} //if text back is visible else 0. (sf<float> zfront ?)
|
||||
float _zscale_text() const {return _zoffset()*0.4f/_ztext();} //title and infos boxes thickness.
|
||||
float _zinfos() const {return xy_depth-_zoffset()*0.4f;} //in front _zgrid
|
||||
float _zinfos() const {return xy_depth.value()-_zoffset()*0.4f;} //in front _zgrid
|
||||
float _zhatch() const {return _zoffset()*0.25f;}
|
||||
float _zerrors() const {return _zoffset()*0.5f;}
|
||||
|
||||
@@ -8906,28 +9042,28 @@ protected: //etc
|
||||
}
|
||||
}
|
||||
|
||||
static float verify_log(float aVal,float aMin,float aDx,bool aLog){
|
||||
if(aLog) {
|
||||
if(aVal>0.0F) {
|
||||
return (flog10(aVal) - aMin)/aDx;
|
||||
static float verify_log(float a_val,float a_min,float a_dx,bool a_log){
|
||||
if(a_log) {
|
||||
if(a_val>0.0F) {
|
||||
return (flog10(a_val) - a_min)/a_dx;
|
||||
} else { // Return a negative large number :
|
||||
//return -FLT_MAX;
|
||||
return -100;
|
||||
}
|
||||
} else {
|
||||
// Simple protection against value that could exceed a float :
|
||||
if(aVal>(aMin+100.0F * aDx)) return 100;
|
||||
if(aVal<aMin-100.0F * aDx) return -100;
|
||||
if(a_val>(a_min+100.0F * a_dx)) return 100;
|
||||
if(a_val<(a_min-100.0F * a_dx)) return -100;
|
||||
// Rescale :
|
||||
return (aVal - aMin)/aDx;
|
||||
return (a_val - a_min)/a_dx;
|
||||
}
|
||||
}
|
||||
|
||||
static float verify_log_inv(float aVal,float aMin,float aDx,bool aLog){
|
||||
if(aLog) {
|
||||
return fpow(10,aVal*aDx+aMin);
|
||||
static float verify_log_inv(float a_val,float a_min,float a_dx,bool a_log){
|
||||
if(a_log) {
|
||||
return fpow(10,a_val*a_dx+a_min);
|
||||
} else {
|
||||
return aVal*aDx+aMin;
|
||||
return a_val*a_dx+a_min;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +107,7 @@ public:
|
||||
|
||||
typedef std::vector<path_t> paths_t;
|
||||
const paths_t& paths() const {return m_paths;}
|
||||
|
||||
protected:
|
||||
search_what m_what;
|
||||
bool m_stop_at_first;
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
#include "../io/iwbuf"
|
||||
#include "../io/irbuf"
|
||||
#include "../stype"
|
||||
|
||||
#include <sstream>
|
||||
#include <istream>
|
||||
|
||||
namespace tools {
|
||||
namespace sg {
|
||||
@@ -48,6 +50,14 @@ public:
|
||||
a_s = strm.str();
|
||||
return true;
|
||||
}
|
||||
virtual bool s2value(const std::string& a_s) {
|
||||
std::istringstream strm(a_s.c_str());
|
||||
T v;
|
||||
strm >> v;
|
||||
if(strm.fail()) return false;
|
||||
parent::value(v);
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
sf(){}
|
||||
sf(const T& a_value):parent(a_value){}
|
||||
|
||||
@@ -52,6 +52,8 @@ public:
|
||||
//a_out << parent::m_value << std::endl;
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
virtual void set_value(int a_value) {parent::value(T(a_value));}
|
||||
public:
|
||||
|
||||
@@ -45,6 +45,8 @@ public:
|
||||
//a_out << parent::m_value << std::endl;
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
sf_img():parent(){}
|
||||
sf_img(const img<T>& a_value):parent(a_value){}
|
||||
|
||||
@@ -44,6 +44,8 @@ public:
|
||||
//a_out << parent::m_value << std::endl;
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {a_s.clear();return false;}
|
||||
virtual bool s2value(const std::string&) {return false;}
|
||||
public:
|
||||
sf_rotf():parent(){}
|
||||
sf_rotf(const rotf& a_value):parent(a_value){}
|
||||
|
||||
@@ -25,8 +25,16 @@ public:
|
||||
str_del(cstr);
|
||||
return true;
|
||||
}
|
||||
virtual bool dump(std::ostream&) {
|
||||
//a_out << parent::m_value << std::endl;
|
||||
virtual bool dump(std::ostream& a_out) {
|
||||
a_out << m_value << std::endl;
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {
|
||||
a_s = m_value;
|
||||
return true;
|
||||
}
|
||||
virtual bool s2value(const std::string& a_s) {
|
||||
value(a_s);
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
|
||||
#include "sf"
|
||||
|
||||
#include "../words"
|
||||
|
||||
namespace tools {
|
||||
namespace sg {
|
||||
|
||||
@@ -56,6 +58,36 @@ public:
|
||||
a_out << parent::m_value << std::endl;
|
||||
return true;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {
|
||||
a_s.clear();
|
||||
const T& vec = parent::m_value;
|
||||
for(size_t index=0;index<vec.size();index++) {
|
||||
if(index) a_s += ' ';
|
||||
std::ostringstream strm;
|
||||
strm << vec[index];
|
||||
a_s += strm.str();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
virtual bool s2value(const std::string& a_s) {
|
||||
std::vector<std::string> ws;
|
||||
words(a_s," ",false,ws);
|
||||
T& vec = parent::m_value;
|
||||
if(ws.size()!=vec.size()) return false;
|
||||
T old_vec = vec;
|
||||
for(size_t index=0;index<vec.size();index++) {
|
||||
std::istringstream strm(ws[index].c_str());
|
||||
TT v;
|
||||
strm >> v;
|
||||
if(strm.fail()) {
|
||||
vec = old_vec;
|
||||
return false;
|
||||
}
|
||||
if(vec[index]!=v) parent::m_touched = true;
|
||||
vec[index] = v;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public:
|
||||
sf_vec():parent(){}
|
||||
sf_vec(const T& a_value):parent(a_value){}
|
||||
@@ -76,17 +108,6 @@ public:
|
||||
parent::value(parent::value()+a_value);
|
||||
return *this;
|
||||
}
|
||||
virtual bool s_value(std::string& a_s) const {
|
||||
const T& vec = parent::m_value;
|
||||
typename T::size_type sz = vec.size();
|
||||
std::ostringstream strm;
|
||||
for(typename T::size_type index=0;index<sz;index++) {
|
||||
if(index) strm << " ";
|
||||
strm << vec[index];
|
||||
}
|
||||
a_s = strm.str();
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -61,13 +61,12 @@ public:
|
||||
sf<bool> enforced;
|
||||
sf_vec3f translation;
|
||||
sf_string coloring;
|
||||
sf_string filling;
|
||||
sf_string title;
|
||||
public:
|
||||
virtual const desc_fields& node_desc_fields() const {
|
||||
TOOLS_FIELD_DESC_NODE_CLASS(tools::sg::style)
|
||||
static const desc_fields s_v(parent::node_desc_fields(),44, //WARNING : take care of count.
|
||||
TOOLS_ARG_FIELD_DESC(color),
|
||||
static const desc_fields s_v(parent::node_desc_fields(),43, //WARNING : take care of count.
|
||||
TOOLS_ARG_FIELD_DESC(color), //1
|
||||
TOOLS_ARG_FIELD_DESC(highlight_color),
|
||||
TOOLS_ARG_FIELD_DESC(back_color),
|
||||
TOOLS_ARG_FIELD_DESC(line_width),
|
||||
@@ -113,7 +112,6 @@ public:
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(translation),
|
||||
TOOLS_ARG_FIELD_DESC(coloring),
|
||||
TOOLS_ARG_FIELD_DESC(filling),
|
||||
TOOLS_ARG_FIELD_DESC(title)
|
||||
);
|
||||
return s_v;
|
||||
@@ -162,7 +160,6 @@ private:
|
||||
add_field(&enforced);
|
||||
add_field(&translation);
|
||||
add_field(&coloring);
|
||||
add_field(&filling);
|
||||
add_field(&title);
|
||||
}
|
||||
public:
|
||||
@@ -210,7 +207,6 @@ public:
|
||||
,enforced(false)
|
||||
,translation(vec3f(0,0,0))
|
||||
,coloring()
|
||||
,filling()
|
||||
,title()
|
||||
{
|
||||
add_fields();
|
||||
@@ -261,7 +257,6 @@ public:
|
||||
,enforced(a_from.enforced)
|
||||
,translation(a_from.translation)
|
||||
,coloring(a_from.coloring)
|
||||
,filling(a_from.filling)
|
||||
,title(a_from.title)
|
||||
{
|
||||
add_fields();
|
||||
@@ -311,7 +306,6 @@ public:
|
||||
enforced = a_from.enforced;
|
||||
translation = a_from.translation;
|
||||
coloring = a_from.coloring;
|
||||
filling = a_from.filling;
|
||||
title = a_from.title;
|
||||
|
||||
return *this;
|
||||
@@ -360,7 +354,6 @@ public:
|
||||
enforced = false;
|
||||
translation = vec3f(0,0,0);
|
||||
coloring = "";
|
||||
filling = "";
|
||||
title = "";
|
||||
}
|
||||
|
||||
@@ -411,7 +404,6 @@ public:
|
||||
sp.enforced(enforced.value());
|
||||
sp.translation(translation.value());
|
||||
sp.coloring(coloring.value());
|
||||
sp.filling(filling.value());
|
||||
sp.title(title.value());
|
||||
|
||||
//if(!sp.parse(a_s,style_parser::def_error_func))
|
||||
@@ -468,7 +460,6 @@ public:
|
||||
enforced.value(sp.enforced());
|
||||
translation.value(sp.translation());
|
||||
coloring.value(sp.coloring());
|
||||
filling.value(sp.filling());
|
||||
title.value(sp.title());
|
||||
|
||||
return true;
|
||||
|
||||
@@ -69,7 +69,6 @@ public:
|
||||
,m_hjust(left)
|
||||
,m_vjust(bottom)
|
||||
,m_coloring()
|
||||
,m_filling()
|
||||
,m_title()
|
||||
,m_pickable(false)
|
||||
{
|
||||
@@ -131,7 +130,6 @@ public:
|
||||
,m_hjust(a_from.m_hjust)
|
||||
,m_vjust(a_from.m_vjust)
|
||||
,m_coloring(a_from.m_coloring)
|
||||
,m_filling(a_from.m_filling)
|
||||
,m_title(a_from.m_title)
|
||||
,m_pickable(a_from.m_pickable)
|
||||
{
|
||||
@@ -194,7 +192,6 @@ public:
|
||||
m_hjust = a_from.m_hjust;
|
||||
m_vjust = a_from.m_vjust;
|
||||
m_coloring = a_from.m_coloring;
|
||||
m_filling = a_from.m_filling;
|
||||
m_title = a_from.m_title;
|
||||
m_pickable = a_from.m_pickable;
|
||||
}
|
||||
@@ -254,7 +251,6 @@ public:
|
||||
if(m_vjust!=a_from.m_vjust) return false;
|
||||
|
||||
if(m_coloring!=a_from.m_coloring) return false;
|
||||
if(m_filling!=a_from.m_filling) return false;
|
||||
if(m_title!=a_from.m_title) return false;
|
||||
if(m_pickable!=a_from.m_pickable) return false;
|
||||
|
||||
@@ -308,7 +304,6 @@ public:
|
||||
m_hjust = left;
|
||||
m_vjust = bottom;
|
||||
m_coloring = "";
|
||||
m_filling = "";
|
||||
m_title = "";
|
||||
m_pickable = false;
|
||||
}
|
||||
@@ -408,10 +403,6 @@ translation %g %g %g"
|
||||
s += "coloring ";
|
||||
s += m_coloring;
|
||||
|
||||
s += lf;
|
||||
s += "filling ";
|
||||
s += m_filling;
|
||||
|
||||
s += lf;
|
||||
s += "title ";
|
||||
s += m_title;
|
||||
@@ -623,9 +614,6 @@ translation %g %g %g"
|
||||
void coloring(const std::string& a_v){m_coloring = a_v;}
|
||||
const std::string& coloring() const {return m_coloring;}
|
||||
|
||||
void filling(const std::string& a_v){m_filling = a_v;}
|
||||
const std::string& filling() const {return m_filling;}
|
||||
|
||||
void title(const std::string& a_v){m_title = a_v;}
|
||||
const std::string& title() const {return m_title;}
|
||||
|
||||
@@ -1277,10 +1265,6 @@ public:
|
||||
if(!check_2(wordn,a_s,line,a_out)) return false;
|
||||
m_coloring = ws[1];
|
||||
|
||||
} else if(word0=="filling") {
|
||||
if(!check_2(wordn,a_s,line,a_out)) return false;
|
||||
m_filling = ws[1];
|
||||
|
||||
} else if(word0=="title") {
|
||||
if(!check_2(wordn,a_s,line,a_out)) return false;
|
||||
m_title = ws[1];
|
||||
@@ -1411,7 +1395,6 @@ protected:
|
||||
sg::hjust m_hjust;
|
||||
sg::vjust m_vjust;
|
||||
std::string m_coloring;
|
||||
std::string m_filling;
|
||||
std::string m_title;
|
||||
bool m_pickable;
|
||||
};
|
||||
|
||||
@@ -48,6 +48,7 @@ protected: //gstos
|
||||
|
||||
public:
|
||||
virtual void render(render_action& a_action) {
|
||||
if(touched()) {clean_gstos();reset_touched();}
|
||||
if(xyzs.empty()) return;
|
||||
|
||||
const state& state = a_action.state();
|
||||
@@ -101,13 +102,16 @@ public:
|
||||
#endif
|
||||
}
|
||||
virtual void pick(pick_action& a_action) {
|
||||
if(touched()) {clean_gstos();reset_touched();}
|
||||
a_action.add__primitive(*this,mode.value(),xyzs.values(),true);
|
||||
}
|
||||
|
||||
virtual void bbox(bbox_action& a_action) {
|
||||
if(touched()) {clean_gstos();reset_touched();}
|
||||
a_action.add_points(xyzs.values());
|
||||
}
|
||||
virtual void is_visible(visible_action& a_action) {
|
||||
if(touched()) {clean_gstos();reset_touched();}
|
||||
if(_is_visible(a_action)) a_action.increment();
|
||||
}
|
||||
|
||||
|
||||
@@ -936,10 +936,14 @@ inline bool value::subtract(value& aThis,const value& aV,std::string& aError){
|
||||
break;
|
||||
case value::UNSIGNED_INT:
|
||||
switch(aV.m_type) {
|
||||
//uuu
|
||||
//case value::UNSIGNED_INT:
|
||||
// aThis.u.m_unsigned_int -= aV.u.m_unsigned_int;
|
||||
// return true;
|
||||
case value::UNSIGNED_INT:
|
||||
if(aThis.u.m_unsigned_int>=aV.u.m_unsigned_int) {
|
||||
aThis.u.m_unsigned_int -= aV.u.m_unsigned_int;
|
||||
} else {
|
||||
int i = int(aThis.u.m_unsigned_int) - aV.u.m_unsigned_int;
|
||||
aThis.set(i);
|
||||
}
|
||||
return true;
|
||||
case value::DOUBLE:{
|
||||
double d = double(aThis.u.m_unsigned_int) - aV.u.m_double;
|
||||
aThis.set(d);
|
||||
@@ -968,7 +972,6 @@ inline bool value::subtract(value& aThis,const value& aV,std::string& aError){
|
||||
//case value::UNSIGNED_CHAR:
|
||||
//case value::CHAR:
|
||||
case value::UNSIGNED_SHORT :
|
||||
case value::UNSIGNED_INT:
|
||||
case value::UNSIGNED_INT64 :
|
||||
case value::DOUBLE_STAR:
|
||||
case value::FLOAT_STAR:
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#define tools_version
|
||||
|
||||
#define TOOLS_MAJOR_VERSION 5
|
||||
#define TOOLS_MINOR_VERSION 0
|
||||
#define TOOLS_PATCH_VERSION 3
|
||||
#define TOOLS_VERSION "5.0.3"
|
||||
#define TOOLS_VERSION_VRP "v5r0p3"
|
||||
#define TOOLS_MINOR_VERSION 1
|
||||
#define TOOLS_PATCH_VERSION 0
|
||||
#define TOOLS_VERSION "5.1.0"
|
||||
#define TOOLS_VERSION_VRP "v5r1p0"
|
||||
|
||||
namespace tools {
|
||||
inline unsigned int version() {return 50003;}
|
||||
inline unsigned int version() {return 50100;}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -87,8 +87,7 @@ inline void append(std::vector<T>& a_vec,typename std::vector<T>::size_type a_nu
|
||||
template <class T>
|
||||
inline void removep(std::vector<T*>& a_vec,const T* a_elem) {
|
||||
typedef typename std::vector<T*>::iterator it_t;
|
||||
it_t it;
|
||||
for(it=a_vec.begin();it!=a_vec.end();) {
|
||||
for(it_t it=a_vec.begin();it!=a_vec.end();) {
|
||||
if(*it==a_elem) {
|
||||
it = a_vec.erase(it);
|
||||
} else {
|
||||
@@ -100,8 +99,7 @@ inline void removep(std::vector<T*>& a_vec,const T* a_elem) {
|
||||
template <class T>
|
||||
inline bool is_inp(const std::vector<T*>& a_vec,const T* a_item){
|
||||
typedef typename std::vector<T*>::const_iterator it_t;
|
||||
it_t it;
|
||||
for(it=a_vec.begin();it!=a_vec.end();++it) {
|
||||
for(it_t it=a_vec.begin();it!=a_vec.end();++it) {
|
||||
if(*it==a_item) return true;
|
||||
}
|
||||
return false;
|
||||
@@ -160,7 +158,7 @@ inline void unique(std::vector<T>& a_vec) {
|
||||
for(it=a_vec.begin();it!=a_vec.end();++it) {
|
||||
it2 = it;it2++; //TOOLS_STL : it2=it+1 does not compile.
|
||||
for(;it2!=a_vec.end();) {
|
||||
if(*it2==*it) {
|
||||
if((*it2)==(*it)) {
|
||||
it2 = a_vec.erase(it2);
|
||||
} else {
|
||||
++it2;
|
||||
|
||||
@@ -37,23 +37,27 @@ inline void annotations_to(std::ostream& a_writer,const ANNOTATION& a_ans,char a
|
||||
}
|
||||
}
|
||||
|
||||
template <class HIST>
|
||||
inline void h_header(std::ostream& a_writer,const std::string& a_class,const HIST& a_h,char a_hc = '#') {
|
||||
a_writer << a_hc << "class " << a_class << std::endl;
|
||||
a_writer << a_hc << "title " << a_h.title() << std::endl;
|
||||
a_writer << a_hc << "dimension " << a_h.dimension() << std::endl;
|
||||
for(unsigned int iaxis=0;iaxis<a_h.dimension();iaxis++) axis_to(a_writer,a_h.get_axis(iaxis),a_hc);
|
||||
{const std::vector<typename HIST::coordinate_t>& planes = a_h.in_range_planes_xyw();
|
||||
if(planes.size()) {
|
||||
a_writer << a_hc << "planes_Sxyw";
|
||||
for(unsigned int iplane=0;iplane<planes.size();iplane++) a_writer << " " << planes[iplane];
|
||||
a_writer << std::endl;
|
||||
}}
|
||||
annotations_to(a_writer,a_h.annotations(),a_hc);
|
||||
a_writer << a_hc << "bin_number " << a_h.get_bins() << std::endl;
|
||||
}
|
||||
|
||||
template <class HIST>
|
||||
inline bool hto(std::ostream& a_writer,const std::string& a_class,const HIST& a_h,
|
||||
char a_sep = ',',char a_hc = '#',bool a_header = true) {
|
||||
if(a_header) {
|
||||
a_writer << a_hc << "class " << a_class << std::endl;
|
||||
a_writer << a_hc << "title " << a_h.title() << std::endl;
|
||||
a_writer << a_hc << "dimension " << a_h.dimension() << std::endl;
|
||||
for(unsigned int iaxis=0;iaxis<a_h.dimension();iaxis++) axis_to(a_writer,a_h.get_axis(iaxis),a_hc);
|
||||
{const std::vector<typename HIST::coordinate_t>& planes = a_h.in_range_planes_xyw();
|
||||
if(planes.size()) {
|
||||
a_writer << a_hc << "planes_Sxyw";
|
||||
for(unsigned int iplane=0;iplane<planes.size();iplane++) a_writer << " " << planes[iplane];
|
||||
a_writer << std::endl;
|
||||
}}
|
||||
annotations_to(a_writer,a_h.annotations(),a_hc);
|
||||
a_writer << a_hc << "bin_number " << a_h.get_bins() << std::endl;
|
||||
}
|
||||
if(a_header) h_header(a_writer,a_class,a_h,a_hc);
|
||||
|
||||
{a_writer << "entries" << a_sep << "Sw" << a_sep << "Sw2";
|
||||
for(unsigned int iaxis=0;iaxis<a_h.dimension();iaxis++) {
|
||||
a_writer << a_sep << "Sxw" << iaxis << a_sep << "Sx2w" << iaxis;
|
||||
@@ -88,26 +92,30 @@ inline bool hto(std::ostream& a_writer,const std::string& a_class,const HIST& a_
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class PROF>
|
||||
inline void p_header(std::ostream& a_writer,const std::string& a_class,const PROF& a_prof,char a_hc = '#') {
|
||||
a_writer << a_hc << "class " << a_class << std::endl;
|
||||
a_writer << a_hc << "title " << a_prof.title() << std::endl;
|
||||
a_writer << a_hc << "dimension " << a_prof.dimension() << std::endl;
|
||||
for(unsigned int iaxis=0;iaxis<a_prof.dimension();iaxis++) axis_to(a_writer,a_prof.get_axis(iaxis),a_hc);
|
||||
{const std::vector<typename PROF::coordinate_t>& planes = a_prof.in_range_planes_xyw();
|
||||
if(planes.size()) {
|
||||
a_writer << a_hc << "planes_Sxyw";
|
||||
for(unsigned int iplane=0;iplane<planes.size();iplane++) a_writer << " " << planes[iplane];
|
||||
a_writer << std::endl;
|
||||
}}
|
||||
annotations_to(a_writer,a_prof.annotations(),a_hc);
|
||||
a_writer << a_hc << "cut_v " << (a_prof.cut_v()?"true":"false") << std::endl;
|
||||
a_writer << a_hc << "min_v " << a_prof.min_v() << std::endl;
|
||||
a_writer << a_hc << "max_v " << a_prof.max_v() << std::endl;
|
||||
a_writer << a_hc << "bin_number " << a_prof.get_bins() << std::endl;
|
||||
}
|
||||
|
||||
template <class PROF>
|
||||
inline bool pto(std::ostream& a_writer,const std::string& a_class,const PROF& a_prof,
|
||||
char a_sep = ',',char a_hc = '#',bool a_header = true) {
|
||||
if(a_header) {
|
||||
a_writer << a_hc << "class " << a_class << std::endl;
|
||||
a_writer << a_hc << "title " << a_prof.title() << std::endl;
|
||||
a_writer << a_hc << "dimension " << a_prof.dimension() << std::endl;
|
||||
for(unsigned int iaxis=0;iaxis<a_prof.dimension();iaxis++) axis_to(a_writer,a_prof.get_axis(iaxis),a_hc);
|
||||
{const std::vector<typename PROF::coordinate_t>& planes = a_prof.in_range_planes_xyw();
|
||||
if(planes.size()) {
|
||||
a_writer << a_hc << "planes_Sxyw";
|
||||
for(unsigned int iplane=0;iplane<planes.size();iplane++) a_writer << " " << planes[iplane];
|
||||
a_writer << std::endl;
|
||||
}}
|
||||
annotations_to(a_writer,a_prof.annotations(),a_hc);
|
||||
a_writer << a_hc << "cut_v " << (a_prof.cut_v()?"true":"false") << std::endl;
|
||||
a_writer << a_hc << "min_v " << a_prof.min_v() << std::endl;
|
||||
a_writer << a_hc << "max_v " << a_prof.max_v() << std::endl;
|
||||
a_writer << a_hc << "bin_number " << a_prof.get_bins() << std::endl;
|
||||
}
|
||||
if(a_header) p_header(a_writer,a_class,a_prof,a_hc);
|
||||
|
||||
{a_writer << "entries" << a_sep << "Sw" << a_sep << "Sw2" << a_sep << "Svw" << a_sep << "Sv2w";
|
||||
for(unsigned int iaxis=0;iaxis<a_prof.dimension();iaxis++) {
|
||||
a_writer << a_sep << "Sxw" << iaxis << a_sep << "Sx2w" << iaxis;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#define tools_wroot_streamers
|
||||
|
||||
#include "named"
|
||||
#include "date"
|
||||
#include "directory"
|
||||
#include "file"
|
||||
#include "../vmanip" //convert
|
||||
|
||||
@@ -1,27 +1,14 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4csv
|
||||
# Package: Geant4.src.G4analysis.G4analysismng
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
# Module : G4tools
|
||||
# Package: Geant4.src.G4analysis.G4tools
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4tools
|
||||
SOURCES
|
||||
csz_inflate.cc
|
||||
LINK_LIBRARIES
|
||||
geant4_define_module(NAME G4tools
|
||||
SOURCES
|
||||
csz_inflate.cc
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4xml
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 27/07/2017
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,64 +1,40 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4hdf5
|
||||
# Package: Geant4.src.G4analysis.G4hdf5
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 27/07/2017
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
include_directories(${HDF5_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/hntools/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4xml
|
||||
HEADERS
|
||||
G4Hdf5AnalysisManager.hh
|
||||
G4Hdf5AnalysisManager.icc
|
||||
G4Hdf5AnalysisReader.hh
|
||||
G4Hdf5AnalysisReader.icc
|
||||
G4Hdf5FileManager.hh
|
||||
G4Hdf5NtupleManager.hh
|
||||
G4Hdf5RNtupleManager.hh
|
||||
G4Hdf5RFileManager.hh
|
||||
g4hdf5_defs.hh
|
||||
g4hdf5.hh
|
||||
SOURCES
|
||||
G4Hdf5AnalysisManager.cc
|
||||
G4Hdf5AnalysisReader.cc
|
||||
G4Hdf5FileManager.cc
|
||||
G4Hdf5NtupleManager.cc
|
||||
G4Hdf5RFileManager.cc
|
||||
G4Hdf5RNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${HDF5_LIBRARIES}
|
||||
geant4_define_module(NAME G4hdf5
|
||||
HEADERS
|
||||
G4Hdf5AnalysisManager.hh
|
||||
G4Hdf5AnalysisManager.icc
|
||||
G4Hdf5AnalysisReader.hh
|
||||
G4Hdf5AnalysisReader.icc
|
||||
G4Hdf5FileManager.hh
|
||||
G4Hdf5NtupleManager.hh
|
||||
G4Hdf5RNtupleManager.hh
|
||||
G4Hdf5RFileManager.hh
|
||||
g4hdf5_defs.hh
|
||||
g4hdf5.hh
|
||||
SOURCES
|
||||
G4Hdf5AnalysisManager.cc
|
||||
G4Hdf5AnalysisReader.cc
|
||||
G4Hdf5FileManager.cc
|
||||
G4Hdf5NtupleManager.cc
|
||||
G4Hdf5RFileManager.cc
|
||||
G4Hdf5RNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${HDF5_LIBRARIES}
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4hntools
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,64 +1,41 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4hntools
|
||||
# Package: Geant4.src.G4analysis.G4hntools
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4hntools
|
||||
HEADERS
|
||||
G4BaseHistoUtilities.hh
|
||||
G4MPIToolsManager.hh
|
||||
G4H1ToolsManager.hh
|
||||
G4H2ToolsManager.hh
|
||||
G4H3ToolsManager.hh
|
||||
G4P1ToolsManager.hh
|
||||
G4P2ToolsManager.hh
|
||||
G4ToolsAnalysisManager.hh
|
||||
G4ToolsAnalysisManager.icc
|
||||
G4ToolsAnalysisReader.hh
|
||||
G4ToolsAnalysisReader.icc
|
||||
g4hntools_defs.hh
|
||||
SOURCES
|
||||
G4BaseHistoUtilities.cc
|
||||
G4H1ToolsManager.cc
|
||||
G4H2ToolsManager.cc
|
||||
G4H3ToolsManager.cc
|
||||
G4P1ToolsManager.cc
|
||||
G4P2ToolsManager.cc
|
||||
G4ToolsAnalysisManager.cc
|
||||
G4ToolsAnalysisReader.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
geant4_define_module(NAME G4hntools
|
||||
HEADERS
|
||||
G4BaseHistoUtilities.hh
|
||||
G4MPIToolsManager.hh
|
||||
G4H1ToolsManager.hh
|
||||
G4H2ToolsManager.hh
|
||||
G4H3ToolsManager.hh
|
||||
G4P1ToolsManager.hh
|
||||
G4P2ToolsManager.hh
|
||||
G4ToolsAnalysisManager.hh
|
||||
G4ToolsAnalysisManager.icc
|
||||
G4ToolsAnalysisReader.hh
|
||||
G4ToolsAnalysisReader.icc
|
||||
g4hntools_defs.hh
|
||||
SOURCES
|
||||
G4BaseHistoUtilities.cc
|
||||
G4H1ToolsManager.cc
|
||||
G4H2ToolsManager.cc
|
||||
G4H3ToolsManager.cc
|
||||
G4P1ToolsManager.cc
|
||||
G4P2ToolsManager.cc
|
||||
G4ToolsAnalysisManager.cc
|
||||
G4ToolsAnalysisReader.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4analysismng
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,115 +1,96 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4csv
|
||||
# Module : G4analysismng
|
||||
# Package: Geant4.src.G4analysis.G4analysismng
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
|
||||
if(GEANT4_USE_FREETYPE)
|
||||
set(G4analysismng_LINK_LIBRARIES Freetype::Freetype)
|
||||
endif()
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4analysismng
|
||||
HEADERS
|
||||
G4AnalysisVerbose.hh
|
||||
G4AnalysisManagerState.hh
|
||||
G4AnalysisMessenger.hh
|
||||
G4AnalysisUtilities.hh
|
||||
G4BaseAnalysisManager.hh
|
||||
G4BaseFileManager.hh
|
||||
G4BaseNtupleManager.hh
|
||||
G4BaseRNtupleManager.hh
|
||||
G4BinScheme.hh
|
||||
G4Fcn.hh
|
||||
G4AnalysisMessengerHelper.hh
|
||||
G4FileMessenger.hh
|
||||
G4H1Messenger.hh
|
||||
G4H2Messenger.hh
|
||||
G4H3Messenger.hh
|
||||
G4P1Messenger.hh
|
||||
G4P2Messenger.hh
|
||||
G4NtupleMessenger.hh
|
||||
G4HnInformation.hh
|
||||
G4HnManager.hh
|
||||
G4HnMessenger.hh
|
||||
G4PlotManager.hh
|
||||
G4PlotMessenger.hh
|
||||
G4PlotParameters.hh
|
||||
G4THnManager.hh
|
||||
G4THnManager.icc
|
||||
G4TNtupleDescription.hh
|
||||
G4TNtupleManager.hh
|
||||
G4TNtupleManager.icc
|
||||
G4TRNtupleDescription.hh
|
||||
G4TRNtupleManager.hh
|
||||
G4TRNtupleManager.icc
|
||||
G4VAnalysisManager.hh
|
||||
G4VAnalysisManager.icc
|
||||
G4VAnalysisReader.hh
|
||||
G4VAnalysisReader.icc
|
||||
G4VFileManager.hh
|
||||
G4VH1Manager.hh
|
||||
G4VH2Manager.hh
|
||||
G4VH3Manager.hh
|
||||
G4VNtupleManager.hh
|
||||
G4VP1Manager.hh
|
||||
G4VP2Manager.hh
|
||||
G4VRNtupleManager.hh
|
||||
SOURCES
|
||||
G4AnalysisVerbose.cc
|
||||
G4AnalysisManagerState.cc
|
||||
G4AnalysisMessenger.cc
|
||||
G4BaseAnalysisManager.cc
|
||||
G4BaseFileManager.cc
|
||||
G4BaseNtupleManager.cc
|
||||
G4BaseRNtupleManager.cc
|
||||
G4AnalysisUtilities.cc
|
||||
G4BinScheme.cc
|
||||
G4Fcn.cc
|
||||
G4AnalysisMessengerHelper.cc
|
||||
G4FileMessenger.cc
|
||||
G4H1Messenger.cc
|
||||
G4H2Messenger.cc
|
||||
G4H3Messenger.cc
|
||||
G4P1Messenger.cc
|
||||
G4P2Messenger.cc
|
||||
G4NtupleMessenger.cc
|
||||
G4HnManager.cc
|
||||
G4HnMessenger.cc
|
||||
G4PlotManager.cc
|
||||
G4PlotMessenger.cc
|
||||
G4PlotParameters.cc
|
||||
G4VAnalysisManager.cc
|
||||
G4VAnalysisReader.cc
|
||||
G4VFileManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${G4analysismng_LINK_LIBRARIES}
|
||||
geant4_define_module(NAME G4analysismng
|
||||
HEADERS
|
||||
G4AnalysisVerbose.hh
|
||||
G4AnalysisManagerState.hh
|
||||
G4AnalysisMessenger.hh
|
||||
G4AnalysisUtilities.hh
|
||||
G4BaseAnalysisManager.hh
|
||||
G4BaseFileManager.hh
|
||||
G4BaseNtupleManager.hh
|
||||
G4BaseRNtupleManager.hh
|
||||
G4BinScheme.hh
|
||||
G4Fcn.hh
|
||||
G4AnalysisMessengerHelper.hh
|
||||
G4FileMessenger.hh
|
||||
G4H1Messenger.hh
|
||||
G4H2Messenger.hh
|
||||
G4H3Messenger.hh
|
||||
G4P1Messenger.hh
|
||||
G4P2Messenger.hh
|
||||
G4NtupleMessenger.hh
|
||||
G4HnInformation.hh
|
||||
G4HnManager.hh
|
||||
G4HnMessenger.hh
|
||||
G4PlotManager.hh
|
||||
G4PlotMessenger.hh
|
||||
G4PlotParameters.hh
|
||||
G4THnManager.hh
|
||||
G4THnManager.icc
|
||||
G4TNtupleDescription.hh
|
||||
G4TNtupleManager.hh
|
||||
G4TNtupleManager.icc
|
||||
G4TRNtupleDescription.hh
|
||||
G4TRNtupleManager.hh
|
||||
G4TRNtupleManager.icc
|
||||
G4VAnalysisManager.hh
|
||||
G4VAnalysisManager.icc
|
||||
G4VAnalysisReader.hh
|
||||
G4VAnalysisReader.icc
|
||||
G4VFileManager.hh
|
||||
G4VH1Manager.hh
|
||||
G4VH2Manager.hh
|
||||
G4VH3Manager.hh
|
||||
G4VNtupleManager.hh
|
||||
G4VP1Manager.hh
|
||||
G4VP2Manager.hh
|
||||
G4VRNtupleManager.hh
|
||||
SOURCES
|
||||
G4AnalysisVerbose.cc
|
||||
G4AnalysisManagerState.cc
|
||||
G4AnalysisMessenger.cc
|
||||
G4BaseAnalysisManager.cc
|
||||
G4BaseFileManager.cc
|
||||
G4BaseNtupleManager.cc
|
||||
G4BaseRNtupleManager.cc
|
||||
G4AnalysisUtilities.cc
|
||||
G4BinScheme.cc
|
||||
G4Fcn.cc
|
||||
G4AnalysisMessengerHelper.cc
|
||||
G4FileMessenger.cc
|
||||
G4H1Messenger.cc
|
||||
G4H2Messenger.cc
|
||||
G4H3Messenger.cc
|
||||
G4P1Messenger.cc
|
||||
G4P2Messenger.cc
|
||||
G4NtupleMessenger.cc
|
||||
G4HnManager.cc
|
||||
G4HnMessenger.cc
|
||||
G4PlotManager.cc
|
||||
G4PlotMessenger.cc
|
||||
G4PlotParameters.cc
|
||||
G4VAnalysisManager.cc
|
||||
G4VAnalysisReader.cc
|
||||
G4VFileManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${G4analysismng_LINK_LIBRARIES}
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4root
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,69 +1,45 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4csv
|
||||
# Module : G4root
|
||||
# Package: Geant4.src.G4analysis.G4root
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${ZLIB_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/hntools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4root
|
||||
HEADERS
|
||||
G4RootAnalysisManager.hh
|
||||
G4RootAnalysisManager.icc
|
||||
G4RootAnalysisReader.hh
|
||||
G4RootAnalysisReader.icc
|
||||
G4RootFileManager.hh
|
||||
G4RootMainNtupleManager.hh
|
||||
G4RootNtupleManager.hh
|
||||
G4RootPNtupleDescription.hh
|
||||
G4RootPNtupleManager.hh
|
||||
G4RootRFileManager.hh
|
||||
G4RootRNtupleManager.hh
|
||||
g4root_defs.hh
|
||||
g4root.hh
|
||||
SOURCES
|
||||
G4RootAnalysisManager.cc
|
||||
G4RootAnalysisReader.cc
|
||||
G4RootFileManager.cc
|
||||
G4RootMainNtupleManager.cc
|
||||
G4RootNtupleManager.cc
|
||||
G4RootPNtupleManager.cc
|
||||
G4RootRFileManager.cc
|
||||
G4RootRNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${ZLIB_LIBRARIES}
|
||||
geant4_define_module(NAME G4root
|
||||
HEADERS
|
||||
G4RootAnalysisManager.hh
|
||||
G4RootAnalysisManager.icc
|
||||
G4RootAnalysisReader.hh
|
||||
G4RootAnalysisReader.icc
|
||||
G4RootFileManager.hh
|
||||
G4RootMainNtupleManager.hh
|
||||
G4RootNtupleManager.hh
|
||||
G4RootPNtupleDescription.hh
|
||||
G4RootPNtupleManager.hh
|
||||
G4RootRFileManager.hh
|
||||
G4RootRNtupleManager.hh
|
||||
g4root_defs.hh
|
||||
g4root.hh
|
||||
SOURCES
|
||||
G4RootAnalysisManager.cc
|
||||
G4RootAnalysisReader.cc
|
||||
G4RootFileManager.cc
|
||||
G4RootMainNtupleManager.cc
|
||||
G4RootNtupleManager.cc
|
||||
G4RootPNtupleManager.cc
|
||||
G4RootRFileManager.cc
|
||||
G4RootRNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${ZLIB_LIBRARIES}
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -399,8 +399,9 @@ G4bool G4RootPNtupleManager::Merge()
|
||||
for ( auto ntupleDescription : fNtupleDescriptionVector) {
|
||||
|
||||
// skip inactivated ntuples
|
||||
if ( ! ntupleDescription->fActivation ) continue;
|
||||
|
||||
if(!ntupleDescription->fActivation || !ntupleDescription->fNtuple)
|
||||
continue;
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ( fState.GetVerboseL4() ) {
|
||||
fState.GetVerboseL4()
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4analysis
|
||||
# Package: Geant4.src.G4analysis.G4xml
|
||||
#
|
||||
# CMakeLists.txt for building a single granular library.
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
include(Geant4MacroLibraryTargets)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
endif()
|
||||
|
||||
@@ -1,63 +1,41 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4csv
|
||||
# Module : G4xml
|
||||
# Package: Geant4.src.G4analysis.G4xml
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 15/07/2013
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${EXPAT_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/g4tools/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/analysis/hntools/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4xml
|
||||
HEADERS
|
||||
G4XmlAnalysisManager.hh
|
||||
G4XmlAnalysisManager.icc
|
||||
G4XmlAnalysisReader.hh
|
||||
G4XmlAnalysisReader.icc
|
||||
G4XmlFileManager.hh
|
||||
G4XmlNtupleManager.hh
|
||||
G4XmlRFileManager.hh
|
||||
G4XmlRNtupleManager.hh
|
||||
g4xml_defs.hh
|
||||
g4xml.hh
|
||||
SOURCES
|
||||
G4XmlAnalysisManager.cc
|
||||
G4XmlAnalysisReader.cc
|
||||
G4XmlFileManager.cc
|
||||
G4XmlNtupleManager.cc
|
||||
G4XmlRFileManager.cc
|
||||
G4XmlRNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${EXPAT_LIBRARIES}
|
||||
geant4_define_module(NAME G4xml
|
||||
HEADERS
|
||||
G4XmlAnalysisManager.hh
|
||||
G4XmlAnalysisManager.icc
|
||||
G4XmlAnalysisReader.hh
|
||||
G4XmlAnalysisReader.icc
|
||||
G4XmlFileManager.hh
|
||||
G4XmlNtupleManager.hh
|
||||
G4XmlRFileManager.hh
|
||||
G4XmlRNtupleManager.hh
|
||||
g4xml_defs.hh
|
||||
g4xml.hh
|
||||
SOURCES
|
||||
G4XmlAnalysisManager.cc
|
||||
G4XmlAnalysisReader.cc
|
||||
G4XmlFileManager.cc
|
||||
G4XmlNtupleManager.cc
|
||||
G4XmlRFileManager.cc
|
||||
G4XmlRNtupleManager.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4globman
|
||||
G4intercoms
|
||||
G4analysismng
|
||||
G4hntools
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4global
|
||||
G4intercoms
|
||||
LINK_LIBRARIES
|
||||
${EXPAT_LIBRARIES}
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
Reference in New Issue
Block a user