Import Geant4 10.3.0.beta source tree
This commit is contained in:
+29
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History 94599 2015-11-25 13:00:41Z gcosmo $
|
||||
$Id: History 97670 2016-06-07 08:22:37Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,34 @@ committal in the SVN repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
June 7, 2016 I. Hrivnacova (analysis-V10-02-05)
|
||||
- Updated to g4tools 1.27.4 (Guy Barrand):
|
||||
Fixed remaining Windows-64 compiler warnings.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
June 3, 2016 I. Hrivnacova (analysis-V10-02-04)
|
||||
- Updated to g4tools 1.27.3 (Guy Barrand):
|
||||
Fixed Windows-64 compiler warnings.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
May 25, 2016 I. Hrivnacova (analysis-V10-02-03)
|
||||
- Updated to g4tools 1.27.2 (Guy Barrand):
|
||||
Fixed Mac OSX compiler warnings.
|
||||
|
||||
May 4, 2016 I. Hrivnacova (analysis-V10-02-02)
|
||||
- Updated to g4tools 1.27.1 (Guy Barrand):
|
||||
Fixed gcc 6.1 compiler warnings.
|
||||
|
||||
April 18, 2016 I. Hrivnacova (analysis-V10-02-01)
|
||||
- Updated to g4tools 1.27.0 (Guy Barrand):
|
||||
Fixed incompatibility with ROOT 5.x and 6.x formats reported in ROOT forum:
|
||||
https://root.cern.ch/phpBB3/viewtopic.php?t=21315
|
||||
|
||||
December 8, 2015 I. Hrivnacova (analysis-V10-02-00)
|
||||
- Fixed definition of /analysis/ntuple command directory
|
||||
which was created implicitly with the commands and so
|
||||
defined without a guideline and not deleted
|
||||
|
||||
November 25, 2015 I. Hrivnacova (analysis-V10-01-47)
|
||||
- Adding GNUmakefile in parameters sub-category
|
||||
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
1.27.4 :
|
||||
- tools/value : Windows-64 : rm warnings when writing a void* in a string..
|
||||
|
||||
1.27.3 :
|
||||
- tools/typedefs, pointer, value.icc : Windows-64 : rm warnings when writing a void* in a string.
|
||||
- tools/wroot/ntuple : delete columns in destructor.
|
||||
|
||||
1.27.2 :
|
||||
- tools/glutess/render : static_RenderTriangle : (void)size; at end to fix a warning.
|
||||
|
||||
1.27.1 :
|
||||
- hls, sg/style_colormap : correct some g++-6 (pedantic) warnings.
|
||||
|
||||
1.27.0 : WARNING : change in the ROOT format for TTrees :
|
||||
- tools/wroot/basket constructor : enforce m_version += 1000. This has to be considered as a change in the ROOT/IO
|
||||
format (related to trees) compared to the one of CERN-ROOT/4.x that we followed up so fare. This change follows
|
||||
what is in CERN-ROOT/5.x/TBasket. It permits to produce files compatible with what CERN-ROOT/hadd program expects,
|
||||
and which does not work properly for CERN-ROOT/4.x/TBasket versioning logic. Here we must point out that this
|
||||
CERN-ROOT/hadd tool breaks some "golden rule" claiming that CERN-ROOT will "forever" handle old file format
|
||||
properly.
|
||||
|
||||
1.26.2 :
|
||||
- test/cpp/viewplot.cpp : more tests to check the sg::plotter nodes reset when producing more pages and files with
|
||||
the same viewer.
|
||||
|
||||
@@ -214,8 +214,6 @@ inline/*static*/ void static_RenderTriangle( GLUtesselator *tess, GLUhalfEdge *e
|
||||
*/
|
||||
assert( size == 1 );
|
||||
AddToTrail( e->Lface, tess->lonelyTriList );
|
||||
// the following line should suppress compiler warning about unused parameter 'size'
|
||||
// observed on MacOS/clang
|
||||
(void)size;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,15 @@ inline void hls_to_rgb(T hue,T light,T satur,T& a_r,T& a_g,T& a_b){
|
||||
|
||||
T rh, rl, rs, rm1, rm2;
|
||||
rh = rl = rs = 0;
|
||||
if (hue > 0) rh = hue; if (rh > 360) rh = 360;
|
||||
if (light > 0) rl = light; if (rl > 1) rl = 1;
|
||||
if (satur > 0) rs = satur; if (rs > 1) rs = 1;
|
||||
|
||||
if (hue > 0) rh = hue;
|
||||
if (rh > 360) rh = 360;
|
||||
|
||||
if (light > 0) rl = light;
|
||||
if (rl > 1) rl = 1;
|
||||
|
||||
if (satur > 0) rs = satur;
|
||||
if (rs > 1) rs = 1;
|
||||
|
||||
if (rl <= T(0.5)) {
|
||||
rm2 = rl*(1 + rs);
|
||||
@@ -53,9 +59,15 @@ inline void rgb_to_hls(T rr,T gg,T bb,T& hue,T& light,T& satur) {
|
||||
T rnorm, gnorm, bnorm, minval, maxval, msum, mdiff, cr, cg, cb;
|
||||
minval = maxval = 0;
|
||||
cr = cg = cb = 0;
|
||||
if (rr > 0) cr = rr; if (cr > 1) cr = 1;
|
||||
if (gg > 0) cg = gg; if (cg > 1) cg = 1;
|
||||
if (bb > 0) cb = bb; if (cb > 1) cb = 1;
|
||||
|
||||
if (rr > 0) cr = rr;
|
||||
if (cr > 1) cr = 1;
|
||||
|
||||
if (gg > 0) cg = gg;
|
||||
if (cg > 1) cg = 1;
|
||||
|
||||
if (bb > 0) cb = bb;
|
||||
if (cb > 1) cb = 1;
|
||||
|
||||
minval = cr;
|
||||
if (cg < minval) minval = cg;
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
#ifndef tools_pointer
|
||||
#define tools_pointer
|
||||
|
||||
//WARNING : touchy
|
||||
//WARNING : touchy.
|
||||
//WARNING : _MSC_VER && _WIN64 : sizeof(void*) is NOT sizeof(unsigned long).
|
||||
|
||||
#include "typedefs"
|
||||
|
||||
#include "snpf"
|
||||
|
||||
@@ -13,59 +16,29 @@
|
||||
namespace tools {
|
||||
|
||||
inline bool to_pointer(const std::string& a_string,void*& a_value){
|
||||
if(sizeof(unsigned long)==sizeof(void*)) { //majority of cases.
|
||||
unsigned long v = 0L;
|
||||
if(::sscanf(a_string.c_str(),"0x%lx",&v)!=1) {
|
||||
if(::sscanf(a_string.c_str(),"%lu",&v)!=1) {
|
||||
a_value = 0;
|
||||
return false;
|
||||
}
|
||||
upointer v = 0;
|
||||
if(::sscanf(a_string.c_str(),upointer_format_x(),&v)!=1) {
|
||||
if(::sscanf(a_string.c_str(),upointer_format(),&v)!=1) {
|
||||
a_value = 0;
|
||||
return false;
|
||||
}
|
||||
a_value = (void*)v;
|
||||
return true;
|
||||
} else if(sizeof(unsigned long long)==sizeof(void*)) { //but not on my Windows-8/64bits !
|
||||
unsigned long long v = 0L;
|
||||
if(::sscanf(a_string.c_str(),"0x%llx",&v)!=1) {
|
||||
if(::sscanf(a_string.c_str(),"%llu",&v)!=1) {
|
||||
a_value = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
a_value = (void*)v;
|
||||
return true;
|
||||
}
|
||||
a_value = 0;
|
||||
return false;
|
||||
a_value = (void*)v;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool p2s(const void* a_value,std::string& a_s){
|
||||
char s[512];
|
||||
if(sizeof(unsigned long)==sizeof(void*)) { //majority of cases.
|
||||
snpf(s,sizeof(s),"%lu",(unsigned long)a_value);
|
||||
a_s = s;
|
||||
return true;
|
||||
} else if(sizeof(unsigned long long)==sizeof(void*)) { //but not on my Windows-8/64bits !
|
||||
snpf(s,sizeof(s),"%llu",(unsigned long long)a_value);
|
||||
a_s = s;
|
||||
return true;
|
||||
}
|
||||
a_s.clear();
|
||||
return false;
|
||||
snpf(s,sizeof(s),upointer_format(),(upointer)a_value);
|
||||
a_s = s;
|
||||
return true;
|
||||
}
|
||||
|
||||
inline bool p2sx(const void* a_value,std::string& a_s){
|
||||
char s[512];
|
||||
if(sizeof(unsigned long)==sizeof(void*)) { //majority of cases.
|
||||
snpf(s,sizeof(s),"0x%lx",(unsigned long)a_value);
|
||||
a_s = s;
|
||||
return true;
|
||||
} else if(sizeof(unsigned long long)==sizeof(void*)) { //but not on my Windows-8/64bits !
|
||||
snpf(s,sizeof(s),"0x%llx",(unsigned long long)a_value);
|
||||
a_s = s;
|
||||
return true;
|
||||
}
|
||||
a_s.clear();
|
||||
return false;
|
||||
snpf(s,sizeof(s),upointer_format_x(),(upointer)a_value);
|
||||
a_s = s;
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -303,9 +303,15 @@ public:
|
||||
g = col.r();
|
||||
b = col.r();
|
||||
if (i == 1) { r = 0.6; g = 0.6; b = 0.6; }
|
||||
if (r == 1) r = 0.9; if (r == 0) r = 0.1;
|
||||
if (g == 1) g = 0.9; if (g == 0) g = 0.1;
|
||||
if (b == 1) b = 0.9; if (b == 0) b = 0.1;
|
||||
|
||||
if (r == 1) r = 0.9;
|
||||
if (r == 0) r = 0.1;
|
||||
|
||||
if (g == 1) g = 0.9;
|
||||
if (g == 0) g = 0.1;
|
||||
|
||||
if (b == 1) b = 0.9;
|
||||
if (b == 0) b = 0.1;
|
||||
|
||||
rgb_to_hls(r,g,b,h,l,s);
|
||||
|
||||
|
||||
@@ -31,6 +31,16 @@ typedef unsigned long long diff_pointer_t;
|
||||
typedef unsigned long diff_pointer_t;
|
||||
#endif
|
||||
|
||||
#ifdef _WIN64
|
||||
typedef unsigned long long upointer;
|
||||
inline const char* upointer_format() {static const char s[] = "%llu";return s;}
|
||||
inline const char* upointer_format_x() {static const char s[] = "0x%llx";return s;}
|
||||
#else
|
||||
typedef unsigned long upointer;
|
||||
inline const char* upointer_format() {static const char s[] = "%lu";return s;}
|
||||
inline const char* upointer_format_x() {static const char s[] = "0x%lx";return s;}
|
||||
#endif
|
||||
|
||||
#elif defined(_LP64)
|
||||
|
||||
// 64 Bit Platforms
|
||||
@@ -46,6 +56,10 @@ inline const char* uint64_format() {static const char s[] = "%lu";return s;}
|
||||
|
||||
typedef unsigned long diff_pointer_t;
|
||||
|
||||
typedef unsigned long upointer;
|
||||
inline const char* upointer_format() {static const char s[] = "%lu";return s;}
|
||||
inline const char* upointer_format_x() {static const char s[] = "0x%lx";return s;}
|
||||
|
||||
#else
|
||||
|
||||
// 32-Bit Platforms
|
||||
@@ -61,6 +75,10 @@ inline const char* uint64_format() {static const char s[] = "%llu";return s;}
|
||||
|
||||
typedef unsigned long diff_pointer_t;
|
||||
|
||||
typedef unsigned long upointer;
|
||||
inline const char* upointer_format() {static const char s[] = "%lu";return s;}
|
||||
inline const char* upointer_format_x() {static const char s[] = "0x%lx";return s;}
|
||||
|
||||
#endif
|
||||
|
||||
inline uint32 uint32_mx() { //4 294 967 295
|
||||
@@ -87,7 +105,7 @@ typedef char* cstr_t;
|
||||
typedef const char* const_cstr_t;
|
||||
|
||||
class fits_bit {public:char m_c;}; //for exlib/cfitsio
|
||||
class csv_time {public:long m_l;}; //for inlib/rcsv_ntuple
|
||||
class csv_time {public:long m_l;}; //for tools/rcsv_ntuple
|
||||
|
||||
inline unsigned int size_char() {return 1;}
|
||||
inline unsigned int size_short() {return 2;}
|
||||
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
mem::increment(s_class().c_str());\
|
||||
m_type = a_type;\
|
||||
std::vector<unsigned int> is(1);\
|
||||
is[0] = a_v.size();\
|
||||
is[0] = (unsigned int)a_v.size();\
|
||||
u.a_m_what = new tools::array<a_what>(is);\
|
||||
u.a_m_what->fill(a_v);\
|
||||
}
|
||||
@@ -221,7 +221,7 @@ public:
|
||||
value(const std::vector<a_what>& a_v){\
|
||||
m_type = a_type;\
|
||||
std::vector<unsigned int> is(1);\
|
||||
is[0] = a_v.size();\
|
||||
is[0] = (unsigned int)a_v.size();\
|
||||
u.a_m_what = new tools::array<a_what>(is);\
|
||||
u.a_m_what->fill(a_v);\
|
||||
}
|
||||
@@ -596,7 +596,7 @@ public:
|
||||
reset();\
|
||||
m_type = a_type;\
|
||||
std::vector<unsigned int> is(1);\
|
||||
is[0] = a_v.size();\
|
||||
is[0] = (unsigned int)a_v.size();\
|
||||
u.a_m_what = new tools::array<a_what>(is);\
|
||||
u.a_m_what->fill(a_v);\
|
||||
}
|
||||
@@ -684,49 +684,49 @@ public:
|
||||
tools::sprintf(a_s,5,"(nil)");
|
||||
return true;
|
||||
case INT:
|
||||
tools::sprintf(a_s,16,"%d",a_v.u.m_int);
|
||||
tools::sprintf(a_s,32,"%d",a_v.u.m_int);
|
||||
return true;
|
||||
case DOUBLE:
|
||||
tools::sprintf(a_s,16,"%g",a_v.u.m_double);
|
||||
tools::sprintf(a_s,32,"%g",a_v.u.m_double);
|
||||
return true;
|
||||
case VOID_STAR:
|
||||
tools::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_void_star);
|
||||
tools::sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_void_star);
|
||||
return true;
|
||||
case UNSIGNED_SHORT:
|
||||
tools::sprintf(a_s,16,"%u",a_v.u.m_unsigned_short);
|
||||
tools::sprintf(a_s,32,"%u",a_v.u.m_unsigned_short);
|
||||
return true;
|
||||
case UNSIGNED_INT:
|
||||
tools::sprintf(a_s,16,"%u",a_v.u.m_unsigned_int);
|
||||
tools::sprintf(a_s,32,"%u",a_v.u.m_unsigned_int);
|
||||
return true;
|
||||
case BOOL:
|
||||
tools::sprintf(a_s,5,"%s",a_v.u.m_bool?"true":"false");
|
||||
return true;
|
||||
case SHORT:
|
||||
tools::sprintf(a_s,16,"%d",a_v.u.m_short);
|
||||
tools::sprintf(a_s,32,"%d",a_v.u.m_short);
|
||||
return true;
|
||||
case INT64:
|
||||
tools::sprintf(a_s,16,tools::int64_format(),a_v.u.m_int64);
|
||||
tools::sprintf(a_s,32,tools::int64_format(),a_v.u.m_int64);
|
||||
return true;
|
||||
case UNSIGNED_INT64:
|
||||
tools::sprintf(a_s,16,tools::int64_format(),a_v.u.m_unsigned_int64);
|
||||
tools::sprintf(a_s,32,tools::int64_format(),a_v.u.m_unsigned_int64);
|
||||
return true;
|
||||
case FLOAT:
|
||||
tools::sprintf(a_s,16,"%g",a_v.u.m_float);
|
||||
tools::sprintf(a_s,32,"%g",a_v.u.m_float);
|
||||
return true;
|
||||
//case UNSIGNED_CHAR:
|
||||
// tools::sprintf(a_s,16,"%c",a_v.u.m_unsigned_char);
|
||||
// tools::sprintf(a_s,32,"%c",a_v.u.m_unsigned_char);
|
||||
// return true;
|
||||
//case CHAR:
|
||||
// tools::sprintf(a_s,16,"%c",a_v.u.m_char);
|
||||
// tools::sprintf(a_s,32,"%c",a_v.u.m_char);
|
||||
// return true;
|
||||
case DOUBLE_STAR:
|
||||
tools::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_double_star);
|
||||
tools::sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_double_star);
|
||||
return true;
|
||||
case FLOAT_STAR:
|
||||
tools::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_float_star);
|
||||
tools::sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_float_star);
|
||||
return true;
|
||||
case INT_STAR:
|
||||
tools::sprintf(a_s,16,"0x%lx",(unsigned long)a_v.u.m_int_star);
|
||||
tools::sprintf(a_s,32,upointer_format_x(),(upointer)a_v.u.m_int_star);
|
||||
return true;
|
||||
case STRING:
|
||||
a_s = *a_v.u.m_string;
|
||||
@@ -866,7 +866,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int array_size() const {
|
||||
size_t array_size() const {
|
||||
switch(m_type) {
|
||||
case INT:
|
||||
case DOUBLE:
|
||||
|
||||
@@ -340,8 +340,8 @@ inline bool value::minus(value& aThis,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) stdv[index] = -stdv[index];
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) stdv[index] = -stdv[index];
|
||||
return true;}
|
||||
//case value::CHAR:
|
||||
// aThis.u.m_char = -aThis.u.m_char;
|
||||
@@ -979,8 +979,8 @@ inline bool value::subtract(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
stdv[index] -= stdv2[index];
|
||||
}
|
||||
return true;}
|
||||
@@ -1279,8 +1279,8 @@ inline bool value::multiply(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
stdv[index] *= stdv2[index];
|
||||
}
|
||||
return true;}
|
||||
@@ -1695,8 +1695,8 @@ inline bool value::divide(value& aThis,const value& aV,std::string& aError){
|
||||
std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
|
||||
bool has_div_zero = false;
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv2[index]==0) {
|
||||
//FIXME : stdv[index] = nan;
|
||||
stdv[index] = 0; //PAW convention.
|
||||
@@ -1805,8 +1805,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_int<=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -1861,8 +1861,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_double<=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -1917,8 +1917,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_float<=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2032,8 +2032,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
switch(aV.m_type) {
|
||||
case value::INT:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]<=aV.u.m_int) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2044,8 +2044,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
case value::FLOAT:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]<=aV.u.m_float) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2056,8 +2056,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
case value::DOUBLE:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]<=aV.u.m_double) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2068,8 +2068,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
case value::UNSIGNED_INT:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]<=aV.u.m_unsigned_int ) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2082,8 +2082,8 @@ inline bool value::if_gt(value& aThis,const value& aV,std::string& aError){
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
const std::vector<double>& stdv2 = aV.u.m_array_double->vector();
|
||||
if(stdv.size()!=stdv2.size()) break;
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]<=stdv2[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2175,8 +2175,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_int!=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2233,8 +2233,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_float!=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2289,8 +2289,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_double!=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2435,8 +2435,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
return true;
|
||||
case value::ARRAY_DOUBLE:{
|
||||
const std::vector<double>& stdv = aV.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(aThis.u.m_unsigned_int !=stdv[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2513,8 +2513,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
switch(aV.m_type) {
|
||||
case value::INT:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]!=aV.u.m_int) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2525,8 +2525,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
case value::FLOAT:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]!=aV.u.m_float) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2537,8 +2537,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
case value::DOUBLE:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]!=aV.u.m_double) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2549,8 +2549,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
}
|
||||
case value::UNSIGNED_INT:{
|
||||
const std::vector<double>& stdv = aThis.u.m_array_double->vector();
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]!=aV.u.m_unsigned_int ) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -2566,8 +2566,8 @@ inline bool value::if_eq(value& aThis,const value& aV,std::string& aError){
|
||||
aThis.set(false);
|
||||
return true;
|
||||
}
|
||||
unsigned int number = stdv.size();
|
||||
for(unsigned int index=0;index<number;index++) {
|
||||
size_t number = stdv.size();
|
||||
for(size_t index=0;index<number;index++) {
|
||||
if(stdv[index]!=stdv2[index]) {
|
||||
aThis.set(false);
|
||||
return true;
|
||||
@@ -3102,7 +3102,7 @@ inline std::string value::to_string(const value& aThis){
|
||||
tools::sprintf(s,16,"%g",aThis.u.m_double);
|
||||
return s;
|
||||
case value::VOID_STAR:
|
||||
tools::sprintf(s,16,"0x%lx",(unsigned long)aThis.u.m_void_star);
|
||||
tools::sprintf(s,32,upointer_format_x(),(upointer)aThis.u.m_void_star);
|
||||
return s;
|
||||
case value::UNSIGNED_SHORT:
|
||||
tools::sprintf(s,16,"%u",aThis.u.m_unsigned_short);
|
||||
@@ -3132,13 +3132,13 @@ inline std::string value::to_string(const value& aThis){
|
||||
// tools::sprintf(s,16,"%c",aThis.u.m_char);
|
||||
// return s;
|
||||
case value::DOUBLE_STAR:
|
||||
tools::sprintf(s,16,"0x%lx",(unsigned long)aThis.u.m_double_star);
|
||||
tools::sprintf(s,32,upointer_format_x(),(upointer)aThis.u.m_double_star);
|
||||
return s;
|
||||
case value::FLOAT_STAR:
|
||||
tools::sprintf(s,16,"0x%lx",(unsigned long)aThis.u.m_float_star);
|
||||
tools::sprintf(s,32,upointer_format_x(),(upointer)aThis.u.m_float_star);
|
||||
return s;
|
||||
case value::INT_STAR:
|
||||
tools::sprintf(s,16,"0x%lx",(unsigned long)aThis.u.m_int_star);
|
||||
tools::sprintf(s,32,upointer_format_x(),(upointer)aThis.u.m_int_star);
|
||||
return s;
|
||||
case value::STRING:
|
||||
return *aThis.u.m_string;
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#define tools_version
|
||||
|
||||
#define TOOLS_MAJOR_VERSION 1
|
||||
#define TOOLS_MINOR_VERSION 26
|
||||
#define TOOLS_PATCH_VERSION 2
|
||||
#define TOOLS_VERSION "1.26.2"
|
||||
#define TOOLS_VERSION_VRP "v1r26p2"
|
||||
#define TOOLS_MINOR_VERSION 27
|
||||
#define TOOLS_PATCH_VERSION 4
|
||||
#define TOOLS_VERSION "1.27.4"
|
||||
#define TOOLS_VERSION_VRP "v1r27p4"
|
||||
|
||||
namespace tools {
|
||||
inline unsigned int version() {return 12602;}
|
||||
inline unsigned int version() {return 12704;}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -118,6 +118,13 @@ public:
|
||||
mem::increment(s_class().c_str());
|
||||
#endif
|
||||
|
||||
if(m_version>1000) {
|
||||
} else {
|
||||
// G.Barrand : April 2016 : WARNING : this is a change in the ROOT/IO format compared to CERN-ROOT/4.x :
|
||||
// We follow the logic found on CERN-ROOT/5.x that enforces "+1000" on all baskets.
|
||||
m_version += 1000;
|
||||
}
|
||||
|
||||
m_key_length = header_record_size(m_version);
|
||||
initialize(0);
|
||||
|
||||
|
||||
@@ -286,7 +286,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual ~ntuple() {}
|
||||
virtual ~ntuple() {
|
||||
tools::clear<icol>(m_cols);
|
||||
}
|
||||
protected:
|
||||
ntuple(const ntuple& a_from)
|
||||
:iobject(a_from),itree(a_from),tree(a_from)
|
||||
|
||||
@@ -57,6 +57,7 @@ class G4NtupleMessenger : public G4UImessenger
|
||||
|
||||
G4VAnalysisManager* fManager; ///< Associated class
|
||||
|
||||
std::unique_ptr<G4UIdirectory> fNtupleDir;
|
||||
std::unique_ptr<G4UIcommand> fSetActivationCmd;
|
||||
std::unique_ptr<G4UIcmdWithABool> fSetActivationAllCmd;
|
||||
};
|
||||
|
||||
@@ -45,7 +45,9 @@ G4NtupleMessenger::G4NtupleMessenger(G4VAnalysisManager* manager)
|
||||
fManager(manager),
|
||||
fSetActivationCmd(nullptr),
|
||||
fSetActivationAllCmd(nullptr)
|
||||
{
|
||||
{
|
||||
fNtupleDir = G4Analysis::make_unique<G4UIdirectory>("/analysis/ntuple/");
|
||||
fNtupleDir->SetGuidance("ntuple control");
|
||||
|
||||
SetActivationCmd();
|
||||
SetActivationToAllCmd();
|
||||
|
||||
Reference in New Issue
Block a user