DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Callback.cpp
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 // Author : M.Frank
11 //
12 //==========================================================================
13 
14 // Framework include files
15 #include <DD4hep/Callback.h>
16 #include <DD4hep/Exceptions.h>
17 
19 void dd4hep::CallbackSequence::checkTypes(const std::type_info& typ1, const std::type_info& typ2, void* test) {
20  if (!test) {
21  throw unrelated_type_error(typ1, typ2, "Cannot install a callback for these 2 types.");
22  }
23 }
24 
dd4hep::CallbackSequence::checkTypes
static void checkTypes(const std::type_info &typ1, const std::type_info &typ2, void *test)
Check the compatibility of two typed objects. The test is the result of a dynamic_cast.
Definition: Callback.cpp:19
Callback.h
Exceptions.h