CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes | Friends

DDRoot Class Reference

Defines the root of the CompactView. More...

#include <DDRoot.h>

List of all members.

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 >

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.

{ }
DDRoot::~DDRoot ( ) [protected]

Definition at line 11 of file DDRoot.cc.

{ }

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:

    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)

set the root by using its qualified name DDName

Definition at line 15 of file DDRoot.cc.

References DCOUT, and root_.

{
   DCOUT('C',"DDRoot::set() root=" << name);
   root_ = DDLogicalPart(name);
}
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_.

{
   DCOUT('C',"DDRoot::set() root=" << root);
   root_ = root;
}

Friends And Related Function Documentation

friend class DDI::Singleton< DDRoot > [friend]

Definition at line 16 of file DDRoot.h.


Member Data Documentation

Definition at line 31 of file DDRoot.h.

Referenced by root(), and set().