src
IOPool
Streamer
src
StreamerFileWriter.cc
Go to the documentation of this file.
1
#include "
IOPool/Streamer/src/StreamerFileWriter.h
"
2
#include "
FWCore/ParameterSet/interface/ParameterSetDescription.h
"
3
4
namespace
edm
{
5
StreamerFileWriter::StreamerFileWriter
(
edm::ParameterSet
const
& ps)
6
: stream_writer_(new
StreamerOutputFile
(ps.getUntrackedParameter<
std
::
string
>(
"fileName"
),
7
ps.getUntrackedParameter<unsigned
int
>(
"padding"
))) {}
8
9
StreamerFileWriter::StreamerFileWriter
(
std::string
const
&
fileName
)
10
: stream_writer_(new
StreamerOutputFile
(
fileName
)) {}
11
12
StreamerFileWriter::~StreamerFileWriter
() {}
13
14
void
StreamerFileWriter::doOutputHeader
(
InitMsgBuilder
const
& init_message) {
15
//Let us turn it into a View
16
InitMsgView
view
(init_message.
startAddress
());
17
doOutputHeader
(
view
);
18
}
19
20
void
StreamerFileWriter::doOutputHeader
(
InitMsgView
const
& init_message) {
21
//Write the Init Message to Streamer file
22
stream_writer_
->write(init_message);
23
}
24
25
void
StreamerFileWriter::doOutputEvent
(
EventMsgView
const
&
msg
) {
26
//Write the Event Message to Streamer file
27
stream_writer_
->write(
msg
);
28
}
29
30
void
StreamerFileWriter::doOutputEvent
(
EventMsgBuilder
const
&
msg
) {
31
EventMsgView
eview(
msg
.startAddress());
32
doOutputEvent
(eview);
33
}
34
35
void
StreamerFileWriter::fillDescription
(
ParameterSetDescription
&
desc
) {
36
desc
.setComment(
"Writes events into a streamer output file."
);
37
desc
.addUntracked<
std::string
>(
"fileName"
,
"teststreamfile.dat"
)->setComment(
"Name of output file."
);
38
desc
.addUntracked<
unsigned
int
>(
"padding"
, 0)
39
->setComment(
"For testing: INIT and event block size will be rounded to this size padded with 0xff bytes."
);
40
}
41
}
//namespace edm
InitMsgBuilder::startAddress
uint8 * startAddress() const
Definition:
InitMsgBuilder.h:24
pv::view
view
Definition:
PreparePVTrends.h:58
std
Definition:
JetResolutionObject.h:76
EventMsgBuilder
Definition:
EventMsgBuilder.h:8
edm::StreamerFileWriter::StreamerFileWriter
StreamerFileWriter(edm::ParameterSet const &ps)
Definition:
StreamerFileWriter.cc:5
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
createfilelist.int
int
Definition:
createfilelist.py:10
ParameterSetDescription.h
edm::StreamerFileWriter::~StreamerFileWriter
~StreamerFileWriter()
Definition:
StreamerFileWriter.cc:12
edm::StreamerFileWriter::doOutputHeader
void doOutputHeader(InitMsgBuilder const &init_message)
Definition:
StreamerFileWriter.cc:14
InitMsgBuilder
Definition:
InitMsgBuilder.h:9
InitMsgView
Definition:
InitMessage.h:61
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
edm::StreamerFileWriter::stream_writer_
edm::propagate_const< std::unique_ptr< StreamerOutputFile > > stream_writer_
Definition:
StreamerFileWriter.h:41
StreamerFileWriter.h
EventMsgView
Definition:
EventMessage.h:72
StreamerOutputFile
Definition:
StreamerOutputFile.h:23
mps_check.msg
tuple msg
Definition:
mps_check.py:286
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::StreamerFileWriter::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition:
StreamerFileWriter.cc:35
edm::ParameterSet
Definition:
ParameterSet.h:48
edm::StreamerFileWriter::doOutputEvent
void doOutputEvent(EventMsgBuilder const &msg)
Definition:
StreamerFileWriter.cc:30
Generated for CMSSW Reference Manual by
1.8.14