Main Page
Namespaces
Classes
Package Documentation
FWCore
Utilities
interface
RootHandlers.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_RootHandlers_h
2
#define FWCore_Utilities_RootHandlers_h
3
4
#include "
FWCore/Utilities/interface/propagate_const.h
"
5
namespace
edm
{
6
class
EventProcessor;
7
class
RootHandlers
{
8
public
:
9
enum class
SeverityLevel
{
10
kInfo
,
11
kWarning
,
12
kError
,
13
kSysError
,
14
kFatal
15
};
16
17
private
:
18
struct
WarningSentry
{
19
WarningSentry
(
RootHandlers
* iHandler,
SeverityLevel
level
): m_handler(iHandler){
20
m_handler->ignoreWarnings_(level);
21
};
22
~WarningSentry
() {
23
m_handler->enableWarnings_();
24
}
25
edm::propagate_const<RootHandlers*>
m_handler
;
26
};
27
friend
struct
edm::RootHandlers::WarningSentry
;
28
friend
class
edm::EventProcessor
;
29
30
public
:
31
virtual
~RootHandlers
() {}
32
33
template
<
typename
F>
34
void
ignoreWarningsWhileDoing
(
F
iFunc,
SeverityLevel
level
=
SeverityLevel::kWarning
) {
35
WarningSentry
sentry(
this
,
level
);
36
iFunc();
37
}
38
39
private
:
40
virtual
void
willBeUsingThreads
() = 0;
41
42
virtual
void
enableWarnings_
() = 0;
43
virtual
void
ignoreWarnings_
(
SeverityLevel
level
) = 0;
44
};
45
}
// end of namespace edm
46
47
#endif // InitRootHandlers_H
edm::RootHandlers::SeverityLevel
SeverityLevel
Definition:
RootHandlers.h:9
edm::propagate_const
Definition:
propagate_const.h:32
edm::RootHandlers::SeverityLevel::kFatal
edm::RootHandlers
Definition:
RootHandlers.h:7
edm::RootHandlers::ignoreWarnings_
virtual void ignoreWarnings_(SeverityLevel level)=0
hcalDigis_cfi.level
level
Definition:
hcalDigis_cfi.py:18
edm::RootHandlers::willBeUsingThreads
virtual void willBeUsingThreads()=0
edm::RootHandlers::enableWarnings_
virtual void enableWarnings_()=0
edm::RootHandlers::WarningSentry::m_handler
edm::propagate_const< RootHandlers * > m_handler
Definition:
RootHandlers.h:25
edm::RootHandlers::WarningSentry::WarningSentry
WarningSentry(RootHandlers *iHandler, SeverityLevel level)
Definition:
RootHandlers.h:19
edm::RootHandlers::ignoreWarningsWhileDoing
void ignoreWarningsWhileDoing(F iFunc, SeverityLevel level=SeverityLevel::kWarning)
Definition:
RootHandlers.h:34
edm::RootHandlers::WarningSentry
Definition:
RootHandlers.h:18
edm::RootHandlers::SeverityLevel::kSysError
edm::RootHandlers::SeverityLevel::kInfo
edm::RootHandlers::SeverityLevel::kWarning
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::RootHandlers::~RootHandlers
virtual ~RootHandlers()
Definition:
RootHandlers.h:31
edm::EventProcessor
Definition:
EventProcessor.h:63
edm::RootHandlers::SeverityLevel::kError
edm::RootHandlers::WarningSentry::~WarningSentry
~WarningSentry()
Definition:
RootHandlers.h:22
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition:
blowfish.cc:281
propagate_const.h
Generated for CMSSW Reference Manual by
1.8.11