Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
-52
View File
@@ -4,10 +4,6 @@
#ifndef tools_rroot_base_leaf
#define tools_rroot_base_leaf
#ifdef TOOLS_MEM
#include "../mem"
#endif
#include "named"
namespace tools {
@@ -69,9 +65,6 @@ public:
return false;
}
if(!obj) {
//m_out << "tools::rroot::base_leaf::stream :"
// << " null leaf count object."
// << std::endl;
} else {
m_leaf_count = safe_cast<iro,base_leaf>(*obj);
if(!m_leaf_count) {
@@ -91,10 +84,6 @@ public:
if(!a_buffer.check_byte_count(_s,_c,"TLeaf")) return false;
if(!m_length) m_length = 1;
/*
fNewValue = false;
if(!setAddress(0)) return false;
*/
return true;
}
public:
@@ -107,34 +96,21 @@ public:
,m_fac(a_fac)
,m_name("")
,m_title("")
//,fIndirectAddress(false)
//,fNewValue(false)
//,m_ndata(0)
,m_length(0)
,m_length_type(0)
//,fOffset(0)
,m_is_range(false)
//,fIsUnsigned(false)
,m_leaf_count(0)
,m_own_leaf_count(false)
{
#ifdef TOOLS_MEM
mem::increment(s_class().c_str());
#endif
}
virtual ~base_leaf(){
if(m_own_leaf_count) delete m_leaf_count;
#ifdef TOOLS_MEM
mem::decrement(s_class().c_str());
#endif
}
protected:
base_leaf(const base_leaf& a_from)
:iro(a_from)
,m_out(a_from.m_out)
,m_fac(a_from.m_fac)
//,m_ndata(0)
,m_length(0)
,m_length_type(0)
,m_is_range(false)
@@ -146,44 +122,16 @@ public:
const std::string& name() const {return m_name;}
const std::string& title() const {return m_title;}
const base_leaf* leaf_count() const {return m_leaf_count;}
/*
uint32 length() const {
// Return the number of effective elements of this leaf.
if(m_leaf_count) {
m_out << "tools::rroot::base_leaf::length :"
<< " m_leaf_count not null. Case not yet handled."
<< std::endl;
return m_length;
//uint32 len = m_leaf_count->number();
//if (len > fLeafCount->maximum()) {
// m_out << "tools::rroot::base_leaf::length :"
// << fName << ", len=" << len << " and max="
// << fLeafCount->maximum()
// << std::endl;
// len = fLeafCount->maximum();
//}
//return len * fLength;
} else {
return m_length;
}
}
*/
protected:
std::ostream& m_out;
ifac& m_fac;
protected: //Named
std::string m_name;
std::string m_title;
//bool fIndirectAddress;
//bool fNewValue;
//uint32 m_ndata; //! Number of elements in fAddress data buffer
uint32 m_length; // Number of fixed length elements
uint32 m_length_type; // Number of bytes for this data type
//int fOffset; // Offset in ClonesArray object (if one)
bool m_is_range; // (=true if leaf has a range, false otherwise)
//bool fIsUnsigned; // (=kTRUE if unsigned, kFALSE otherwise)
base_leaf* m_leaf_count; // Pointer to Leaf count if variable length
bool m_own_leaf_count;
};