CMS 3D CMS Logo

StreamerOutputModuleBase.cc
Go to the documentation of this file.
1 
3 
12 
13 #include "zlib.h"
14 
15 namespace edm {
18  one::OutputModule<one::WatchRuns, one::WatchLuminosityBlocks>(ps),
19  StreamerOutputModuleCommon(ps, &keptProducts()[InEvent]),
20  trToken_(consumes<edm::TriggerResults>(edm::InputTag("TriggerResults"))) {}
21 
23 
25  start();
26 
27  std::unique_ptr<InitMsgBuilder> init_message = serializeRegistry(*branchIDLists(),
30  description().moduleLabel(),
31  moduleDescription().mainParameterSetID());
32 
33  doOutputHeader(*init_message);
35  }
36 
38 
40 
42 
44 
46 
49  std::unique_ptr<EventMsgBuilder> msg = serializeEvent(e, triggerResults, selectorConfig());
50  doOutputEvent(*msg); // You can't use msg in StreamerOutputModuleBase after this point
51  }
52 
54  EventForOutput const& e) const {
55  Trig result;
56  e.getByToken<TriggerResults>(token, result);
57  return result;
58  }
59 
63  }
64 } // namespace edm
static void fillDescription(ParameterSetDescription &desc)
ModuleDescription const & description() const
ThinnedAssociationsHelper const * thinnedAssociationsHelper() const
BasicHandle getByToken(EDGetToken token, TypeID const &typeID) const
Trig getTriggerResults(EDGetTokenT< TriggerResults > const &token, EventForOutput const &e) const
virtual void doOutputHeader(InitMsgBuilder const &init_message)=0
void endRun(RunForOutput const &) override
std::string const & processName() const
Definition: OutputModule.h:81
void write(EventForOutput const &e) override
ParameterSetID selectorConfig() const
static void fillDescription(ParameterSetDescription &desc)
void beginRun(RunForOutput const &) override
void writeLuminosityBlock(LuminosityBlockForOutput const &) override
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
virtual void doOutputEvent(EventMsgBuilder const &msg)=0
std::unique_ptr< InitMsgBuilder > serializeRegistry(BranchIDLists const &branchLists, ThinnedAssociationsHelper const &helper, std::string const &processName, std::string const &moduleLabel, ParameterSetID const &toplevel)
StreamerOutputModuleBase(ParameterSet const &ps)
const ModuleDescription & moduleDescription() const
static std::string const triggerResults("TriggerResults")
edm::EDGetTokenT< edm::TriggerResults > trToken_
tuple msg
Definition: mps_check.py:285
void writeRun(RunForOutput const &) override
HLT enums.
BranchIDLists const * branchIDLists()
std::unique_ptr< EventMsgBuilder > serializeEvent(EventForOutput const &e, Handle< TriggerResults > const &triggerResults, ParameterSetID const &selectorCfg)