-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ASSIMP: adapt for changes in TGeoTesselated in ROOT
- Loading branch information
1 parent
0a2267e
commit e942539
Showing
6 changed files
with
89 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
//========================================================================== | ||
// AIDA Detector description implementation | ||
//-------------------------------------------------------------------------- | ||
// Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) | ||
// All rights reserved. | ||
// | ||
// For the licensing terms see $DD4hepINSTALL/LICENSE. | ||
// For the list of contributors see $DD4hepINSTALL/doc/CREDITS. | ||
// | ||
// Author : A. Sailer | ||
// | ||
//========================================================================== | ||
#ifndef DDCAD_UTILITIES_H | ||
#define DDCAD_UTILITIES_H | ||
|
||
#include <TGeoTessellated.h> | ||
#include <TGeoVector3.h> | ||
/// Namespace for the AIDA detector description toolkit | ||
namespace dd4hep { | ||
|
||
/// Namespace for implementation details of the AIDA detector description toolkit | ||
namespace cad { | ||
|
||
inline std::stringstream streamFacet(TGeoFacet const& facet, | ||
TGeoTessellated const& shape) { | ||
using ::operator<<; | ||
std::stringstream str; | ||
#if ROOT_VERSION_CODE >= ROOT_VERSION(6,31,1) | ||
str << "{"; | ||
for (int i = 0; i < facet.GetNvert(); ++i) { | ||
str << shape.GetVertex(facet[i]); | ||
if (i != facet.GetNvert() - 1) | ||
str << ", "; | ||
} | ||
str << "}"; | ||
#else | ||
str << facet; | ||
#endif | ||
return str; | ||
} | ||
|
||
inline std::stringstream streamVertices(ROOT::Geom::Vertex_t const& v1, | ||
ROOT::Geom::Vertex_t const& v2, | ||
ROOT::Geom::Vertex_t const& v3) { | ||
using ::operator<<; | ||
std::stringstream str; | ||
str << "{" << v1 << ", " << v2 << ", " << v3 << "}"; | ||
return str; | ||
} | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters