CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes | Friends
DDRoot Class Reference

Defines the root of the CompactView. More...

#include <DDRoot.h>

Public Member Functions

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...
 

Protected Member Functions

 DDRoot ()
 
 ~DDRoot ()
 

Private Attributes

DDLogicalPart root_
 

Friends

class DDI::Singleton< DDRoot >
 

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 ( )
protected

Definition at line 7 of file DDRoot.cc.

8 { }
DDRoot::~DDRoot ( )
protected

Definition at line 11 of file DDRoot.cc.

12 { }

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

References root_.

Referenced by set().

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

set the root by using its qualified name DDName

Definition at line 15 of file DDRoot.cc.

References DCOUT, and root_.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

16 {
17  DCOUT('C',"DDRoot::set() root=" << name);
19 }
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
#define DCOUT(M_v_Y, M_v_S)
Definition: DDdebug.h:53
DDLogicalPart root_
Definition: DDRoot.h:31
void DDRoot::set ( const DDLogicalPart root)

set DDLogicalPart root to the root

Definition at line 22 of file DDRoot.cc.

References DCOUT, root(), and root_.

Referenced by betterConfigParser.BetterConfigParser::getGeneral().

23 {
24  DCOUT('C',"DDRoot::set() root=" << root);
25  root_ = root;
26 }
DDLogicalPart root() const
returns the root of the geometrical hierarchy
Definition: DDRoot.cc:40
#define DCOUT(M_v_Y, M_v_S)
Definition: DDdebug.h:53
DDLogicalPart root_
Definition: DDRoot.h:31

Friends And Related Function Documentation

friend class DDI::Singleton< DDRoot >
friend

Definition at line 16 of file DDRoot.h.

Member Data Documentation

DDLogicalPart DDRoot::root_
private

Definition at line 31 of file DDRoot.h.

Referenced by root(), and set().