Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-31 04:19:41

0001 #ifndef IOPool_Streamer_StreamerOutputModuleCommon_h
0002 #define IOPool_Streamer_StreamerOutputModuleCommon_h
0003 
0004 #include "IOPool/Streamer/interface/MsgTools.h"
0005 #include "FWCore/Common/interface/TriggerNames.h"
0006 #include "IOPool/Streamer/interface/StreamerOutputMsgBuilders.h"
0007 #include "DataFormats/Common/interface/Handle.h"
0008 #include "DataFormats/Streamer/interface/StreamedProducts.h"
0009 #include <memory>
0010 #include <vector>
0011 
0012 namespace edm {
0013   class ParameterSet;
0014   class ParameterSetDescription;
0015   class EventForOutput;
0016   class ThinnedAssociationsHelper;
0017   class TriggerResults;
0018 
0019   namespace streamer {
0020     class InitMsgBuilder;
0021     class EventMsgBuilder;
0022 
0023     class StreamerOutputModuleCommon {
0024     public:
0025       using Parameters = StreamerOutputMsgBuilders::Parameters;
0026 
0027       static Parameters parameters(ParameterSet const& ps);
0028 
0029       explicit StreamerOutputModuleCommon(Parameters const& p,
0030                                           SelectedProducts const* selections,
0031                                           std::string const& moduleLabel);
0032 
0033       explicit StreamerOutputModuleCommon(ParameterSet const& ps,
0034                                           SelectedProducts const* selections,
0035                                           std::string const& moduleLabel)
0036           : StreamerOutputModuleCommon(parameters(ps), selections, moduleLabel) {}
0037 
0038       ~StreamerOutputModuleCommon();
0039       static void fillDescription(ParameterSetDescription& desc);
0040 
0041       std::unique_ptr<InitMsgBuilder> serializeRegistry(std::string const& processName,
0042                                                         std::string const& moduleLabel,
0043                                                         ParameterSetID const& toplevel,
0044                                                         SendJobHeader::ParameterSetMap const* psetMap);
0045 
0046       std::unique_ptr<EventMsgBuilder> serializeEventMetaData(BranchIDLists const& branchLists,
0047                                                               ThinnedAssociationsHelper const& helper);
0048 
0049       std::unique_ptr<EventMsgBuilder> serializeEvent(EventForOutput const& e,
0050                                                       Handle<TriggerResults> const& triggerResults,
0051                                                       ParameterSetID const& selectorCfg);
0052 
0053     protected:
0054       void clearHeaderBuffer() { buffer_.clearHeaderBuffer(); }
0055 
0056     private:
0057       SerializeDataBuffer buffer_;
0058       StreamerOutputMsgBuilders builders_;
0059 
0060       uint32_t eventMetaDataChecksum_ = 0;
0061     };  //end-of-class-def
0062   }     // namespace streamer
0063 }  // namespace edm
0064 
0065 #endif