IOPool
Streamer
interface
StreamerOutputModule.h
Go to the documentation of this file.
1
#ifndef IOPool_Streamer_StreamerOutputModule_h
2
#define IOPool_Streamer_StreamerOutputModule_h
3
4
#include "
FWCore/ParameterSet/interface/ConfigurationDescriptions.h
"
5
#include "
FWCore/Utilities/interface/propagate_const.h
"
6
#include "
IOPool/Streamer/interface/StreamerOutputModuleBase.h
"
7
8
namespace
edm
{
9
template
<
typename
Consumer>
10
class
StreamerOutputModule
:
public
StreamerOutputModuleBase
{
19
public
:
20
explicit
StreamerOutputModule
(
ParameterSet
const
& ps);
21
~StreamerOutputModule
()
override
;
22
static
void
fillDescriptions
(
ConfigurationDescriptions
& descriptions);
23
24
private
:
25
void
start
()
override
;
26
void
stop
()
override
;
27
void
doOutputHeader
(
InitMsgBuilder
const
& init_message)
override
;
28
void
doOutputEvent
(
EventMsgBuilder
const
&
msg
)
override
;
29
void
beginLuminosityBlock
(
edm::LuminosityBlockForOutput
const
&)
override
;
30
void
endLuminosityBlock
(
edm::LuminosityBlockForOutput
const
&)
override
;
31
32
private
:
33
edm::propagate_const<std::unique_ptr<Consumer>
>
c_
;
34
};
//end-of-class-def
35
36
template
<
typename
Consumer>
37
StreamerOutputModule<Consumer>::StreamerOutputModule
(
ParameterSet
const
& ps)
38
:
edm
::one::
OutputModuleBase
::
OutputModuleBase
(ps),
StreamerOutputModuleBase
(ps), c_(new Consumer(ps)) {}
39
40
template
<
typename
Consumer>
41
StreamerOutputModule<Consumer>::~StreamerOutputModule
() {}
42
43
template
<
typename
Consumer>
44
void
StreamerOutputModule<Consumer>::start
() {
45
c_->start();
46
}
47
48
template
<
typename
Consumer>
49
void
StreamerOutputModule<Consumer>::stop
() {
50
c_->stop();
51
}
52
53
template
<
typename
Consumer>
54
void
StreamerOutputModule<Consumer>::doOutputHeader
(
InitMsgBuilder
const
& init_message) {
55
c_->doOutputHeader(init_message);
56
}
57
58
//______________________________________________________________________________
59
template
<
typename
Consumer>
60
void
StreamerOutputModule<Consumer>::doOutputEvent
(
EventMsgBuilder
const
&
msg
) {
61
c_->doOutputEvent(
msg
);
// You can't use msg in StreamerOutputModule after this point
62
}
63
64
template
<
typename
Consumer>
65
void
StreamerOutputModule<Consumer>::beginLuminosityBlock
(
edm::LuminosityBlockForOutput
const
&) {}
66
67
template
<
typename
Consumer>
68
void
StreamerOutputModule<Consumer>::endLuminosityBlock
(
edm::LuminosityBlockForOutput
const
&) {}
69
70
template
<
typename
Consumer>
71
void
StreamerOutputModule<Consumer>::fillDescriptions
(
ConfigurationDescriptions
& descriptions) {
72
ParameterSetDescription
desc;
73
StreamerOutputModuleBase::fillDescription
(desc);
74
Consumer::fillDescription(desc);
75
descriptions.
add
(
"streamerOutput"
, desc);
76
}
77
}
// namespace edm
78
79
#endif
ConfigurationDescriptions.h
InitMsgBuilder
Definition:
InitMsgBuilder.h:9
edm::StreamerOutputModule::doOutputHeader
void doOutputHeader(InitMsgBuilder const &init_message) override
Definition:
StreamerOutputModule.h:54
edm::StreamerOutputModuleBase::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition:
StreamerOutputModuleBase.cc:68
edm::StreamerOutputModule::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlockForOutput const &) override
Definition:
StreamerOutputModule.h:68
propagate_const.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::StreamerOutputModuleBase
Definition:
StreamerOutputModuleBase.h:20
edm::StreamerOutputModule::StreamerOutputModule
StreamerOutputModule(ParameterSet const &ps)
Definition:
StreamerOutputModule.h:37
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
edm::StreamerOutputModule::start
void start() override
Definition:
StreamerOutputModule.h:44
mps_check.msg
tuple msg
Definition:
mps_check.py:285
edm::StreamerOutputModule::~StreamerOutputModule
~StreamerOutputModule() override
Definition:
StreamerOutputModule.h:41
EventMsgBuilder
Definition:
EventMsgBuilder.h:8
edm::LuminosityBlockForOutput
Definition:
LuminosityBlockForOutput.h:40
edm::StreamerOutputModule
Definition:
StreamerOutputModule.h:10
edm::propagate_const
Definition:
propagate_const.h:32
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition:
ConfigurationDescriptions.cc:57
edm::StreamerOutputModule::fillDescriptions
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition:
StreamerOutputModule.h:71
edm::ConfigurationDescriptions
Definition:
ConfigurationDescriptions.h:28
OutputModuleBase
edm::ParameterSet
Definition:
ParameterSet.h:36
StreamerOutputModuleBase.h
edm::StreamerOutputModule::doOutputEvent
void doOutputEvent(EventMsgBuilder const &msg) override
Definition:
StreamerOutputModule.h:60
edm::StreamerOutputModule::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlockForOutput const &) override
Definition:
StreamerOutputModule.h:65
edm::StreamerOutputModule::c_
edm::propagate_const< std::unique_ptr< Consumer > > c_
Definition:
StreamerOutputModule.h:33
edm::StreamerOutputModule::stop
void stop() override
Definition:
StreamerOutputModule.h:49
Generated for CMSSW Reference Manual by
1.8.16