Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:01

0001 #ifndef FWCore_Framework_ESHandleExceptionFactory_h
0002 #define FWCore_Framework_ESHandleExceptionFactory_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     FWCore/Framework
0006 // Class  :     ESHandleExceptionFactory
0007 //
0008 /**\class edm::ESHandleExceptionFactory
0009 
0010  Description: Creates exceptions for an edm::ESHandle
0011 
0012  Usage:
0013     When an event setup data product is requested which is not available,
0014  the edm::ESHandle<> will hold an edm::ESHandleExceptionFactory which is
0015  used to manufacture the exception which will be thrown if the ESHandle
0016  is dereferenced.
0017  Using a factory over having the exception already in the ESHandle
0018  is faster for the case where code calls Handle::isValid before
0019  dereferencing.
0020 
0021 */
0022 //
0023 // Original Author:  W. David Dagenhart
0024 //         Created:  1 May 2014
0025 //
0026 
0027 #include <exception>
0028 
0029 namespace edm {
0030 
0031   class ESHandleExceptionFactory {
0032   public:
0033     ESHandleExceptionFactory();
0034     virtual ~ESHandleExceptionFactory();
0035 
0036     virtual std::exception_ptr make() const = 0;
0037   };
0038 }  // namespace edm
0039 #endif