DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
World.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation for LCD
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 // Framework include files
15 #include "DD4hep/World.h"
16 #include "DD4hep/Printout.h"
18 
19 using namespace DD4hep::Geometry;
20 
23  ConditionsLoader* loader = access()->conditionsLoader;
24  if ( !loader ) {
25  except("Conditions","+++ No ConditionsLoader registered to this World instance!");
26  }
27  return *loader;
28 }
29 
32  AlignmentsLoader* loader = access()->alignmentsLoader;
33  if ( !loader ) {
34  except("Alignments","+++ No AlignmentsLoader registered to this World instance!");
35  }
36  return *loader;
37 }
38 
40 LCDD& World::lcdd() const {
41  return *(access()->lcdd);
42 }
The data class behind a alignments container handle.
LCDD & lcdd() const
Access the detector descrion tree.
Definition: World.cpp:40
The data class behind a conditions container handle.
int except(const std::string &src, const std::string &fmt,...)
Calls the display action with ERROR and throws an std::runtime_error exception.
Definition: Printout.cpp:217
AlignmentsLoader & alignmentsLoader() const
Access to the alignment loading.
Definition: World.cpp:31
T * access() const
Checked object access. Throws invalid handle runtime exception.
Definition: Handle.inl:41
ConditionsLoader & conditionsLoader() const
Access the conditions loading.
Definition: World.cpp:22
The main interface to the DD4hep detector description package.
Definition: LCDD.h:82