Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-25 23:40:14

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/StreamSerializer.h"
0007 #include "DataFormats/Common/interface/Handle.h"
0008 #include "DataFormats/Streamer/interface/StreamedProducts.h"
0009 #include <memory>
0010 #include <vector>
0011 
0012 class InitMsgBuilder;
0013 class EventMsgBuilder;
0014 namespace edm {
0015   class ParameterSet;
0016   class ParameterSetDescription;
0017   class EventForOutput;
0018   class ThinnedAssociationsHelper;
0019   class TriggerResults;
0020 
0021   class StreamerOutputModuleCommon {
0022   public:
0023     explicit StreamerOutputModuleCommon(ParameterSet const& ps,
0024                                         SelectedProducts const* selections,
0025                                         std::string const& moduleLabel);
0026     ~StreamerOutputModuleCommon();
0027     static void fillDescription(ParameterSetDescription& desc);
0028 
0029     std::unique_ptr<InitMsgBuilder> serializeRegistry(SerializeDataBuffer& sbuf,
0030                                                       BranchIDLists const& branchLists,
0031                                                       ThinnedAssociationsHelper const& helper,
0032                                                       std::string const& processName,
0033                                                       std::string const& moduleLabel,
0034                                                       ParameterSetID const& toplevel,
0035                                                       SendJobHeader::ParameterSetMap const* psetMap);
0036 
0037     std::unique_ptr<EventMsgBuilder> serializeEvent(SerializeDataBuffer& sbuf,
0038                                                     EventForOutput const& e,
0039                                                     Handle<TriggerResults> const& triggerResults,
0040                                                     ParameterSetID const& selectorCfg);
0041 
0042     SerializeDataBuffer* getSerializerBuffer();
0043 
0044   protected:
0045     std::unique_ptr<SerializeDataBuffer> serializerBuffer_;
0046 
0047   private:
0048     void setHltMask(EventForOutput const& e,
0049                     Handle<TriggerResults> const& triggerResults,
0050                     std::vector<unsigned char>& hltbits) const;
0051 
0052     StreamSerializer serializer_;
0053 
0054     int maxEventSize_;
0055     bool useCompression_;
0056     std::string compressionAlgoStr_;
0057     int compressionLevel_;
0058 
0059     StreamerCompressionAlgo compressionAlgo_;
0060 
0061     // test luminosity sections
0062     int lumiSectionInterval_;
0063     double timeInSecSinceUTC;
0064 
0065     unsigned int hltsize_;
0066     char host_name_[255];
0067 
0068     Strings hltTriggerSelections_;
0069     uint32 outputModuleId_;
0070 
0071   };  //end-of-class-def
0072 
0073 }  // namespace edm
0074 
0075 #endif