Import Geant4 10.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2017-12-08 12:52:30 +01:00
parent 98e455a940
commit fc6af9e721
2166 changed files with 276760 additions and 100873 deletions
@@ -33,12 +33,14 @@ public:
}
public:
virtual bool stream(buffer& a_buffer) {
delete m_leaf_count;
if(m_own_leaf_count) {
if(a_buffer.map_objs()) a_buffer.remove_in_map(m_leaf_count);
delete m_leaf_count;
}
m_leaf_count = 0;
m_own_leaf_count = false;
int fLengthType;
int fOffset;
bool fIsRange;
bool fIsUnsigned;
short v;
@@ -52,14 +54,15 @@ public:
// Ok with v 1 & 2
if(!a_buffer.read(m_length)) return false;
if(!a_buffer.read(fLengthType)) return false;
if(!a_buffer.read(m_length_type)) return false;
if(!a_buffer.read(fOffset)) return false;
if(!a_buffer.read(fIsRange)) return false;
if(!a_buffer.read(m_is_range)) return false;
if(!a_buffer.read(fIsUnsigned)) return false;
{ifac::args args;
iro* obj;
if(!a_buffer.read_object(m_fac,args,obj)) {
bool created;
if(!a_buffer.read_object(m_fac,args,obj,created)) {
m_out << "tools::rroot::base_leaf::stream :"
<< " can't read object."
<< std::endl;
@@ -76,9 +79,13 @@ public:
<< " can't cast base_leaf."
<< std::endl;
m_leaf_count = 0;
delete obj;
if(created) {
if(a_buffer.map_objs()) a_buffer.remove_in_map(obj);
delete obj;
}
return false;
}
if(created) m_own_leaf_count = true;
}}
if(!a_buffer.check_byte_count(s,c,"TLeaf")) return false;
@@ -103,22 +110,21 @@ public:
//,fIndirectAddress(false)
//,fNewValue(false)
,m_ndata(0)
//,m_ndata(0)
,m_length(0)
/*
,fLengthType(0)
,fOffset(0)
,fIsRange(false)
,fIsUnsigned(false)
*/
,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(){
delete m_leaf_count;
if(m_own_leaf_count) delete m_leaf_count;
#ifdef TOOLS_MEM
mem::decrement(s_class().c_str());
#endif
@@ -128,14 +134,18 @@ protected:
:iro(a_from)
,m_out(a_from.m_out)
,m_fac(a_from.m_fac)
,m_ndata(0)
//,m_ndata(0)
,m_length(0)
,m_length_type(0)
,m_is_range(false)
,m_leaf_count(0)
,m_own_leaf_count(false)
{}
base_leaf& operator=(const base_leaf&){return *this;}
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.
@@ -168,15 +178,14 @@ protected: //Named
std::string m_title;
//bool fIndirectAddress;
//bool fNewValue;
uint32 m_ndata; //! Number of elements in fAddress data buffer
//uint32 m_ndata; //! Number of elements in fAddress data buffer
uint32 m_length; // Number of fixed length elements
/*
int fLengthType; // Number of bytes for this data type
int fOffset; // Offset in ClonesArray object (if one)
bool fIsRange; // (=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
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;
};
}}