CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDRoot Class Reference

Defines the root of the CompactView. More...

#include <DDRoot.h>

Public Member Functions

 DDRoot ()
 
DDLogicalPart root () const
 returns the root of the geometrical hierarchy More...
 
void set (const DDName &rootName)
 set the root by using its qualified name DDName More...
 
void set (const DDLogicalPart &root)
 set DDLogicalPart root to the root More...
 
 ~DDRoot ()
 

Private Attributes

DDLogicalPart root_
 

Detailed Description

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!)

Definition at line 14 of file DDRoot.h.

Constructor & Destructor Documentation

DDRoot::DDRoot ( )

Definition at line 6 of file DDRoot.cc.

7 { }
DDRoot::~DDRoot ( )

Definition at line 9 of file DDRoot.cc.

10 { }

Member Function Documentation

DDLogicalPart DDRoot::root ( ) const

returns the root of the geometrical hierarchy

To find out, whether the root was already defined or not:

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 34 of file DDRoot.cc.

References root_.

Referenced by set().

34 { return root_; }
DDLogicalPart root_
Definition: DDRoot.h:29
void DDRoot::set ( const DDName rootName)

set the root by using its qualified name DDName

Definition at line 12 of file DDRoot.cc.

References root_.

13 {
15 }
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:92
DDLogicalPart root_
Definition: DDRoot.h:29
void DDRoot::set ( const DDLogicalPart root)

set DDLogicalPart root to the root

Definition at line 17 of file DDRoot.cc.

References root(), and root_.

18 {
19  root_ = root;
20 }
DDLogicalPart root() const
returns the root of the geometrical hierarchy
Definition: DDRoot.cc:34
DDLogicalPart root_
Definition: DDRoot.h:29

Member Data Documentation

DDLogicalPart DDRoot::root_
private

Definition at line 29 of file DDRoot.h.

Referenced by root(), and set().