Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
IPNL_GAMMA
gammaware
Commits
c6ba9341
Commit
c6ba9341
authored
Apr 05, 2019
by
Jérémie Dudouet
Browse files
Merge branch 'preprod' into 'master'
Preprod, including last Cubix developments See merge request
!35
parents
67041426
e65bfbb3
Pipeline
#27225
passed with stage
in 3 minutes and 28 seconds
Changes
30
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
389 additions
and
314 deletions
+389
-314
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
CMakeLists.txt
CMakeLists.txt
+9
-26
src/deprecated/CMakeLists.txt
src/deprecated/CMakeLists.txt
+4
-13
src/dev/CMakeLists.txt
src/dev/CMakeLists.txt
+1
-11
src/dev/RMTEmulator.h
src/dev/RMTEmulator.h
+1
-0
src/root/CMakeLists.txt
src/root/CMakeLists.txt
+7
-1
src/root/ILL/CMakeLists.txt
src/root/ILL/CMakeLists.txt
+3
-13
src/root/adfe/CMakeLists.txt
src/root/adfe/CMakeLists.txt
+4
-12
src/root/core/CMakeLists.txt
src/root/core/CMakeLists.txt
+3
-14
src/root/gem/BaseGEM.cpp
src/root/gem/BaseGEM.cpp
+2
-0
src/root/gem/CMakeLists.txt
src/root/gem/CMakeLists.txt
+9
-26
src/root/gui/CMakeLists.txt
src/root/gui/CMakeLists.txt
+1
-6
src/root/gui/cubix/CMakeLists.txt
src/root/gui/cubix/CMakeLists.txt
+2
-2
src/root/gui/cubix/src/CXFileList.cpp
src/root/gui/cubix/src/CXFileList.cpp
+76
-90
src/root/gui/cubix/src/CXFileList.h
src/root/gui/cubix/src/CXFileList.h
+5
-2
src/root/gui/cubix/src/CXGammaSearch.cpp
src/root/gui/cubix/src/CXGammaSearch.cpp
+121
-17
src/root/gui/cubix/src/CXGammaSearch.h
src/root/gui/cubix/src/CXGammaSearch.h
+1
-1
src/root/gui/cubix/src/CXGateBox.cpp
src/root/gui/cubix/src/CXGateBox.cpp
+15
-1
src/root/gui/cubix/src/CXGateBox.h
src/root/gui/cubix/src/CXGateBox.h
+4
-0
src/root/gui/cubix/src/CXHist1DPlayer.cpp
src/root/gui/cubix/src/CXHist1DPlayer.cpp
+119
-77
No files found.
.gitlab-ci.yml
View file @
c6ba9341
...
...
@@ -18,7 +18,7 @@ compile:
-
mv gammaware adf
-
cd ..
-
echo "Compilation of ADF..."
-
python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=
d
ebug -- -j 4" --adf= conf compile install
-
python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=
D
ebug -- -j 4" --adf= conf compile install
-
cd LYON
-
cp -r ../../gammaware/ .
-
mv gammaware gw
...
...
@@ -28,7 +28,7 @@ compile:
-
export LD_LIBRARY_PATH=$ROOTSYS/lib/:$LD_LIBRARY_PATH
-
echo "Compilation with ROOT..."
-
echo $PWD
-
python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=
d
ebug -- -j 4" --gw= conf compile install
-
python scripts/gRaySoftware.py --cmake="-DCMAKE_BUILD_TYPE=
D
ebug -- -j 4" --gw= conf compile install
-
cd LYON/gw/
-
mkdir -p cppcheck_output
-
cppcheck --xml --xml-version=2 --enable=style,performance,portability,unusedFunction -i config -i debug -i cmake -i demos -i doc -i doxyfiles -i icons -i macros -i ndb -i scripts . 2> cppcheck_output/output.xml
...
...
CMakeLists.txt
View file @
c6ba9341
...
...
@@ -79,19 +79,12 @@ STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_
STRING
(
REGEX REPLACE
"^[0-9]+
\\
.([0-9][0-9])+
\\
/[0-9][0-9]+.*"
"
\\
1"
found_root_minor_vers
"
${
ROOTVERSION
}
"
)
STRING
(
REGEX REPLACE
"^[0-9]+
\\
.[0-9][0-9]+
\\
/([0-9][0-9]+).*"
"
\\
1"
found_root_patch_vers
"
${
ROOTVERSION
}
"
)
IF
(
found_root_major_vers LESS 5
)
MESSAGE
(
FATAL_ERROR
"Invalid ROOT version
\"
${
ROOTERSION
}
\"
, at least major version 4 is required, e.g.
\"
5.00/00
\"
"
)
ENDIF
(
found_root_major_vers LESS 5
)
#
SET
(
RDICTIONNARY 0
)
IF
(
found_root_major_vers LESS 6
)
include
(
Root5NewMacros
)
MESSAGE
(
"[Gw] Dictionary Build using ROOTCINT"
)
ELSE
(
found_root_major_vers LESS 6
)
include
(
Root6NewMacros
)
SET
(
RDICTIONNARY 1
)
MESSAGE
(
"[Gw] Dictionary Build using ROOTCLING "
)
ENDIF
(
found_root_major_vers LESS 6
)
MESSAGE
(
FATAL_ERROR
"Invalid ROOT version
\"
${
ROOTERSION
}
\"
, at least major version 6 is required, e.g.
\"
6.00/00
\"
"
)
ENDIF
(
found_root_major_vers LESS 6
)
#
include
(
Root6NewMacros
)
MESSAGE
(
"[Gw] Dictionary Build using ROOTCLING "
)
#
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-uninitialized -Wno-unused-function -Wno-unused-result -Wno-unused-variable -Wno-overloaded-virtual -Wno-switch"
)
...
...
@@ -100,7 +93,6 @@ MESSAGE("[GW from ROOT] C Compiler ${CMAKE_C_COMPILER}")
MESSAGE
(
"[GW from ROOT] C++ Compiler
${
CMAKE_CXX_COMPILER
}
"
)
MESSAGE
(
"[GW from ROOT] Compiler Flags:
${
CMAKE_CXX_FLAGS
}
"
)
#----------------------------------------------------------------------------
# configuration for all modules
#
...
...
@@ -144,26 +136,17 @@ endif()
option
(
DO_DEV
"If ON, the GWDEV library is also built"
OFF
)
option
(
DO_ILL
"If ON, the GWILL library is also built"
OFF
)
#
add_subdirectory
(
src/root/core
)
add_subdirectory
(
src/root/physics
)
add_subdirectory
(
src/root/tools
)
add_subdirectory
(
src/system
)
add_subdirectory
(
src/root/gem
)
add_subdirectory
(
src/adf
)
add_subdirectory
(
src/root/adfe
)
add_subdirectory
(
src/system
)
add_subdirectory
(
src/root
)
add_subdirectory
(
src/deprecated
)
add_subdirectory
(
src/root/gui
)
#
if
(
DO_DEV
)
add_subdirectory
(
src/dev
)
endif
()
#set ( DO_ILL true )
if
(
DO_ILL
)
add_subdirectory
(
src/root/ILL
)
endif
()
#----------------------------------------------------------------------------
# Global configure/install/copies
#
...
...
src/deprecated/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -52,16 +52,9 @@ endforeach()
#
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies
#
if
(
RDICTIONNARY EQUAL 1
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Gui
)
# MESSAGE("[GW-CLING]")
else
()
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist Gui
)
# MESSAGE("[GW-CINT]")
endif
()
set
(
EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWADFE GWPHYSICS GWTOOLS GWGEM GWSYSTEM
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_INTERNAL_LIBRARIES GWCORE
)
#
foreach
(
f
${
without_dictionnaries
}
)
...
...
@@ -105,9 +98,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
#
install
(
FILES
${
headers
}
DESTINATION
${
GW_INCLUDE_DIR
}
COMPONENT headers
)
if
(
with_dictionnaries
)
if
(
RDICTIONNARY EQUAL 1
)
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
_rdict.pcm DESTINATION lib COMPONENT libraries
)
endif
()
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
.rootmap DESTINATION lib COMPONENT libraries
)
endif
()
...
...
src/dev/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -59,15 +59,7 @@ endforeach()
#
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies
#
if
(
RDICTIONNARY EQUAL 1
)
# ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} MODULE ${GWLIBNAME} LINKDEF LinkDef.h OPTIONS "")
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Thread Gpad
)
# MESSAGE("[GW-CLING]")
else
()
# ROOT_GENERATE_DICTIONARY(G__${GWLIBNAME} ${headers} LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/LinkDef.h)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist Thread Gpad
)
# MESSAGE("[GW-CINT]")
endif
()
set
(
EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWADFE GWPHYSICS GWTOOLS GWGEM GWSYSTEM GWDEPRECATED
)
...
...
@@ -106,9 +98,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
#
install
(
FILES
${
headers
}
DESTINATION
${
GW_INCLUDE_DIR
}
COMPONENT headers
)
if
(
with_dictionnaries
)
if
(
RDICTIONNARY EQUAL 1
)
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
_rdict.pcm DESTINATION lib COMPONENT libraries
)
endif
()
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
.rootmap DESTINATION lib COMPONENT libraries
)
endif
()
...
...
src/dev/RMTEmulator.h
View file @
c6ba9341
...
...
@@ -27,6 +27,7 @@
#include "TMath.h"
#include "TThread.h"
#include "TMutex.h"
using
namespace
ADF
;
...
...
src/root/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -5,10 +5,16 @@
#----------------------------------------------------------------------------
# Add modules
#
add_subdirectory
(
adfe
)
add_subdirectory
(
core
)
add_subdirectory
(
physics
)
add_subdirectory
(
tools
)
add_subdirectory
(
gem
)
add_subdirectory
(
gui
)
#set ( DO_ILL true )
if
(
DO_ILL
)
add_subdirectory
(
ILL
)
endif
()
src/root/ILL/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -54,16 +54,8 @@ endforeach()
#
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies
#
if
(
RDICTIONNARY EQUAL 1
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore Gpad Hist Tree RIO Thread Net
)
# MESSAGE("[GW-CLING]")
else
()
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore Gpad Hist Tree RIO Thread Net
)
# MESSAGE("[GW-CINT]")
endif
()
set
(
EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWPHYSICS
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_INTERNAL_LIBRARIES GWADF
)
#
foreach
(
f
${
without_dictionnaries
}
)
...
...
@@ -109,9 +101,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
#
install
(
FILES
${
headers
}
DESTINATION
${
GW_INCLUDE_DIR
}
COMPONENT headers
)
if
(
with_dictionnaries
)
if
(
RDICTIONNARY EQUAL 1
)
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
_rdict.pcm DESTINATION lib COMPONENT libraries
)
endif
()
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
.rootmap DESTINATION lib COMPONENT libraries
)
endif
()
...
...
src/root/adfe/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -59,15 +59,9 @@ endforeach()
#
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies
#
if
(
RDICTIONNARY EQUAL 1
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore Gpad Hist Tree RIO Thread Net TreePlayer
)
# MESSAGE("[GW-CLING]")
else
()
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore Gpad Hist Tree RIO Thread Net TreePlayer
)
# MESSAGE("[GW-CINT]")
endif
()
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_EXTERNAL_LIBRARIES Thread Net TreePlayer
)
set
(
EXTRA_INTERNAL_LIBRARIES GWCORE GWADF GWPHYSICS
)
#
...
...
@@ -113,9 +107,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
#
install
(
FILES
${
headers
}
DESTINATION
${
GW_INCLUDE_DIR
}
COMPONENT headers
)
if
(
with_dictionnaries
)
if
(
RDICTIONNARY EQUAL 1
)
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
_rdict.pcm DESTINATION lib COMPONENT libraries
)
endif
()
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
.rootmap DESTINATION lib COMPONENT libraries
)
endif
()
...
...
src/root/core/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -77,17 +77,8 @@ endforeach()
#
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies
#
if
(
RDICTIONNARY EQUAL 1
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Gui
)
# MESSAGE("[GW-CLING]")
else
()
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Cint Graf MathCore XMLParser Hist Gui
)
# MESSAGE("[GW-CINT]")
endif
()
set
(
EXTRA_INTERNAL_LIBRARIES GWCORE
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Gui
)
#
foreach
(
f
${
without_dictionnaries
}
)
set
(
sources
${
sources
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
f
}
.cpp
)
...
...
@@ -133,9 +124,7 @@ install(TARGETS ${GWLIBNAME}
#
install
(
FILES
${
headers
}
DESTINATION
${
GW_INCLUDE_DIR
}
COMPONENT headers
)
if
(
with_dictionnaries
)
if
(
RDICTIONNARY EQUAL 1
)
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
_rdict.pcm DESTINATION lib COMPONENT libraries
)
endif
()
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
.rootmap DESTINATION lib COMPONENT libraries
)
endif
()
...
...
src/root/gem/BaseGEM.cpp
View file @
c6ba9341
...
...
@@ -123,6 +123,7 @@ namespace { // anonymous namespace for specifics to Angular Distribution. Hidden
return
result
;
}
// ROOT suitable function to draw angular distribution up to order 4.
#ifdef R__HAS_MATHMORE
Double_t
Wth
(
Double_t
*
x
,
Double_t
*
par
)
{
Double_t
p2
,
p4
;
...
...
@@ -131,6 +132,7 @@ namespace { // anonymous namespace for specifics to Angular Distribution. Hidden
return
par
[
0
]
+
par
[
1
]
*
p2
+
par
[
2
]
*
p4
;
}
#endif
Double_t
WthDeg
(
Double_t
*
x
,
Double_t
*
par
)
{
Double_t
p2
,
p4
;
...
...
src/root/gem/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -57,30 +57,15 @@ endforeach()
#
# Dictionnary from one file only 'a la ROOT' + internal and external dependencies
#
if
(
RDICTIONNARY EQUAL 1
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
find_library
(
ISMATHMORE MathMore
)
if
(
NOT ISMATHMORE
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad
)
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
MODULE
${
GWLIBNAME
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h OPTIONS
""
)
find_library
(
ISMATHMORE MathMore PATHS $ENV{ROOTSYS}/lib
)
if
(
NOT ISMATHMORE
)
MESSAGE
(
"[GW-GEM] Compiled without MathMore"
)
else
()
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore MathMore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad
)
MESSAGE
(
"[GW-GEM] Compiled with MathMore"
)
endif
()
# MESSAGE("[GW-CLING]")
else
()
ROOT_GENERATE_DICTIONARY
(
G__
${
GWLIBNAME
}
${
headers
}
LINKDEF
${
CMAKE_CURRENT_SOURCE_DIR
}
/LinkDef.h
)
find_library
(
ISMATHMORE MathMore
)
if
(
NOT ISMATHMORE
)
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad
)
MESSAGE
(
"[GW-GEM] Compiled without MathMore"
)
else
()
set
(
EXTRA_EXTERNAL_LIBRARIES Core Graf MathCore MathMore XMLParser Hist Physics Gui Spectrum Tree RIO Gpad
)
else
()
set
(
EXTRA_EXTERNAL_LIBRARIES MathMore
)
MESSAGE
(
"[GW-GEM] Compiled with MathMore"
)
endif
()
# MESSAGE("[GW-CINT]")
endif
()
set
(
EXTRA_INTERNAL_LIBRARIES
GWCORE GWPHYSICS
GWTOOLS GWSYSTEM
)
set
(
EXTRA_INTERNAL_LIBRARIES GWTOOLS GWSYSTEM
)
#
foreach
(
f
${
without_dictionnaries
}
)
...
...
@@ -124,9 +109,7 @@ install(TARGETS ${GWLIBNAME} RUNTIME DESTINATION bin
#
install
(
FILES
${
headers
}
DESTINATION
${
GW_INCLUDE_DIR
}
COMPONENT headers
)
if
(
with_dictionnaries
)
if
(
RDICTIONNARY EQUAL 1
)
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
_rdict.pcm DESTINATION lib COMPONENT libraries
)
endif
()
install
(
FILES
${
CMAKE_LIBRARY_OUTPUT_DIRECTORY
}
/lib
${
GWLIBNAME
}
.rootmap DESTINATION lib COMPONENT libraries
)
endif
()
...
...
src/root/gui/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -5,12 +5,7 @@
#----------------------------------------------------------------------------
# Add modules
#
if
(
found_root_major_vers LESS 6
)
MESSAGE
(
"ERROR: Invalid ROOT version
\"
${
ROOTERSION
}
\"
, at least major version 6 is required for Cubix, e.g.
\"
6.00/00
\"
"
)
MESSAGE
(
"[GW] !!! Cubix ignored"
)
else
()
add_subdirectory
(
cubix
)
endif
(
found_root_major_vers LESS 6
)
add_subdirectory
(
cubix
)
...
...
src/root/gui/cubix/CMakeLists.txt
View file @
c6ba9341
...
...
@@ -38,10 +38,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wno-unused-paramete
# root
INCLUDE_DIRECTORIES
(
${
ROOT_INCLUDE_DIR
}
)
LINK_DIRECTORIES
(
${
ROOT_LIBRARY_DIR
}
)
SET
(
EXTRA_EXTERNAL_LIBRARIES
${
EXTRA_EXTERNAL_LIBRARIES
}
Core MathCore Hist Gui Gpad Graf RIO Matrix Physics Thread MultiProc Spectrum
)
SET
(
EXTRA_EXTERNAL_LIBRARIES
${
EXTRA_EXTERNAL_LIBRARIES
}
Matrix
)
# gw
set
(
EXTRA_INTERNAL_LIBRARIES GW
CORE GWPHYSICS GWTOOLS GWSYSTEM
)
set
(
EXTRA_INTERNAL_LIBRARIES GW
PHYSICS
)
####################
### define files ###
...
...
src/root/gui/cubix/src/CXFileList.cpp
View file @
c6ba9341
...
...
@@ -18,6 +18,7 @@
#include "TGListTree.h"
#include "TClass.h"
#include "TCanvas.h"
#include "TCutG.h"
using
namespace
std
;
...
...
@@ -59,7 +60,7 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
fMenu
->
AddEntry
(
"Lar&ge Icons"
,
kLVLargeIcons
);
fMenu
->
AddEntry
(
"S&mall Icons"
,
kLVSmallIcons
);
fMenu
->
AddEntry
(
"&List"
,
kLVList
);
// fMenu->AddEntry("&Details", kLVDetails);
// fMenu->AddEntry("&Details", kLVDetails);
fMenu
->
Connect
(
"Activated(Int_t)"
,
"CXFileList"
,
this
,
"DoMenu(Int_t)"
);
TGHorizontalFrame
*
h3
=
new
TGHorizontalFrame
(
fv2
,
10
,
10
);
...
...
@@ -91,7 +92,7 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
Resize
();
DoMenu
(
kLV
SmallIcons
);
DoMenu
(
kLV
List
);
}
void
CXFileList
::
DoubleClicked
(
TGListTreeItem
*
item
,
Int_t
a_int
)
...
...
@@ -99,28 +100,22 @@ void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int)
TGListTree
*
sender
=
(
TGListTree
*
)
gTQSender
;
const
TGWindow
*
parent
=
sender
->
GetParent
()
->
GetParent
()
->
GetParent
();
if
(
parent
==
fBrowser
)
{
if
(
parent
==
fBrowser
){
TObject
*
obj
=
(
TObject
*
)
item
->
GetUserData
();
if
(
obj
)
{
if
(
obj
){
obj
->
IsA
()
->
SetName
(
""
);
TString
filename
=
fBrowser
->
FullPathName
(
item
);
if
(
gSystem
->
IsFileInIncludePath
(
filename
)
&&
filename
.
EndsWith
(
".root"
))
{
DisplayFile
(
filename
);
}
}
}
}
CXFileList
::~
CXFileList
()
{
// Cleanup.
delete
fContents
;
fMain
->
DeleteWindow
();
// deletes fMain
...
...
@@ -130,15 +125,21 @@ CXFileList::~CXFileList()
void
CXFileList
::
DoMenu
(
Int_t
mode
)
{
// Switch view mode.
if
(
mode
<
10
)
{
if
(
mode
<
10
)
fContents
->
SetViewMode
((
EListViewMode
)
mode
);
}
else
{
else
delete
this
;
}
}
void
CXFileList
::
DisplayFile
(
const
TString
&
fname
)
{
//Close the last opened file
if
(
fCurrentFile
){
fCurrentFile
->
Close
();
fCurrentFile
=
nullptr
;
fFolders
.
clear
();
}
// Display content of ROOT file.
TFile
*
file
=
TFile
::
Open
(
fname
);
fContents
->
RemoveAll
();
...
...
@@ -155,7 +156,7 @@ void CXFileList::DisplayFile(const TString &fname)
TGLVEntry
*
entry
=
new
TGLVEntry
(
fContents
,
name
,
cname
);
entry
->
SetSubnames
(
key
->
GetTitle
());
if
(
cname
==
"TList"
)
if
(
cname
==
"TList"
||
cname
==
"TDirectoryFile"
)
entry
->
SetPictures
(
gClient
->
GetPicture
(
"folder_s.xpm"
),
gClient
->
GetPicture
(
"folder_t.xpm"
));
if
(
cname
==
"TCutG"
)
entry
->
SetPictures
(
gClient
->
GetPicture
(
"bld_cut.png"
),
gClient
->
GetPicture
(
"bld_cut.png"
));
...
...
@@ -168,49 +169,53 @@ void CXFileList::DisplayFile(const TString &fname)
entry
->
SetUserData
((
void
*
)
StrDup
(
fname
));
}
fMain
->
Resize
();
fParent
=
file
;
if
(
fParentFile
&&
file
!=
fParentFile
){
fParentFile
->
Close
();
}
fParentFile
=
file
;
fCurrentFile
=
file
;
fFolders
.
push_back
(
file
);
}
void
CXFileList
::
DisplayList
(
TList
*
list
)
{
// Display content of ROOT file.
TString
Name
=
fParentFile
->
GetName
();
TString
Name
=
fCurrentFile
->
GetName
();
TObjArray
*
arr
=
Name
.
Tokenize
(
"/"
);
Name
=
arr
->
Last
()
->
GetName
();
delete
arr
;
TGLVEntry
*
entry
=
new
TGLVEntry
(
fContents
,
Name
,
fParentFile
->
ClassName
());
entry
->
SetUserData
((
void
*
)
StrDup
(
fParentFile
->
GetName
()));
fContents
->
RemoveAll
();
// fContents->AddFile(gSystem->WorkingDirectory());
fContents
->
AddItem
(
entry
);
fContents
->
SetPagePosition
(
0
,
0
);
// fContents->SetColHeaders("Name","Title");
// fContents->SetColHeaders("Name","Title");
TObject
*
Folder
=
fFolders
.
back
();
TGLVEntry
*
entry
=
nullptr
;
if
(
fFolders
.
size
()
>
1
){
entry
=
new
TGLVEntry
(
fContents
,
".."
,
Folder
->
ClassName
());
entry
->
SetUserData
((
void
*
)
StrDup
(
Folder
->
GetName
()));
entry
->
SetPictures
(
gClient
->
GetPicture
(
"folder_s.xpm"
),
gClient
->
GetPicture
(
"folder_t.xpm"
));
fContents
->
AddItem
(
entry
);
}
TIter
next
(
list
);
TObject
*
key
;
while
((
key
=
(
TObject
*
)
next
()))
{
if
(
Folder
->
InheritsFrom
(
TDirectoryFile
::
Class_Name
())){
key
=
((
TDirectoryFile
*
)
Folder
)
->
Get
(
key
->
GetName
());
}
TString
cname
=
key
->
ClassName
();
TString
name
=
key
->
GetName
();
TGLVEntry
*
entry
=
new
TGLVEntry
(
fContents
,
name
,
cname
);
entry
->
SetSubnames
(
key
->
GetTitle
());
fContents
->
AddItem
(
entry
);
if
(
cname
==
"
TList
"
)
if
(
cname
==
TList
::
Class_Name
()
||
cname
==
TDirectoryFile
::
Class_Name
()
)
entry
->
SetPictures
(
gClient
->
GetPicture
(
"folder_s.xpm"
),
gClient
->
GetPicture
(
"folder_t.xpm"
));
if
(
cname
==
"
TCutG
"
)
if
(
cname
==
TCutG
::
Class_Name
()
)
entry
->
SetPictures
(
gClient
->
GetPicture
(
"bld_cut.png"
),
gClient
->
GetPicture
(
"bld_cut.png"
));
if
(
cname
.
BeginsWith
(
"
TGraph
"
))
if
(
cname
.
BeginsWith
(
TGraph
::
Class_Name
()
))
entry
->
SetPictures
(
gClient
->
GetPicture
(
"graph.xpm"
),
gClient
->
GetPicture
(
"graph.xpm"
));
// user data is a filename
...
...
@@ -219,44 +224,34 @@ void CXFileList::DisplayList(TList *list)
fMain
->
Resize
();
}
void
CXFileList
::
DisplayDirectory
(
const
TString
&
fname
)
{
// Display content of directory.
fContents
->
SetDefaultHeaders
();
gSystem
->
ChangeDirectory
(
fname
);
fContents
->
ChangeDirectory
(
fname
);
fContents
->
DisplayDirectory
();
fContents
->
AddFile
(
".."
);
// up level directory
fContents
->
Sort
(
EFSSortMode
::
kSortByName
);
fMain
->
Resize
();
}
void
CXFileList
::
DisplayObject
(
const
TString
&
fname
,
const
TString
&
name
)
{
// Browse object located in file.
TDirectory
*
sav
=
gDirectory
;
TObject
*
obj
=
nullptr
;
TObject
*
CurrentFolder
=
fFolders
.
back
();
if
(
fParent
->
InheritsFrom
(
"TFile"
))
obj
=
fParentFile
->
Get
(
name
);
else
if
(
fParent
->
InheritsFrom
(
"TList"
))
obj
=
fParent
->
FindObject
(
name
);
if
(
name
==
".."
){
fFolders
.
pop_back
();
obj
=
fFolders
.
back
();
fFolders
.
pop_back
();
}
else
if
(
CurrentFolder
->
InheritsFrom
(
TList
::
Class_Name
()))
obj
=
((
TList
*
)
CurrentFolder
)
->
FindObject
(
name
);
else
if
(
CurrentFolder
->
InheritsFrom
(
TDirectoryFile
::
Class_Name
()))
obj
=
((
TDirectoryFile
*
)
CurrentFolder
)
->
Get
(
name
);
if
(
obj
==
nullptr
){
DisplayFile
(
f
Pa
rentFile
->
GetName
());
DisplayFile
(
f
Cur
rentFile
->
GetName
());
return
;
}
if
(
obj
)
{
if
(
!
obj
->
IsFolder
())
{
if
(
!
obj
->
IsFolder
()){
TString
CanvasName
=
fMainWindow
->
GetCanvas
()
->
GetName
();
if
(
CanvasName
.
BeginsWith
(
"GxG"
))
{
if
(
CanvasName
.
BeginsWith
(
"GxG"
)){
cout
<<
" cannot plot in a Tab dedicated to Gamma Gamma projections"
<<
endl
;
return
;
}
...
...
@@ -268,12 +263,10 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
if
(
gPad
&&
(
obj
->
InheritsFrom
(
"TH1"
)
||
obj
->
InheritsFrom
(
"TGraph"
)
||
obj
->
InheritsFrom
(
"TF1"
)))
{
||
obj
->
InheritsFrom
(
"TF1"
))){
obj
->
Draw
(
fBrowser
->
GetDrawOption
());
if
(
obj
->
InheritsFrom
(
"TH1"
))
{
if
(
obj
->
InheritsFrom
(
"TH1"
)){
TH1
*
hist
=
(
TH1
*
)
obj
;
hist
->
SetDirectory
(
nullptr
);
}
...
...
@@ -281,8 +274,7 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
gPad
->
Update
();
gPad
->
GetFrame
()
->
SetBit
(
TObject
::
kCannotPick
);
}
else
if
(
gPad
&&
obj
->
InheritsFrom
(
"TCanvas"
))
{
else
if
(
gPad
&&
obj
->
InheritsFrom
(
"TCanvas"
)){
TCanvas
*
canvas_in
=
(
TCanvas
*
)
obj
;
CXCanvas
*
canvas_out
=
fMainWindow
->
GetCanvas
();
canvas_out
->
cd
();
...
...
@@ -290,30 +282,27 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
Int_t
idraw
=
0
;
for
(
int
i
=
0
;
i
<
canvas_in
->
GetListOfPrimitives
()
->
GetEntries
()
;
i
++
)
{
for
(
int
i
=
0
;
i
<
canvas_in
->
GetListOfPrimitives
()
->
GetEntries
()
;
i
++
){
TObject
*
o
=
canvas_in
->
GetListOfPrimitives
()
->
At
(
i
);
if
(
idraw
==
0
)
{
if
(
idraw
==
0
){
idraw
++
;
if
(
o
->
InheritsFrom
(
"
TH2
"
))
if
(
o
->
InheritsFrom
(
TH2
::
Class_Name
()
))
o
->
Draw
(
"col"
);
else
if
(
o
->
InheritsFrom
(
"
TH1
"
))
else
if
(
o
->
InheritsFrom
(
TH1
::
Class_Name
()
))
o
->
Draw
(
"hist"
);
else
if
(
o
->
InheritsFrom
(
"
TGraph
"
))
else
if
(
o
->
InheritsFrom
(
TGraph
::
Class_Name
()
))