diff --git a/DDDigi/CMakeLists.txt b/DDDigi/CMakeLists.txt index 583a32b9dc3354f2a8262bf0345eba131e91943b..2da6aba787b51a3dfa7a9819e2d2aa6dc1770fe3 100644 --- a/DDDigi/CMakeLists.txt +++ b/DDDigi/CMakeLists.txt @@ -11,13 +11,13 @@ dd4hep_package( DDDigi USES DDCore [ROOT REQUIRED COMPONENTS Geom GenVector RIO] + BOOST INCLUDE_DIRS include INSTALL_INCLUDES include/DDDigi ) #---Add Library--------------------------------------------------------------------- dd4hep_add_package_library(DDDigi SOURCES src/*.cpp [OPTIONAL TBB REQUIRED] - [OPTIONAL BOOST REQUIRED] ) if( TBB_INCLUDE_DIR ) dd4hep_print( "|++> TBB_INCLUDE_DIR --> ${TBB_INCLUDE_DIR}") diff --git a/DDDigi/include/DDDigi/DigiData.h b/DDDigi/include/DDDigi/DigiData.h index 7f3dc6cbf99cfe3b874051780e1c0b5661143116..175247668ac50c852f7405e240e331522f761c85 100644 --- a/DDDigi/include/DDDigi/DigiData.h +++ b/DDDigi/include/DDDigi/DigiData.h @@ -15,6 +15,7 @@ /// Framework include files #include "DD4hep/Any.h" +#include "DD4hep/Printout.h" #include "DD4hep/Primitives.h" #include "DD4hep/ObjectExtensions.h" @@ -165,19 +166,22 @@ namespace dd4hep { template<typename T> bool put(const Key& key, dd4hep::any&& object) { bool ret = data.emplace(key.toLong(),object).second; if ( ret ) return ret; - throw std::runtime_error("Invalid requested to store data in event container. Key:%ld",key.toLong()); + except("DigiEvent","Invalid requested to store data in event container. Key:%ld",key.toLong()); + throw std::runtime_error("DigiEvent"); // Will never get here! } /// Retrieve item by key from the event data container template<typename T> T& get(const Key& key) { auto iter = data.find(key.toLong()); if ( iter != data.end() ) return dd4hep::any_cast<T&>((*iter).second); - throw std::runtime_error("Invalid data requested from event container. Key:%ld",key.toLong()); + except("DigiEvent","Invalid data requested from event container. Key:%ld",key.toLong()); + throw std::runtime_error("DigiEvent"); // Will never get here! } /// Retrieve item by key from the event data container template<typename T> const T& get(const Key& key) const { auto iter = data.find(key.toLong()); if ( iter != data.end() ) return dd4hep::any_cast<const T&>((*iter).second); - throw std::runtime_error("Invalid data requested from event container. Key:%ld",key.toLong()); + except("DigiEvent","Invalid data requested from event container. Key:%ld",key.toLong()); + throw std::runtime_error("DigiEvent"); // Will never get here! } /// Add an extension object to the detector element void* addExtension(unsigned long long int k, ExtensionEntry* e) {