CMS 3D CMS Logo

Public Member Functions | Private Attributes

edm::StreamerInputModule< Producer > Class Template Reference

#include <StreamerInputModule.h>

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

List of all members.

Public Member Functions

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

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 41 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 38 of file StreamerInputModule.h.

{}

Member Function Documentation

template<typename Producer >
EventPrincipal * edm::StreamerInputModule< Producer >::read ( ) [virtual]

Implements edm::StreamerInputSource.

Definition at line 53 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  0;
    }
    return(deserializeEvent(*eview));
  }

Member Data Documentation

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