test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StreamerInputSource.h
Go to the documentation of this file.
1 #ifndef IOPool_Streamer_StreamerInputSource_h
2 #define IOPool_Streamer_StreamerInputSource_h
3 
12 #include "TBufferFile.h"
13 
16 
19 
20 #include <memory>
21 #include <vector>
22 
23 class InitMsgView;
24 class EventMsgView;
25 
26 namespace edm {
27  class BranchIDListHelper;
30  public:
31  explicit StreamerInputSource(ParameterSet const& pset,
32  InputSourceDescription const& desc);
33  virtual ~StreamerInputSource();
35 
36  std::auto_ptr<SendJobHeader> deserializeRegistry(InitMsgView const& initView);
37 
38  void deserializeAndMergeWithRegistry(InitMsgView const& initView, bool subsequent = false);
39 
40  void deserializeEvent(EventMsgView const& eventView);
41 
42  static
43  void mergeIntoRegistry(SendJobHeader const& header, ProductRegistry&, BranchIDListHelper&, bool subsequent);
44 
53  static unsigned int uncompressBuffer(unsigned char* inputBuffer,
54  unsigned int inputSize,
55  std::vector<unsigned char>& outputBuffer,
56  unsigned int expectedFullSize);
57  protected:
58  static void declareStreamers(SendDescs const& descs);
59  static void buildClassCache(SendDescs const& descs);
60  void resetAfterEndRun();
61 
62  private:
63 
65  public:
67  virtual ~EventPrincipalHolder();
68 
69  virtual WrapperHolder getIt(edm::ProductID const& id) const override;
70 
71  virtual unsigned int transitionIndex_() const override;
72 
74 
75  private:
76  // We don't own the principal. The lifetime must be managed externally.
78  };
79 
80  virtual void read(EventPrincipal& eventPrincipal);
81 
82  virtual void setRun(RunNumber_t r);
83 
84  virtual std::unique_ptr<FileBlock> readFile_();
85 
86  TClass* tc_;
87  std::vector<unsigned char> dest_;
88  TBufferFile xbuf_;
89  std::unique_ptr<SendEvent> sendEvent_;
92 
94  unsigned int protocolVersion_;
95  }; //end-of-class-def
96 } // end of namespace-edm
97 
98 #endif
static void fillDescription(ParameterSetDescription &description)
static void mergeIntoRegistry(SendJobHeader const &header, ProductRegistry &, BranchIDListHelper &, bool subsequent)
std::vector< BranchDescription > SendDescs
StreamerInputSource(ParameterSet const &pset, InputSourceDescription const &desc)
virtual void setRun(RunNumber_t r)
static void declareStreamers(SendDescs const &descs)
static void buildClassCache(SendDescs const &descs)
virtual WrapperHolder getIt(edm::ProductID const &id) const override
std::unique_ptr< SendEvent > sendEvent_
void deserializeEvent(EventMsgView const &eventView)
EventPrincipalHolder eventPrincipalHolder_
virtual unsigned int transitionIndex_() const override
tuple description
Definition: idDealer.py:66
std::auto_ptr< SendJobHeader > deserializeRegistry(InitMsgView const &initView)
unsigned int RunNumber_t
Definition: EventRange.h:32
void deserializeAndMergeWithRegistry(InitMsgView const &initView, bool subsequent=false)
static unsigned int uncompressBuffer(unsigned char *inputBuffer, unsigned int inputSize, std::vector< unsigned char > &outputBuffer, unsigned int expectedFullSize)
virtual void read(EventPrincipal &eventPrincipal)
virtual std::unique_ptr< FileBlock > readFile_()
std::vector< unsigned char > dest_