Import Geant4 10.5.0.beta source tree
This commit is contained in:
+16
-2
@@ -1,4 +1,4 @@
|
||||
$Id: History 108469 2018-02-15 14:07:01Z gcosmo $
|
||||
$Id: History 110515 2018-05-28 07:39:37Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,7 +17,21 @@ committal in the SVN repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
December 21, 2017 G. Cosmo (analysis-V10-03-18)
|
||||
May 25, 2018 I. Hrivnacova (analysis-V10-04-03)
|
||||
- Updated to g4tools 4.2.3 (Guy Barrand):
|
||||
Fixed remaining gcc-8.1.0 warnings.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
May 23, 2018 I. Hrivnacova (analysis-V10-04-02)
|
||||
- Updated to g4tools 4.2.2 (Guy Barrand):
|
||||
Fixed gcc-8.1.0 warnings.
|
||||
See History_tools for the complete list of modifications.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
4.2.3 :
|
||||
- tools/sg/text_freetype : g++-8.1.0 : use the functions introduced below in glutess.
|
||||
- tools/tess_contour : g++-8.1.0 : use the functions introduced below in glutess.
|
||||
- tools/glutess/glutess : g++-8.1.0 : introduce five gluTessCallback_<enum>() functions to be able to avoid warnings :
|
||||
warning :cast between incompatible function types
|
||||
- test/cpp/test/lego_offscreen_zb.cpp : message about freetype in case of failure.
|
||||
|
||||
4.2.2 : g++-8.1.0 : fix warnings.
|
||||
- forit : (a__it) => a__it.
|
||||
- xml/tree : two const std::string& atb => const std::string& _atb to avoid shadow warnings.
|
||||
|
||||
4.2.1 : fix Coverity notifications.
|
||||
- wroot/MT_SET_MAX.icc : protect usage of null object in "return false" messages.
|
||||
- wroot/ntuple : tree : create_branch : add a null pointer check.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Created on : 15/07/2013
|
||||
#
|
||||
# $Id: CMakeLists.txt 92606 2015-09-08 12:34:01Z ihrivnac $
|
||||
# $Id: CMakeLists.txt 99561 2016-09-27 07:04:12Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -5,49 +5,49 @@
|
||||
#define tools_forit
|
||||
|
||||
#define tools_vforcit(a__T,a__v,a__it) \
|
||||
for(std::vector< a__T >::const_iterator (a__it) = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
for(std::vector< a__T >::const_iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
|
||||
#define tools_vforit(a__T,a__v,a__it) \
|
||||
for(std::vector< a__T >::iterator (a__it) = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
for(std::vector< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
|
||||
#define tools_vforcrit(a__T,a__v,a__it) \
|
||||
for(std::vector< a__T >::const_reverse_iterator (a__it) = (a__v).rbegin();(a__it)!=(a__v).rend();++(a__it))
|
||||
for(std::vector< a__T >::const_reverse_iterator a__it = (a__v).rbegin();(a__it)!=(a__v).rend();++(a__it))
|
||||
|
||||
#define tools_vforrit(a__T,a__v,a__it) \
|
||||
for(std::vector< a__T >::reverse_iterator (a__it) = (a__v).rbegin();(a__it)!=(a__v).rend();++(a__it))
|
||||
for(std::vector< a__T >::reverse_iterator a__it = (a__v).rbegin();(a__it)!=(a__v).rend();++(a__it))
|
||||
|
||||
#define tools_vforit_npp(a__T,a__v,a__it) \
|
||||
for(std::vector< a__T >::iterator (a__it) = (a__v).begin();(a__it)!=(a__v).end();)
|
||||
for(std::vector< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();)
|
||||
|
||||
#define tools_typename_vforcit(a__T,a__v,a__it) \
|
||||
for(typename std::vector< a__T >::const_iterator (a__it) = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
for(typename std::vector< a__T >::const_iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
|
||||
#define tools_typename_vforit(a__T,a__v,a__it) \
|
||||
for(typename std::vector< a__T >::iterator (a__it) = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
for(typename std::vector< a__T >::iterator a__it = (a__v).begin();(a__it)!=(a__v).end();++(a__it))
|
||||
|
||||
#define tools_sforcit(a__s,a__it) \
|
||||
for(std::string::const_iterator (a__it) = (a__s).begin();(a__it)!=(a__s).end();++(a__it))
|
||||
for(std::string::const_iterator a__it = (a__s).begin();(a__it)!=(a__s).end();++(a__it))
|
||||
|
||||
#define tools_sforit(a__s,a__it) \
|
||||
for(std::string::iterator (a__it) = (a__s).begin();(a__it)!=(a__s).end();++(a__it))
|
||||
for(std::string::iterator a__it = (a__s).begin();(a__it)!=(a__s).end();++(a__it))
|
||||
|
||||
#define tools_lforcit(a__T,a__l,a__it) \
|
||||
for(std::list< a__T >::const_iterator (a__it) = (a__l).begin();(a__it)!=(a__l).end();++(a__it))
|
||||
for(std::list< a__T >::const_iterator a__it = (a__l).begin();(a__it)!=(a__l).end();++(a__it))
|
||||
|
||||
#define tools_lforit(a__T,a__l,a__it) \
|
||||
for(std::list< a__T >::iterator (a__it) = (a__l).begin();(a__it)!=(a__l).end();++(a__it))
|
||||
for(std::list< a__T >::iterator a__it = (a__l).begin();(a__it)!=(a__l).end();++(a__it))
|
||||
|
||||
#define tools_mforcit(a__K,a__V,a__m,a__it) \
|
||||
for(std::map< a__K , a__V >::const_iterator (a__it) = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
for(std::map< a__K , a__V >::const_iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
|
||||
#define tools_mforit(a__K,a__V,a__m,a__it) \
|
||||
for(std::map< a__K , a__V >::iterator (a__it) = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
for(std::map< a__K , a__V >::iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
|
||||
#define tools_typename_mforcit(a__K,a__V,a__m,a__it) \
|
||||
for(typename std::map< a__K, a__V >::const_iterator (a__it) = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
for(typename std::map< a__K, a__V >::const_iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
|
||||
#define tools_typename_mforit(a__K,a__V,a__m,a__it) \
|
||||
for(typename std::map< a__K, a__V >::iterator (a__it) = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
for(typename std::map< a__K, a__V >::iterator a__it = (a__m).begin();(a__it)!=(a__m).end();++(a__it))
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -190,6 +190,7 @@ gluTessProperty( GLUtesselator *tess, GLUenum which, GLUdouble value )
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return; //G.Barrand : add : seen with g++-8.1.0.
|
||||
|
||||
case GLU_TESS_BOUNDARY_ONLY:
|
||||
tess->boundaryOnly = (value != 0);
|
||||
@@ -239,6 +240,31 @@ gluTessNormal( GLUtesselator *tess, GLUdouble x, GLUdouble y, GLUdouble z )
|
||||
tess->normal[2] = z;
|
||||
}
|
||||
|
||||
// G.Barrand : begin : g++-8.1.0 : the five below functions introduced to avoid warnings :
|
||||
// warning :cast between incompatible function types
|
||||
inline void GLUAPIENTRY
|
||||
gluTessCallback_GLU_TESS_VERTEX_DATA(GLUtesselator *tess,void (GLUAPIENTRY* a_fn)(void *, void *)) {
|
||||
tess->callVertexData = (a_fn == NULL) ? &__gl_noVertexData : a_fn;
|
||||
}
|
||||
inline void GLUAPIENTRY
|
||||
gluTessCallback_GLU_TESS_BEGIN_DATA(GLUtesselator *tess,void (GLUAPIENTRY* a_fn)(GLUenum, void *)) {
|
||||
tess->callBeginData = (a_fn == NULL) ? &__gl_noBeginData : a_fn;
|
||||
}
|
||||
inline void GLUAPIENTRY
|
||||
gluTessCallback_GLU_TESS_END_DATA(GLUtesselator *tess,void (GLUAPIENTRY* a_fn)(void *)) {
|
||||
tess->callEndData = (a_fn == NULL) ? &__gl_noEndData : a_fn;
|
||||
}
|
||||
inline void GLUAPIENTRY
|
||||
gluTessCallback_GLU_TESS_ERROR_DATA(GLUtesselator *tess,void (GLUAPIENTRY* a_fn)(GLUenum, void *)) {
|
||||
tess->callErrorData = (a_fn == NULL) ? &__gl_noErrorData : a_fn;
|
||||
}
|
||||
inline void GLUAPIENTRY
|
||||
gluTessCallback_GLU_TESS_COMBINE_DATA(GLUtesselator *tess,
|
||||
void (GLUAPIENTRY* a_fn)(GLUdouble [3],void *[4],GLUfloat [4],void **,void *)) {
|
||||
tess->callCombineData = (a_fn == NULL) ? &__gl_noCombineData : a_fn;
|
||||
}
|
||||
// G.Barrand : end : g++-8.1.0.
|
||||
|
||||
inline void GLUAPIENTRY
|
||||
gluTessCallback( GLUtesselator *tess, GLUenum which, _GLUfuncptr fn)
|
||||
{
|
||||
|
||||
@@ -770,11 +770,22 @@ protected:
|
||||
FT_Pos face_height = m_face->size->metrics.height; //FT_Pos (long)
|
||||
|
||||
m_tobj = gluNewTess();
|
||||
::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_BEGIN_DATA, (Func)begin_cbk);
|
||||
::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_END_DATA, (Func)end_cbk);
|
||||
::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_VERTEX_DATA, (Func)vertex_cbk);
|
||||
::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_COMBINE_DATA,(Func)combine_cbk);
|
||||
::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_ERROR_DATA, (Func)error_cbk);
|
||||
|
||||
//::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_BEGIN_DATA, (Func)begin_cbk);
|
||||
//::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_END_DATA, (Func)end_cbk);
|
||||
//::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_VERTEX_DATA, (Func)vertex_cbk);
|
||||
//::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_COMBINE_DATA,(Func)combine_cbk);
|
||||
//::gluTessCallback(m_tobj,(GLUenum)GLU_TESS_ERROR_DATA, (Func)error_cbk);
|
||||
|
||||
// NOTE : the gluTessCallback_<enum>() functions are tools/glutess specific.
|
||||
// They had been introduced to avoid g++-8.1.0 warnings :
|
||||
// warnings : cast between incompatible function types.
|
||||
::gluTessCallback_GLU_TESS_BEGIN_DATA (m_tobj,begin_cbk);
|
||||
::gluTessCallback_GLU_TESS_END_DATA (m_tobj,end_cbk);
|
||||
::gluTessCallback_GLU_TESS_VERTEX_DATA (m_tobj,vertex_cbk);
|
||||
::gluTessCallback_GLU_TESS_COMBINE_DATA (m_tobj,combine_cbk);
|
||||
::gluTessCallback_GLU_TESS_ERROR_DATA (m_tobj,error_cbk);
|
||||
|
||||
::gluTessProperty(m_tobj,(GLUenum)GLU_TESS_WINDING_RULE,GLU_TESS_WINDING_ODD);
|
||||
|
||||
//::gluTessProperty(m_tobj, GLU_TESS_TOLERANCE, 0);
|
||||
|
||||
@@ -32,11 +32,20 @@ public:
|
||||
|
||||
GLUtesselator* tobj = gluNewTess();
|
||||
|
||||
::gluTessCallback(tobj,(GLUenum)GLU_TESS_VERTEX_DATA, (Func)vertexCallback);
|
||||
::gluTessCallback(tobj,(GLUenum)GLU_TESS_BEGIN_DATA, (Func)beginCallback);
|
||||
::gluTessCallback(tobj,(GLUenum)GLU_TESS_END_DATA, (Func)endCallback);
|
||||
::gluTessCallback(tobj,(GLUenum)GLU_TESS_ERROR_DATA, (Func)errorCallback);
|
||||
::gluTessCallback(tobj,(GLUenum)GLU_TESS_COMBINE_DATA,(Func)combineCallback);
|
||||
// g++-8.1.0 : the five below lines induce warnings : cast between incompatible function types.
|
||||
//::gluTessCallback(tobj,(GLUenum)GLU_TESS_VERTEX_DATA, (Func)vertexCallback);
|
||||
//::gluTessCallback(tobj,(GLUenum)GLU_TESS_BEGIN_DATA, (Func)beginCallback);
|
||||
//::gluTessCallback(tobj,(GLUenum)GLU_TESS_END_DATA, (Func)endCallback);
|
||||
//::gluTessCallback(tobj,(GLUenum)GLU_TESS_ERROR_DATA, (Func)errorCallback);
|
||||
//::gluTessCallback(tobj,(GLUenum)GLU_TESS_COMBINE_DATA,(Func)combineCallback);
|
||||
|
||||
// NOTE : the gluTessCallback_<> are inlib/glutess specific.
|
||||
::gluTessCallback_GLU_TESS_VERTEX_DATA (tobj,vertexCallback);
|
||||
::gluTessCallback_GLU_TESS_BEGIN_DATA (tobj,beginCallback);
|
||||
::gluTessCallback_GLU_TESS_END_DATA (tobj,endCallback);
|
||||
::gluTessCallback_GLU_TESS_ERROR_DATA (tobj,errorCallback);
|
||||
::gluTessCallback_GLU_TESS_COMBINE_DATA(tobj,combineCallback);
|
||||
|
||||
::gluTessProperty(tobj,(GLUenum)GLU_TESS_WINDING_RULE,GLU_TESS_WINDING_ODD);
|
||||
|
||||
for(unsigned int a=0;a<aContour.size();a++) {
|
||||
@@ -192,7 +201,7 @@ protected:
|
||||
#ifdef TOOLS_TESS_CONTOUR_STDCALL
|
||||
__stdcall
|
||||
#endif
|
||||
endCallback(){}
|
||||
endCallback(void*){}
|
||||
|
||||
static void
|
||||
#ifdef TOOLS_TESS_CONTOUR_STDCALL
|
||||
|
||||
@@ -235,11 +235,9 @@ public:
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
bool element_atb_value(const std::string& a_elem,
|
||||
const std::string& a_atb,
|
||||
T& a_value) const {
|
||||
bool element_atb_value(const std::string& a_elem,const std::string& a_atb,T& a_value) const {
|
||||
std::string sv;
|
||||
if(!element_atb_value(a_elem,a_atb,sv)) {a_value=T();return false;}
|
||||
return to<T>(sv,a_value);
|
||||
@@ -325,12 +323,12 @@ public:
|
||||
{const std::vector<atb>& atbs = a_tree.attributes();
|
||||
size_t atbn = atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
const std::string& atb = atbs[index].first;
|
||||
const std::string& _atb = atbs[index].first;
|
||||
const std::string& atbv = atbs[index].second;
|
||||
if(atbv.empty()) {
|
||||
visitor->f_out << "check_item :"
|
||||
<< " for XML item " << sout(a_tree.tag_name())
|
||||
<< ", attribute " << sout(atb) << " has an empty value."
|
||||
<< ", attribute " << sout(_atb) << " has an empty value."
|
||||
<< std::endl;
|
||||
visitor->m_status = false;
|
||||
}
|
||||
@@ -341,12 +339,12 @@ public:
|
||||
const std::vector<atb>& atbs = _elem->attributes();
|
||||
size_t atbn = atbs.size();
|
||||
for(size_t index=0;index<atbn;index++) {
|
||||
const std::string& atb = atbs[index].first;
|
||||
const std::string& _atb = atbs[index].first;
|
||||
const std::string& atbv = atbs[index].second;
|
||||
if(atbv.empty()) {
|
||||
visitor->f_out << "ItemM::check_item :"
|
||||
<< " for XML item " << sout(a_tree.tag_name())
|
||||
<< ", attribute " << sout(atb) << " has an empty value."
|
||||
<< ", attribute " << sout(_atb) << " has an empty value."
|
||||
<< std::endl;
|
||||
visitor->m_status = false;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# Created on : 27/07/2017
|
||||
#
|
||||
# $Id: CMakeLists.txt 105426 2017-07-27 09:10:08Z ihrivnac $
|
||||
# $Id: CMakeLists.txt 105747 2017-08-16 13:16:13Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -367,6 +367,7 @@ G4bool G4RootPNtupleManager::AddNtupleRow(G4int ntupleId)
|
||||
if ( ! ntupleDescription ) return false;
|
||||
|
||||
G4AutoLock lock(&addRowMutex);
|
||||
lock.unlock();
|
||||
mutex toolsLock(lock);
|
||||
auto result
|
||||
= ntupleDescription->fNtuple
|
||||
@@ -407,6 +408,7 @@ G4bool G4RootPNtupleManager::Merge()
|
||||
#endif
|
||||
|
||||
G4AutoLock lock(&endFillMutex);
|
||||
lock.unlock();
|
||||
mutex toolsLock(lock);
|
||||
auto result
|
||||
= ntupleDescription->fNtuple
|
||||
|
||||
Reference in New Issue
Block a user