Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
{
kInfo
,
kWarning
,
kError
,
kSysError
,
kFatal
};
10
11
private
:
12
struct
WarningSentry
{
13
WarningSentry
(
RootHandlers
* iHandler,
SeverityLevel
level
) :
m_handler
(iHandler) {
14
m_handler
->ignoreWarnings_(level);
15
};
16
~WarningSentry
() {
m_handler
->enableWarnings_(); }
17
edm::propagate_const<RootHandlers*>
m_handler
;
18
};
19
friend
struct
edm::RootHandlers::WarningSentry
;
20
friend
class
edm::EventProcessor
;
21
22
public
:
23
virtual
~RootHandlers
() {}
24
25
template
<
typename
F>
26
void
ignoreWarningsWhileDoing
(
F
iFunc,
SeverityLevel
level
=
SeverityLevel::kWarning
) {
27
WarningSentry
sentry(
this
,
level
);
28
iFunc();
29
}
30
31
private
:
32
virtual
void
willBeUsingThreads
() = 0;
33
34
virtual
void
enableWarnings_
() = 0;
35
virtual
void
ignoreWarnings_
(
SeverityLevel
level
) = 0;
36
};
37
}
// end of namespace edm
38
39
#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
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:17
edm::RootHandlers::WarningSentry::WarningSentry
WarningSentry(RootHandlers *iHandler, SeverityLevel level)
Definition:
RootHandlers.h:13
edm::RootHandlers::ignoreWarningsWhileDoing
void ignoreWarningsWhileDoing(F iFunc, SeverityLevel level=SeverityLevel::kWarning)
Definition:
RootHandlers.h:26
edm::RootHandlers::WarningSentry
Definition:
RootHandlers.h:12
edm::RootHandlers::SeverityLevel::kSysError
edm::RootHandlers::SeverityLevel::kInfo
edm::RootHandlers::SeverityLevel::kWarning
edm::RootHandlers::~RootHandlers
virtual ~RootHandlers()
Definition:
RootHandlers.h:23
edm::EventProcessor
Definition:
EventProcessor.h:66
edm::RootHandlers::SeverityLevel::kError
testEve_cfg.level
tuple level
Definition:
testEve_cfg.py:47
edm::RootHandlers::WarningSentry::~WarningSentry
~WarningSentry()
Definition:
RootHandlers.h:16
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition:
blowfish.cc:163
propagate_const.h
Generated for CMSSW Reference Manual by
1.8.5