\hypertarget{_detector_tools_8cpp}{\section{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/src/\-Detector\-Tools.cpp File Reference}
\label{_detector_tools_8cpp}\index{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/src/\-Detector\-Tools.\-cpp@{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/src/\-Detector\-Tools.\-cpp}}
}
{\ttfamily \#include \char`\"{}D\-D4hep/\-Detector\-Tools.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}D\-D4hep/\-Printout.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}D\-D4hep/\-L\-C\-D\-D.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}D\-D4hep/objects/\-Detector\-Interna.\-h\char`\"{}}\\*
{\ttfamily \#include $<$stdexcept$>$}\\*
{\ttfamily \#include $<$memory$>$}\\*
{\ttfamily \#include \char`\"{}T\-Geo\-Matrix.\-h\char`\"{}}\\*
\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
\hyperlink{namespace_d_d4hep}{D\-D4hep}
\begin{DoxyCompactList}\small\item\em Namespace for the A\-I\-D\-A detector description toolkit. \end{DoxyCompactList}\item 
\hyperlink{namespace_d_d4hep_1_1_geometry}{D\-D4hep\-::\-Geometry}
\begin{DoxyCompactList}\small\item\em Namespace for the geometry part of the A\-I\-D\-A detector description toolkit. \end{DoxyCompactList}\item 
\hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools}
\begin{DoxyCompactList}\small\item\em Helper namespace used to answer detector element specific questons. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{_detector_tools_8cpp_a7743ad91c1b2cb6277edd479159dc25d}{D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
std\-::string \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_a57debfb96b86738cbde272df6791a644}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::element\-Path} (const \hyperlink{_detector_interna_8cpp_a3cbbf9c2993eea2563e163134c7ccfad}{Placement\-Path} \&nodes, bool reverse)
\begin{DoxyCompactList}\small\item\em Assemble the path of the \hyperlink{class_d_d4hep_1_1_geometry_1_1_placed_volume}{Placed\-Volume} selection. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_a33429898caa7f3ec3083fe50f04d01bc}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::element\-Path} (\hyperlink{class_d_d4hep_1_1_geometry_1_1_det_element}{Det\-Element} parent, \hyperlink{class_d_d4hep_1_1_geometry_1_1_det_element}{Det\-Element} elt, \hyperlink{_detector_interna_8cpp_a8d9eaa9b0f41299659b3aeb365ea8f47}{Element\-Path} \&detectors)
\begin{DoxyCompactList}\small\item\em Collect detector elements to any parent detector element. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_a2788bc98d530b548cab41a422c67b48b}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::element\-Path} (\hyperlink{class_d_d4hep_1_1_geometry_1_1_det_element}{Det\-Element} elt, \hyperlink{_detector_interna_8cpp_a3cbbf9c2993eea2563e163134c7ccfad}{Placement\-Path} \&nodes)
\begin{DoxyCompactList}\small\item\em Collect detector elements placements to the top detector element (world) \mbox{[}fast, but may have holes!\mbox{]}. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_a1855be34405c9ce43c236cfba6914850}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::element\-Path} (\hyperlink{class_d_d4hep_1_1_geometry_1_1_det_element}{Det\-Element} parent, \hyperlink{class_d_d4hep_1_1_geometry_1_1_det_element}{Det\-Element} element, \hyperlink{_detector_interna_8cpp_a3cbbf9c2993eea2563e163134c7ccfad}{Placement\-Path} \&nodes)
\begin{DoxyCompactList}\small\item\em Collect detector elements placements to the parent detector element \mbox{[}no holes!\mbox{]}. \end{DoxyCompactList}\item 
bool \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_a1bb51943ab0395ee0b1e4441b6a6b92a}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::find\-Child} (\hyperlink{class_d_d4hep_1_1_geometry_1_1_placed_volume}{Placed\-Volume} parent, \hyperlink{class_d_d4hep_1_1_geometry_1_1_placed_volume}{Placed\-Volume} child, \hyperlink{_detector_interna_8cpp_a3cbbf9c2993eea2563e163134c7ccfad}{Placement\-Path} \&path)
\begin{DoxyCompactList}\small\item\em Find Child of \hyperlink{class_d_d4hep_1_1_geometry_1_1_placed_volume}{Placed\-Volume} and assemble on the fly the path of Placed\-Volumes. \end{DoxyCompactList}\item 
static void \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_adc948b938f4fbbdc46ad6f47f35059a0}{D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::make\-Placement\-Path} (\hyperlink{_detector_interna_8cpp_a3cbbf9c2993eea2563e163134c7ccfad}{Placement\-Path} det\-\_\-nodes, \hyperlink{_detector_interna_8cpp_a3cbbf9c2993eea2563e163134c7ccfad}{Placement\-Path} \&all\-\_\-nodes)
\item 
static bool \hyperlink{_detector_tools_8cpp_a287f29a48c5755c7ef8d22b9b9ca4c90}{find\-Child\-By\-Name} (\hyperlink{class_d_d4hep_1_1_geometry_1_1_placed_volume}{Placed\-Volume} parent, \hyperlink{class_d_d4hep_1_1_geometry_1_1_placed_volume}{Placed\-Volume} child, \hyperlink{namespace_d_d4hep_1_1_geometry_1_1_detector_tools_a6cc33285199e04dd336a33e6e62925e6}{Detector\-Tools\-::\-Placement\-Path} \&path)
\begin{DoxyCompactList}\small\item\em Find Child of Placed\-Volume and assemble on the fly the path of Placed\-Volumes. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\hypertarget{_detector_tools_8cpp_a7743ad91c1b2cb6277edd479159dc25d}{\index{Detector\-Tools.\-cpp@{Detector\-Tools.\-cpp}!D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P@{D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P}}
\index{D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P@{D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P}!DetectorTools.cpp@{Detector\-Tools.\-cpp}}
\subsubsection[{D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P}]{\setlength{\rightskip}{0pt plus 5cm}\#define D\-E\-T\-E\-C\-T\-O\-R\-T\-O\-O\-L\-S\-\_\-\-C\-P\-P}}\label{_detector_tools_8cpp_a7743ad91c1b2cb6277edd479159dc25d}


Definition at line 15 of file Detector\-Tools.\-cpp.



\subsection{Function Documentation}
\hypertarget{_detector_tools_8cpp_a287f29a48c5755c7ef8d22b9b9ca4c90}{\index{Detector\-Tools.\-cpp@{Detector\-Tools.\-cpp}!find\-Child\-By\-Name@{find\-Child\-By\-Name}}
\index{find\-Child\-By\-Name@{find\-Child\-By\-Name}!DetectorTools.cpp@{Detector\-Tools.\-cpp}}
\subsubsection[{find\-Child\-By\-Name}]{\setlength{\rightskip}{0pt plus 5cm}static bool find\-Child\-By\-Name (
\begin{DoxyParamCaption}
\item[{{\bf Placed\-Volume}}]{parent, }
\item[{{\bf Placed\-Volume}}]{child, }
\item[{{\bf Detector\-Tools\-::\-Placement\-Path} \&}]{path}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{_detector_tools_8cpp_a287f29a48c5755c7ef8d22b9b9ca4c90}


Find Child of Placed\-Volume and assemble on the fly the path of Placed\-Volumes. 



Definition at line 105 of file Detector\-Tools.\-cpp.



References D\-D4hep\-::\-Handle$<$ T $>$\-::is\-Valid(), and D\-D4hep\-::\-Handle$<$ T $>$\-::ptr().



Referenced by D\-D4hep\-::\-Geometry\-::\-Detector\-Tools\-::make\-Placement\-Path().

