Skip to content

Commit

Permalink
Namespace re-organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusFrankATcernch committed Jun 19, 2017
1 parent e88f8fc commit 62469e5
Show file tree
Hide file tree
Showing 994 changed files with 17,650 additions and 19,280 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ option(DD4HEP_USE_GEANT4 "Enable the simulation part based on Geant4" OFF)
option(DD4HEP_USE_GEAR "Build gear wrapper for backward compatibility" OFF)
option(DD4HEP_USE_LCIO "Build lcio extensions" OFF)
option(BUILD_TESTING "Enable and build tests" ON)
option(DD4HEP_USE_CXX14 "Build DD4hep using c++14" OFF)
option(DD4HEP_USE_CXX14 "Build dd4hep using c++14" OFF)
option(CMAKE_MACOSX_RPATH "Build with rpath on macos" ON)
#
#-----------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -59,7 +59,7 @@ message ( STATUS "ROOT_VERSION: ${ROOT_VERSION}" )
dd4hep_set_compiler_flags()

add_subdirectory ( GaudiPluginService)
#---DD4hep functions and macros -------------------------------------------------------
#---dd4hep functions and macros -------------------------------------------------------
include(DD4hep)
include(DD4hepMacros)

Expand Down Expand Up @@ -138,7 +138,7 @@ OPTION( INSTALL_DOC "Set to OFF to skip build/install Documentation" OFF )
IF( INSTALL_DOC )
INSTALL( CODE "EXECUTE_PROCESS( COMMAND ${CMAKE_BUILD_TOOL} doc)" )
include ( GlobalSVNRevision )
include ( DD4hepDoxygen )
include ( dd4hepDoxygen )
ENDIF()

#---Configuration-------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "DD4hep")
set(CTEST_PROJECT_NAME "dd4hep")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "aidasoft.desy.de")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=DD4hep")
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=dd4hep")
set(CTEST_DROP_SITE_CDASH TRUE)
2 changes: 1 addition & 1 deletion DDAlign/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#==========================================================================
# AIDA Detector description implementation for LCD
# AIDA Detector description implementation
#--------------------------------------------------------------------------
# Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
# All rights reserved.
Expand Down
8 changes: 4 additions & 4 deletions DDAlign/include/DDAlign/AlignmentTags.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// $Id: $
//==========================================================================
// AIDA Detector description implementation for LCD
// AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
Expand All @@ -17,11 +17,11 @@
// Framework include files
#include "XML/XMLElements.h"
#ifndef UNICODE
#define UNICODE(x) extern const ::DD4hep::XML::Tag_t Unicode_##x
#define UNICODE(x) extern const ::dd4hep::xml::Tag_t Unicode_##x
#endif

