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
+3 -47
View File
@@ -4,17 +4,11 @@
#ifndef tools_sg_group
#define tools_sg_group
//#define TOOLS_SG_GROUP_DEBUG
#include "node"
#include "pick_action"
#include "event_action"
#ifdef TOOLS_SG_GROUP_DEBUG
#include "render_action"
#endif
namespace tools {
namespace sg {
@@ -22,16 +16,7 @@ class group : public node {
TOOLS_NODE(group,tools::sg::group,node)
public:
virtual void render(render_action& a_action) {
#ifdef TOOLS_SG_GROUP_DEBUG
std::ostream& out = a_action.out();
tools_vforcit(node*,m_children,it) {
out << "debug : tools::sg::group::render : children : " << (*it)->s_cls() << " begin : " << std::endl;
(*it)->render(a_action);
out << "debug : tools::sg::group::render : children : " << (*it)->s_cls() << " end," << std::endl;
}
#else
tools_vforcit(node*,m_children,it) (*it)->render(a_action);
#endif
}
virtual void pick(pick_action& a_action) {
tools_vforcit(node*,m_children,it) {
@@ -135,27 +120,11 @@ public:
return 0;
}
/*
template <class T>
T* rsearch_from(const node* a_node) const {
bool found = false;
tools_vforcrit(node*,m_children,it) {
// the below logic permits to test a_node.
if(!found) {if(*it==a_node) found = true;}
if(found) {
T* o = safe_cast<node,T>(*(*it));
if(o) return o;
}
}
return 0;
}
*/
void* rsearch_from(const node* a_node,
const std::string& a_class,
bool a_inc_a_node = true) const {
bool found = false;
tools_vforcrit(node*,m_children,it) {
for(auto it = m_children.crbegin(); it != m_children.crend(); ++it) {
// the below logic permits to test a_node.
if(!found) {
if(*it==a_node) {
@@ -231,15 +200,12 @@ public:
//touch();
}
//void clear() {safe_clear<node>(m_children);}
void clear() {safe_reverse_clear<node>(m_children);}
void raw_clear() { //used for sg coming from exlib/rroot/vis_volume.
tools::raw_clear<node>(m_children); //tools:: is needed.
}
//void children_clear() {m_children.clear();} //warning : nodes are not deleted. Used in [hep_]cone_anim.
size_t size() const {return m_children.size();}
bool empty() const {return m_children.size()?false:true;}
node* operator[](size_t a_index) const{
@@ -264,20 +230,10 @@ public:
}
return false;
}
/*
bool insert(const node* a_from,node* a_new){
tools_vforit(node*,m_children,it) {
if((*it)==a_from) {
m_children.insert(it,a_new);
return true;
}
}
return false;
}
*/
template <class T>
T* rsearch() const { //used in agora.
tools_vforcrit(node*,m_children,it) {
for(auto it = m_children.crbegin(); it != m_children.crend(); ++it) {
T* o = safe_cast<node,T>(*(*it));
if(o) return o;
}