CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::StreamerInputModule< Producer > Class Template Reference

#include <StreamerInputModule.h>

Inheritance diagram for edm::StreamerInputModule< Producer >:
edm::StreamerInputSource edm::RawInputSource edm::InputSource edm::ProductRegistryHelper

List of all members.

Public Member Functions

 StreamerInputModule (ParameterSet const &pset, InputSourceDescription const &desc)
virtual ~StreamerInputModule ()

Private Member Functions

virtual bool checkNextEvent ()
virtual void closeFile_ ()

Private Attributes

std::auto_ptr< Producer > pr_

Detailed Description

template<typename Producer>
class edm::StreamerInputModule< Producer >

Definition at line 20 of file StreamerInputModule.h.


Constructor & Destructor Documentation

template<typename Producer >
edm::StreamerInputModule< Producer >::StreamerInputModule ( ParameterSet const &  pset,
InputSourceDescription const &  desc 
) [explicit]

Requires the Producer class to provide following functions const InitMsgView* getHeader(); const EventMsgView* getNextEvent();

Definition at line 45 of file StreamerInputModule.h.

References edm::StreamerInputSource::deserializeAndMergeWithRegistry(), and edm::StreamerInputModule< Producer >::pr_.

                                                       :
        StreamerInputSource(pset, desc),
        //prod_reg_(&productRegistry()), 
        pr_(new Producer(pset)) {
    //Get header/init from Producer
    InitMsgView const* header = pr_->getHeader();
    deserializeAndMergeWithRegistry(*header); 
  }
template<typename Producer >
edm::StreamerInputModule< Producer >::~StreamerInputModule ( ) [virtual]

Definition at line 42 of file StreamerInputModule.h.

{}

Member Function Documentation

template<typename Producer >
bool edm::StreamerInputModule< Producer >::checkNextEvent ( ) [private, virtual]

Implements edm::RawInputSource.

Definition at line 57 of file StreamerInputModule.h.

References FDEBUG.

                                                     {

    EventMsgView const* eview = pr_->getNextEvent();

    if (pr_->newHeader()) {   
        FDEBUG(6) << "A new file has been opened and we must compare Headers here !!" << std::endl;
        // A new file has been opened and we must compare Headers here !!
        //Get header/init from Producer
        InitMsgView const* header = pr_->getHeader();
        deserializeAndMergeWithRegistry(*header, true);
    } 
    if (eview == 0) {
        return  false;
    }
    deserializeEvent(*eview);
    return true;
  }
template<typename Producer >
virtual void edm::StreamerInputModule< Producer >::closeFile_ ( ) [inline, private, virtual]

Reimplemented from edm::InputSource.

Definition at line 31 of file StreamerInputModule.h.

References edm::StreamerInputModule< Producer >::pr_.

                              {
      if(pr_.get() != nullptr) pr_->closeFile();
    }

Member Data Documentation

template<typename Producer >
std::auto_ptr<Producer> edm::StreamerInputModule< Producer >::pr_ [private]