// Unicode tags known to the alignment section
namespace DD4hep {
namespace dd4hep {
/// Namespace for the AIDA detector description toolkit supporting XML utilities
namespace DDAlign {

Expand All @@ -48,6 +48,6 @@ namespace DD4hep {
#undef UNICODE // Do not miss this one!
#include "XML/XMLTags.h"

#define _ALU(a) ::DD4hep::DDAlign::Unicode_##a
#define _ALU(a) ::dd4hep::DDAlign::Unicode_##a

#endif /* DD4HEP_ALIGNMENT_ALIGNMENT_TAGS_H */
42 changes: 18 additions & 24 deletions DDAlign/include/DDAlign/AlignmentsCalib.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//==========================================================================
// AIDA Detector description implementation for LCD
// AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
Expand All @@ -14,7 +14,7 @@
#define DD4HEP_DDALIGN_ALIGNMENTCALIB_H

// Framework includes
#include "DD4hep/Detector.h"
#include "DD4hep/DetElement.h"
#include "DD4hep/Alignments.h"
#include "DD4hep/AlignmentData.h"
#include "DD4hep/ConditionsMap.h"
Expand All @@ -25,10 +25,10 @@
#include <map>

/// Namespace for the AIDA detector description toolkit
namespace DD4hep {
namespace dd4hep {

/// Namespace for the geometry part of the AIDA detector description toolkit
namespace Alignments {
/// Namespace for implementation details of the AIDA detector description toolkit
namespace align {

/// Calib alignment dependencies from conditions
/**
Expand All @@ -42,39 +42,33 @@ namespace DD4hep {
public:
class Entry;
/// Shortcut definitions
typedef Conditions::Condition Condition;
typedef Conditions::ConditionKey ConditionKey;
typedef Conditions::ConditionsMap ConditionsMap;
typedef Condition::key_type key_type;
typedef std::map<key_type,Entry*> UsedConditions;
typedef std::map<Condition::key_type,Entry*> UsedConditions;

public:
/// Reference to the detector description object
LCDD& lcdd;
Detector& description;
/// Reference to the alignment manager object
ConditionsMap& slice;
/// Internal work stack of cached deltas
UsedConditions used;
ConditionsMap& slice;
/// detaill work stack of cached deltas
UsedConditions used;

protected:
/// Implementation: Add a new entry to the transaction stack.
std::pair<key_type,Entry*> _set(DetElement det, const Delta& delta);
std::pair<Condition::key_type,Entry*> _set(DetElement det, const Delta& delta);

public:
/// No default constructor
AlignmentsCalib() = delete;

/// No copy constructor
AlignmentsCalib(const AlignmentsCalib& copy) = delete;

/// Initializing constructor
AlignmentsCalib(LCDD& lcdd, ConditionsMap& mapping);

AlignmentsCalib(Detector& description, ConditionsMap& mapping);
/// Default destructor
virtual ~AlignmentsCalib();

/// No assignment operator
AlignmentsCalib& operator=(const AlignmentsCalib& copy) = delete;
/// No move assignment operator
AlignmentsCalib& operator=(AlignmentsCalib&& copy) = delete;

/// (1) Add a new entry to an existing DetElement structure.
/**
Expand All @@ -97,7 +91,7 @@ namespace DD4hep {
*
* The resulting alignment key is returned to the client. If NULL: Failure
*/
key_type set(DetElement det, const Delta& delta);
Condition::key_type set(DetElement det, const Delta& delta);

/// (2) Add a new entry to an existing DetElement structure.
/**
Expand All @@ -108,7 +102,7 @@ namespace DD4hep {
*
* The alignment key is returned to the client. If NULL: Failure
*/
key_type set(const std::string& path, const Delta& delta);
Condition::key_type set(const std::string& path, const Delta& delta);

/// Clear all delta data in the caches transaction stack.
void clearDeltas();
Expand All @@ -122,6 +116,6 @@ namespace DD4hep {
/// Commit all pending transactions. Returns number of altered entries
AlignmentsCalculator::Result commit();
};
} /* End namespace Alignments */
} /* End namespace DD4hep */
} /* End namespace align */
} /* End namespace dd4hep */
#endif /* DD4HEP_DDALIGN_ALIGNMENTCALIB_H */
26 changes: 13 additions & 13 deletions DDAlign/include/DDAlign/GlobalAlignmentCache.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//==========================================================================
// AIDA Detector description implementation for LCD
// AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
Expand All @@ -18,27 +18,27 @@
#include "DDAlign/GlobalAlignmentStack.h"

/// Namespace for the AIDA detector description toolkit
namespace DD4hep {
namespace dd4hep {

/// Namespace for the geometry part of the AIDA detector description toolkit
namespace Alignments {
/// Namespace for implementation details of the AIDA detector description toolkit
namespace align {

/// Forward declarations
class GlobalAlignmentOperator;
class GlobalAlignmentCache;
class GlobalAlignmentStack;

/// Class caching all known alignment operations for one LCDD instance.
/// Class caching all known alignment operations for one Detector instance.
/**
* Internally the instances are fragmented to subdetectors defined
* detaillly the instances are fragmented to subdetectors defined
* by the next-to-top level detector elements.
*
* \author M.Frank
* \version 1.0
* \ingroup DD4HEP_ALIGN
*/
class GlobalAlignmentCache {
friend class LCDD;
friend class dd4hep::Detector;
friend class GlobalAlignmentOperator;

public:
Expand All @@ -48,7 +48,7 @@ namespace DD4hep {
typedef std::map<std::string,GlobalAlignmentCache*> SubdetectorAlignments;

protected:
LCDD& m_lcdd;
Detector& m_detDesc;
/// Cache of subdetectors
SubdetectorAlignments m_detectors;
/// The subdetector specific map of alignments caches
Expand All @@ -65,7 +65,7 @@ namespace DD4hep {

protected:
/// Default constructor initializing variables
GlobalAlignmentCache(LCDD& lcdd, const std::string& sdPath, bool top);
GlobalAlignmentCache(Detector& description, const std::string& sdPath, bool top);
/// Default destructor
virtual ~GlobalAlignmentCache();

Expand All @@ -81,9 +81,9 @@ namespace DD4hep {

public:
/// Create and install a new instance tree
static GlobalAlignmentCache* install(LCDD& lcdd);
static GlobalAlignmentCache* install(Detector& description);
/// Unregister and delete a tree instance
static void uninstall(LCDD& lcdd);
static void uninstall(Detector& description);
/// Add reference count
int addRef();
/// Release object. If reference count goes to NULL, automatic deletion is triggered.
Expand All @@ -100,6 +100,6 @@ namespace DD4hep {
std::vector<GlobalAlignment> matches(const std::string& path_match, bool exclude_exact=false) const;
};

} /* End namespace Alignments */
} /* End namespace DD4hep */
} /* End namespace align */
} /* End namespace dd4hep */
#endif /* DD4HEP_ALIGNMENT_GLOBALALIGNMENTCACHE_H */
12 changes: 6 additions & 6 deletions DDAlign/include/DDAlign/GlobalAlignmentOperators.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//==========================================================================
// AIDA Detector description implementation for LCD
// AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
Expand All @@ -19,10 +19,10 @@
#include "DDAlign/GlobalAlignmentCache.h"

/// Namespace for the AIDA detector description toolkit
namespace DD4hep {
namespace dd4hep {

/// Namespace for the geometry part of the AIDA detector description toolkit
namespace Alignments {
/// Namespace for implementation details of the AIDA detector description toolkit
namespace align {

/// Base class for alignment functors
/**
Expand Down Expand Up @@ -104,6 +104,6 @@ namespace DD4hep {
template <> void GlobalAlignmentActor<DDAlign_standard_operations::node_delete>::operator()(Nodes::value_type& n) const;
template <> void GlobalAlignmentActor<DDAlign_standard_operations::node_reset>::operator() (Nodes::value_type& n) const;
template <> void GlobalAlignmentActor<DDAlign_standard_operations::node_align>::operator() (Nodes::value_type& n) const;
} /* End namespace Alignments */
} /* End namespace DD4hep */
} /* End namespace align */
} /* End namespace dd4hep */
#endif /* DD4HEP_ALIGNMENT_GLOBALALIGNMENTOPERATORS_H */
12 changes: 6 additions & 6 deletions DDAlign/include/DDAlign/GlobalAlignmentStack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//==========================================================================
// AIDA Detector description implementation for LCD
// AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
Expand All @@ -21,10 +21,10 @@


/// Namespace for the AIDA detector description toolkit
namespace DD4hep {
namespace dd4hep {

/// Namespace for the geometry part of the AIDA detector description toolkit
namespace Alignments {
/// Namespace for implementation details of the AIDA detector description toolkit
namespace align {

/// Alignment Stack object definition
/**
Expand Down Expand Up @@ -146,6 +146,6 @@ namespace DD4hep {
std::vector<const StackEntry*> entries() const;
};

} /* End namespace Geometry */
} /* End namespace DD4hep */
} /* End namespace detail */
} /* End namespace dd4hep */
#endif /* DD4HEP_ALIGNMENT_GLOBALALIGNMENTSTACK_H */
28 changes: 14 additions & 14 deletions DDAlign/include/DDAlign/GlobalAlignmentWriter.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//==========================================================================
// AIDA Detector description implementation for LCD
// AIDA Detector description implementation
//--------------------------------------------------------------------------
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
// All rights reserved.
Expand All @@ -15,14 +15,14 @@

// Framework include files
#include "XML/XMLElements.h"
#include "DD4hep/Detector.h"
#include "DD4hep/DetElement.h"
#include "DD4hep/GlobalAlignment.h"

/// Namespace for the AIDA detector description toolkit
namespace DD4hep {
namespace dd4hep {

/// Namespace for the geometry part of the AIDA detector description toolkit
namespace Alignments {
/// Namespace for implementation details of the AIDA detector description toolkit
namespace align {

// Forward declarations
class GlobalAlignmentCache;
Expand All @@ -36,29 +36,29 @@ namespace DD4hep {
class GlobalAlignmentWriter {
protected:
/// Reference to detector description
LCDD& m_lcdd;
Detector& m_detDesc;
/// Reference to the alignment cache
GlobalAlignmentCache* m_cache;

/// Add single alignment node to the XML document
void addNode(XML::Element elt, GlobalAlignment a) const;
void addNode(xml::Element elt, GlobalAlignment a) const;

public:
/// Initializing Constructor
GlobalAlignmentWriter(LCDD& lcdd);
GlobalAlignmentWriter(Detector& description);
/// Standard destructor
virtual ~GlobalAlignmentWriter();

/// Dump one full DetElement subtree into a newly created document
XML::Document dump(DetElement element, bool enable_transactions=false) const;
xml::Document dump(DetElement element, bool enable_transactions=false) const;
/// Scan one DetElement structure and return an XML element containing the alignment in this subtree.
XML::Element scan(XML::Document doc, DetElement element) const;
xml::Element scan(xml::Document doc, DetElement element) const;
/// Create the element corresponding to one single detector element without children
XML::Element createElement(XML::Document doc, DetElement element) const;
xml::Element createElement(xml::Document doc, DetElement element) const;
/// Write the XML document structure to a file.
long write(XML::Document doc, const std::string& output) const;
long write(xml::Document doc, const std::string& output) const;
};
} // End namespace XML
} // End namespace DD4hep
} // End namespace xml
} // End namespace dd4hep
#endif // DD4HEP_DDALIGN_GLOBALALIGNMENTWRITER_H

Loading

0 comments on commit 62469e5

Please sign in to comment.