DataFormats
Common
interface
FunctorHandleExceptionFactory.h
Go to the documentation of this file.
1
#ifndef Subsystem_Package_FunctorHandleExceptionFactory_h
2
#define Subsystem_Package_FunctorHandleExceptionFactory_h
3
// -*- C++ -*-
4
//
5
// Package: Subsystem/Package
6
// Class : FunctorHandleExceptionFactory
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Wed, 04 Dec 2013 18:41:59 GMT
19
//
20
21
// system include files
22
#include "
DataFormats/Common/interface/HandleExceptionFactory.h
"
23
24
// user include files
25
26
// forward declarations
27
namespace
edm
{
28
29
template
<
typename
T>
30
class
FunctorHandleExceptionFactory
:
public
HandleExceptionFactory
{
31
public
:
32
FunctorHandleExceptionFactory
(
T
&& iFunctor) :
m_functor
(
std
::
move
(iFunctor)) {}
33
34
//FunctorHandleExceptionFactory(T iFunctor) : m_functor(iFunctor) {}
35
36
// ---------- const member functions ---------------------
37
38
std::shared_ptr<cms::Exception>
make
()
const override
{
return
m_functor
(); }
39
40
private
:
41
T
m_functor
;
42
};
43
44
template
<
typename
T>
45
std::shared_ptr<HandleExceptionFactory>
makeHandleExceptionFactory
(
T
&& iFunctor) {
46
return
std::make_shared<FunctorHandleExceptionFactory<T>>(
std::move
(iFunctor));
47
}
48
}
// namespace edm
49
50
#endif
HandleExceptionFactory.h
edm::FunctorHandleExceptionFactory::m_functor
T m_functor
Definition:
FunctorHandleExceptionFactory.h:41
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::makeHandleExceptionFactory
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
Definition:
FunctorHandleExceptionFactory.h:45
edm::FunctorHandleExceptionFactory::make
std::shared_ptr< cms::Exception > make() const override
Definition:
FunctorHandleExceptionFactory.h:38
edm::FunctorHandleExceptionFactory::FunctorHandleExceptionFactory
FunctorHandleExceptionFactory(T &&iFunctor)
Definition:
FunctorHandleExceptionFactory.h:32
eostools.move
def move(src, dest)
Definition:
eostools.py:511
std
Definition:
JetResolutionObject.h:76
T
long double T
Definition:
Basic3DVectorLD.h:48
edm::HandleExceptionFactory
Definition:
HandleExceptionFactory.h:40
edm::FunctorHandleExceptionFactory
Definition:
FunctorHandleExceptionFactory.h:30
Generated for CMSSW Reference Manual by
1.8.16