Defines the root of the CompactView. More...
#include <DDRoot.h>
Public Member Functions | |
DDLogicalPart | root () const |
returns the root of the geometrical hierarchy | |
void | set (const DDName &rootName) |
set the root by using its qualified name DDName | |
void | set (const DDLogicalPart &root) |
set DDLogicalPart root to the root | |
Protected Member Functions | |
DDRoot () | |
~DDRoot () | |
Private Attributes | |
DDLogicalPart | root_ |
Friends | |
class | DDI::Singleton< DDRoot > |
Defines the root of the CompactView.
DDRoot will define the root of the geometrical hierarchy. The root also defines the base of the global coordinates. /todo provide possibility to have different roots for different parallel geometries /todo prohibit multiple calls for one geometry (the root can only be defined once!)
DDLogicalPart DDRoot::root | ( | ) | const |
returns the root of the geometrical hierarchy
To find out, whether the root was already defined or not:
DDLogicalPart root; if(root=DDRoot::instance().root()) { // ok, root was already defined // so something here ... } else { // root has not been defined yet! // do something else }
Definition at line 40 of file DDRoot.cc.
References root_.
Referenced by set().
{ return root_; }
void DDRoot::set | ( | const DDName & | rootName | ) |
void DDRoot::set | ( | const DDLogicalPart & | root | ) |
friend class DDI::Singleton< DDRoot > [friend] |
DDLogicalPart DDRoot::root_ [private] |