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::DDRoot ( )

Definition at line 6 of file DDRoot.cc.

6 {}

◆ ~DDRoot()

DDRoot::~DDRoot ( )

Definition at line 8 of file DDRoot.cc.

8 {}

Member Function Documentation

◆ root()

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

References root_.

Referenced by set().

26 { return root_; }
DDLogicalPart root_
Definition: DDRoot.h:28

◆ set() [1/2]

void DDRoot::set ( const DDName rootName)

set the root by using its qualified name DDName

Definition at line 10 of file DDRoot.cc.

References mergeVDriftHistosByStation::name, and root_.

10 { root_ = DDLogicalPart(name); }
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
DDLogicalPart root_
Definition: DDRoot.h:28

◆ set() [2/2]

void DDRoot::set ( const DDLogicalPart root)

set DDLogicalPart root to the root

Definition at line 12 of file DDRoot.cc.

References root(), and root_.

12 { root_ = root; }
DDLogicalPart root() const
returns the root of the geometrical hierarchy
Definition: DDRoot.cc:26
DDLogicalPart root_
Definition: DDRoot.h:28

Member Data Documentation

◆ root_

DDLogicalPart DDRoot::root_
private

Definition at line 28 of file DDRoot.h.

Referenced by root(), and set().