Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
@@ -10,6 +10,7 @@ namespace tools {
namespace rroot {
class branch_element : public branch {
typedef branch parent;
public:
static const std::string& s_class() {
static const std::string s_v("tools::rroot::branch_element");
@@ -18,21 +19,21 @@ public:
public: //iro
virtual void* cast(const std::string& a_class) const {
if(void* p = cmp_cast<branch_element>(this,a_class)) return p;
return branch::cast(a_class);
return parent::cast(a_class);
}
virtual const std::string& s_cls() const {return s_class();}
public:
static cid id_class() {return branch_element_cid();}
virtual void* cast(cid a_class) const {
if(void* p = cmp_cast<branch_element>(this,a_class)) {return p;}
return branch::cast(a_class);
return parent::cast(a_class);
}
public:
virtual bool stream(buffer& a_buffer) {
short v;
unsigned int s, c;
if(!a_buffer.read_version(v,s,c)) return false;
if(!branch::stream(a_buffer)) return false;
if(!parent::stream(a_buffer)) return false;
if(v<=7) {
if(!a_buffer.read(fClassName)) return false;
@@ -264,9 +265,9 @@ public: //branch
*/
}
virtual bool find_entry(uint32 a_entry,uint32& a_nbytes){
virtual bool find_entry(ifile& a_file,uint32 a_entry,uint32& a_nbytes){
//The below line will call the upper read_leaves.
if(!branch::find_entry(a_entry,a_nbytes)) return false;
if(!parent::find_entry(a_file,a_entry,a_nbytes)) return false;
if(m_branches.size()) {
//if(!m_obj) {
@@ -276,16 +277,31 @@ public: //branch
tools_vforcit(branch*,m_branches,it) {
uint32 n;
if(!(*it)->find_entry(a_entry,n)) return false;
if(!(*it)->find_entry(a_file,a_entry,n)) return false;
a_nbytes += n;
}
}
return true;
}
virtual bool show(std::ostream& a_out,ifile& a_file,uint32 a_entry){
uint32 n;
if(!find_entry(a_file,a_entry,n)) return false;
{std::string s;
uint32 len = uint32(name().size())+128;
sprintf(s,len," %-15s = ",name().c_str());
a_out << s;}
a_out << m_obj << std::endl;
return true;
//return parent::show(a_out,a_file,a_entry);
}
public:
branch_element(ifile& a_file,ifac& a_fac)
: branch(a_file,a_fac)
branch_element(std::ostream& a_out,ifac& a_fac)
:parent(a_out,a_fac)
,m_obj(0)
,fClassVersion(0)
,fID(0)
@@ -296,7 +312,7 @@ public:
virtual ~branch_element(){delete m_obj;}
protected:
branch_element(const branch_element& a_from)
:iro(a_from),branch(a_from){}
:iro(a_from),parent(a_from){}
branch_element& operator=(const branch_element&){return *this;}
public:
const std::string& class_name() const {return fClassName;}