\hypertarget{_primitives_8h}{\section{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/include/\-D\-D4hep/\-Primitives.h File Reference}
\label{_primitives_8h}\index{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/include/\-D\-D4hep/\-Primitives.\-h@{/opt/ilcsoft/\-H\-E\-A\-D-\/2016-\/12-\/02/\-D\-D4hep/\-H\-E\-A\-D/\-D\-D\-Core/include/\-D\-D4hep/\-Primitives.\-h}}
}
{\ttfamily \#include $<$map$>$}\\*
{\ttfamily \#include $<$vector$>$}\\*
{\ttfamily \#include $<$string$>$}\\*
{\ttfamily \#include $<$limits$>$}\\*
{\ttfamily \#include $<$typeinfo$>$}\\*
{\ttfamily \#include $<$algorithm$>$}\\*
{\ttfamily \#include $<$stdexcept$>$}\\*
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{class_d_d4hep_1_1invalid__handle__exception}{D\-D4hep\-::invalid\-\_\-handle\-\_\-exception}
\begin{DoxyCompactList}\small\item\em Specialized exception to be thrown if invalid handles are accessed. \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_primitive}{D\-D4hep\-::\-Primitive$<$ T $>$}
\begin{DoxyCompactList}\small\item\em A bit of support for printing primitives. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_component_cast}{D\-D4hep\-::\-Component\-Cast}
\begin{DoxyCompactList}\small\item\em Class to perform dynamic casts using unknown pointers. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_destroy_object}{D\-D4hep\-::\-Destroy\-Object$<$ T $>$}
\begin{DoxyCompactList}\small\item\em Functor to delete objects from heap and reset the pointer. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_select2nd}{D\-D4hep\-::\-Select2nd$<$ T $>$}
\begin{DoxyCompactList}\small\item\em Operator to select second element of a pair. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_select1st}{D\-D4hep\-::\-Select1st$<$ T $>$}
\begin{DoxyCompactList}\small\item\em Operator to select the first element of a pair. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_destroy_objects}{D\-D4hep\-::\-Destroy\-Objects$<$ M $>$}
\begin{DoxyCompactList}\small\item\em map Functor to delete objects from heap \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_destroy_first}{D\-D4hep\-::\-Destroy\-First$<$ M $>$}
\begin{DoxyCompactList}\small\item\em map Functor to delete objects from heap \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_release_object}{D\-D4hep\-::\-Release\-Object$<$ T $>$}
\begin{DoxyCompactList}\small\item\em Functor to release objects from heap and reset the pointer. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_release_objects}{D\-D4hep\-::\-Release\-Objects$<$ M $>$}
\begin{DoxyCompactList}\small\item\em Map Functor to release objects from heap. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_reference_object}{D\-D4hep\-::\-Reference\-Object$<$ T $>$}
\begin{DoxyCompactList}\small\item\em Functor to delete objects from heap and reset the pointer. \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_reference_objects}{D\-D4hep\-::\-Reference\-Objects$<$ M $>$}
\begin{DoxyCompactList}\small\item\em Functor to delete objects from heap and reset the pointer. \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_apply_mem_func}{D\-D4hep\-::\-Apply\-Mem\-Func$<$ R, T $>$}
\begin{DoxyCompactList}\small\item\em Member function call-\/functor with no arguments. \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_apply_mem_func1}{D\-D4hep\-::\-Apply\-Mem\-Func1$<$ R, T, A1 $>$}
\begin{DoxyCompactList}\small\item\em Member function call-\/functor with 1 argument. \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_apply_mem_func2}{D\-D4hep\-::\-Apply\-Mem\-Func2$<$ R, T, A1, A2 $>$}
\begin{DoxyCompactList}\small\item\em Member function call-\/functor with 2 arguments. \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_apply_mem_func_const}{D\-D4hep\-::\-Apply\-Mem\-Func\-Const$<$ R, T $>$}
\begin{DoxyCompactList}\small\item\em Member function call-\/functor with no arguments (const version) \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_apply_mem_func_const1}{D\-D4hep\-::\-Apply\-Mem\-Func\-Const1$<$ R, T, A1 $>$}
\begin{DoxyCompactList}\small\item\em Member function call-\/functor with 1 argument (const version) \end{DoxyCompactList}\item 
struct \hyperlink{struct_d_d4hep_1_1_apply_mem_func_const2}{D\-D4hep\-::\-Apply\-Mem\-Func\-Const2$<$ R, T, A1, A2 $>$}
\begin{DoxyCompactList}\small\item\em Member function call-\/functor with 2 arguments (const version) \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_apply1rst}{D\-D4hep\-::\-Apply1rst$<$ M, F\-C\-N $>$}
\begin{DoxyCompactList}\small\item\em Generic map Functor to act on first element (key) \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_apply2nd}{D\-D4hep\-::\-Apply2nd$<$ M, F\-C\-N $>$}
\begin{DoxyCompactList}\small\item\em Generic map Functor to act on second element (mapped type) \end{DoxyCompactList}\item 
class \hyperlink{class_d_d4hep_1_1_reference_bit_mask}{D\-D4hep\-::\-Reference\-Bit\-Mask$<$ T $>$}
\begin{DoxyCompactList}\small\item\em Data structure to manipulate a bitmask held by reference and represented by an integer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\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_d_d_segmentation}{D\-D4hep\-::\-D\-D\-Segmentation}
\begin{DoxyCompactList}\small\item\em Namespace for base segmentations. \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}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef long long int \hyperlink{namespace_d_d4hep_1_1_d_d_segmentation_ac7af071d85cb48820914434a07e21ba1}{D\-D4hep\-::\-D\-D\-Segmentation\-::\-Cell\-I\-D}
\begin{DoxyCompactList}\small\item\em Useful typedefs to differentiate cell I\-Ds and volume I\-Ds. \end{DoxyCompactList}\item 
typedef long long int \hyperlink{namespace_d_d4hep_1_1_d_d_segmentation_a61a6833a18d1800bdef176595f83e3ba}{D\-D4hep\-::\-D\-D\-Segmentation\-::\-Volume\-I\-D}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
unsigned int \hyperlink{namespace_d_d4hep_a64c38e1f6b17efb9177457a3f2690daa}{D\-D4hep\-::hash32} (const char $\ast$key)
\begin{DoxyCompactList}\small\item\em We need it so often\-: one-\/at-\/time 32 bit hash function. \end{DoxyCompactList}\item 
unsigned int \hyperlink{namespace_d_d4hep_a856fab7f400a9e8c0e3f999f933d3883}{D\-D4hep\-::hash32} (const std\-::string \&key)
\item 
long int \hyperlink{namespace_d_d4hep_ae99d8100ffc43cc104f89aae55187f11}{D\-D4hep\-::make\-Time} (int year, int month, int day, int hour=0, int minutes=0, int seconds=0)
\begin{DoxyCompactList}\small\item\em Convert date into epoch time (seconds since 1970) \end{DoxyCompactList}\item 
long int \hyperlink{namespace_d_d4hep_adf6475d1fb2f6f99ec94fd7bbcae5e49}{D\-D4hep\-::make\-Time} (const std\-::string \&date, const char $\ast$fmt=\char`\"{}\%d-\/\%\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m}-\/\%Y \%H\-:\%M\-:\%S\char`\"{})
\begin{DoxyCompactList}\small\item\em Convert date into epoch time (seconds since 1970) \end{DoxyCompactList}\item 
std\-::string \hyperlink{namespace_d_d4hep_aac3aec612736d0521670ca2e7b1305bd}{D\-D4hep\-::type\-Name} (const std\-::type\-\_\-info \&type)
\begin{DoxyCompactList}\small\item\em A\-B\-I information about type names. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_ad28e7066d6a18fdd0422755c43425883}{D\-D4hep\-::typeinfo\-Check} (const std\-::type\-\_\-info \&typ1, const std\-::type\-\_\-info \&typ2, const std\-::string \&text=\char`\"{}\char`\"{})
\begin{DoxyCompactList}\small\item\em Check type infos for equivalence (dynamic casts) using A\-B\-I information. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_abe634ec00c4fc9e3a5e722ad0865d848}{D\-D4hep\-::invalid\-Handle\-Error} (const std\-::type\-\_\-info \&type)
\begin{DoxyCompactList}\small\item\em Throw exception when handles are check for validity. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_a5f946a2ebf8795b6a70037ff00ad2aab}{D\-D4hep\-::invalid\-Handle\-Assignment\-Error} (const std\-::type\-\_\-info \&from, const std\-::type\-\_\-info \&to)
\begin{DoxyCompactList}\small\item\em Throw exception when handles are badly assigned. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_ac1ec54d96148f5c3e8150944ba390d34}{D\-D4hep\-::invalid\-Handle\-Error} ()
\begin{DoxyCompactList}\small\item\em Throw exception when handles are check for validity. \end{DoxyCompactList}\item 
void \hyperlink{namespace_d_d4hep_a2567960a4486c9f442089e0893b84d27}{D\-D4hep\-::not\-Implemented} (const std\-::string \&msg)
\begin{DoxyCompactList}\small\item\em Throw exception when handles are check for validity. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a75e45fd87352ce6cd4a2643db432e165}{D\-D4hep\-::copy\-Object} (void $\ast$target, const void $\ast$source)
\begin{DoxyCompactList}\small\item\em Helper to copy objects. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a669c4e7f90457026257585c1deb62d1e}{D\-D4hep\-::destruct\-Object} (\hyperlink{class_t}{T} $\ast$p)
\begin{DoxyCompactList}\small\item\em Helper to destruct objects. Note\-: The memory is N\-O\-T released! \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a14ac1cc5b1c931da327a5b2ed57fdd85}{D\-D4hep\-::delete\-Ptr} (\hyperlink{class_t}{T} $\ast$\&p)
\begin{DoxyCompactList}\small\item\em Helper to delete objects from heap and reset the pointer. Saves many many lines of code. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_ab17a8692fe8e07072174088bb872a67d}{D\-D4hep\-::delete\-Object} (\hyperlink{class_t}{T} $\ast$p)
\begin{DoxyCompactList}\small\item\em Helper to delete objects from heap and reset the pointer. Saves many many lines of code. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a810f6459a5e1e3e5e55f081862bb4d16}{D\-D4hep\-::destroy\-Object} (\hyperlink{class_t}{T} $\ast$\&p)
\begin{DoxyCompactList}\small\item\em Helper to delete objects from heap and reset the pointer. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\Select2nd$<$ typename T\-::value\-\_\-type $>$ \hyperlink{namespace_d_d4hep_a22c05bed3f5fb9b01958d687af1cad65}{D\-D4hep\-::select2nd} (const \hyperlink{class_t}{T} \&)
\begin{DoxyCompactList}\small\item\em Generator to create Operator to select value elements of a map. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\Select1st$<$ typename T\-::value\-\_\-type $>$ \hyperlink{namespace_d_d4hep_a213624c480553b45f428618f77e27d2f}{D\-D4hep\-::select1st} (const \hyperlink{class_t}{T} \&)
\begin{DoxyCompactList}\small\item\em Generator to create Operator to select key values of a map. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename M $>$ }\\void \hyperlink{namespace_d_d4hep_ae239c6d3c17def89a9b82c1ea27a9fd7}{D\-D4hep\-::destroy\-Objects} (M \&\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m})
\item 
{\footnotesize template$<$typename M $>$ }\\Destroy\-Objects$<$ M $>$ \hyperlink{namespace_d_d4hep_a81661ef6868ba17c006826cace56f4aa}{D\-D4hep\-::destroy2nd} (M \&\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m})
\item 
{\footnotesize template$<$typename M $>$ }\\void \hyperlink{namespace_d_d4hep_affba2c49c016cc41716f1d6a020064bf}{D\-D4hep\-::destroy\-First} (M \&\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m})
\item 
{\footnotesize template$<$typename M $>$ }\\void \hyperlink{namespace_d_d4hep_ad97ecff6ba06daf5d6dc7225dfad6361}{D\-D4hep\-::destroy1st} (M \&\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m})
\item 
{\footnotesize template$<$typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a80530363d2dcb2990f1ebacbfb69b789}{D\-D4hep\-::release\-Ptr} (\hyperlink{class_t}{T} \&p)
\begin{DoxyCompactList}\small\item\em Helper to delete objects from heap and reset the pointer. Saves many many lines of code. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename M $>$ }\\Release\-Object$<$ typename \\*
M\-::value\-\_\-type $>$ \hyperlink{namespace_d_d4hep_a22ef55856c463708ea72a02dcca99fc1}{D\-D4hep\-::release\-Object} (M \&)
\item 
{\footnotesize template$<$typename M $>$ }\\void \hyperlink{namespace_d_d4hep_af72014aac51cad36a418913e989a34fe}{D\-D4hep\-::release\-Objects} (M \&\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m})
\item 
{\footnotesize template$<$typename M $>$ }\\void \hyperlink{namespace_d_d4hep_a5af94cb0280d674c7aaca30de20011bb}{D\-D4hep\-::release2nd} (M \&\hyperlink{_volumes_8cpp_a6fc379aaec47ce424b00d8ffda2a6c59}{m})
\item 
{\footnotesize template$<$typename M $>$ }\\Reference\-Object$<$ M $>$ \hyperlink{namespace_d_d4hep_aab84633731b55f6c8d2dc7f01ccf82b4}{D\-D4hep\-::reference\-Object} (M \&)
\item 
{\footnotesize template$<$typename M $>$ }\\Reference\-Objects$<$ typename \\*
M\-::value\-\_\-type $>$ \hyperlink{namespace_d_d4hep_a807f6ff44b17f4094a962fa879248085}{D\-D4hep\-::reference2nd} (M \&)
\item 
{\footnotesize template$<$typename C , typename R , typename T $>$ }\\void \hyperlink{namespace_d_d4hep_ac43b4e908a07dd4d419396751191c52c}{D\-D4hep\-::call\-\_\-member\-\_\-func} (C \&object, R(T\-::$\ast$pmf)())
\item 
{\footnotesize template$<$typename C , typename R , typename T , typename A1 $>$ }\\void \hyperlink{namespace_d_d4hep_af85c917bc78ceb8bd162191e686578b2}{D\-D4hep\-::call\-\_\-member\-\_\-func} (C \&object, R(T\-::$\ast$pmf)(A1 a1), A1 a1)
\item 
{\footnotesize template$<$typename C , typename R , typename T , typename A1 , typename A2 $>$ }\\void \hyperlink{namespace_d_d4hep_a123cb5c06581e94fe514c2da52cd79d6}{D\-D4hep\-::call\-\_\-member\-\_\-func} (C \&object, R(T\-::$\ast$pmf)(A1 a1, A2 a2), A1 a1, A2 a2)
\item 
{\footnotesize template$<$typename C , typename F\-C\-N $>$ }\\Apply1rst$<$ C, F\-C\-N $>$ \hyperlink{namespace_d_d4hep_a75dc945aea0045c5f5c9ce4315b77d3b}{D\-D4hep\-::apply\-\_\-\-\_\-1rst\-\_\-value} (C \&, const F\-C\-N \&func)
\item 
{\footnotesize template$<$typename C , typename F\-C\-N $>$ }\\void \hyperlink{namespace_d_d4hep_aab8df72602001832a3e4105705b0eb66}{D\-D4hep\-::apply1rst} (C \&object, const F\-C\-N \&func)
\item 
{\footnotesize template$<$typename C , typename R , typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a75d29652b2ebf470d395c581d50ed63c}{D\-D4hep\-::apply1rst} (C \&object, R(T\-::$\ast$pmf)())
\item 
{\footnotesize template$<$typename C , typename R , typename T , typename A1 $>$ }\\void \hyperlink{namespace_d_d4hep_a05ec64b906bbf71787bb54a37443bd61}{D\-D4hep\-::apply1rst} (C object, R(T\-::$\ast$pmf)(A1 a1), A1 a1)
\item 
{\footnotesize template$<$typename C , typename F\-C\-N $>$ }\\Apply2nd$<$ C, F\-C\-N $>$ \hyperlink{namespace_d_d4hep_afc7d2a60cdb6a3cbc5ef50ae3dc515e3}{D\-D4hep\-::apply\-\_\-\-\_\-2nd\-\_\-value} (C \&, const F\-C\-N \&func)
\item 
{\footnotesize template$<$typename C , typename F\-C\-N $>$ }\\void \hyperlink{namespace_d_d4hep_a4137ce26160b52fbd421be1f6b3fdd3a}{D\-D4hep\-::apply2nd} (C \&object, const F\-C\-N \&func)
\item 
{\footnotesize template$<$typename C , typename R , typename T $>$ }\\void \hyperlink{namespace_d_d4hep_a2e08c4f02331450925ff16a4fd902f6e}{D\-D4hep\-::apply2nd} (C \&object, R(T\-::$\ast$pmf)())
\item 
{\footnotesize template$<$typename C , typename R , typename T , typename A1 $>$ }\\void \hyperlink{namespace_d_d4hep_ad8ba7e02c7d191ebeefb36f2a9278bbb}{D\-D4hep\-::apply2nd} (C object, R(T\-::$\ast$pmf)(A1 a1), A1 a1)
\end{DoxyCompactItemize}
