CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

edm::RawInputSource Class Reference

#include <RawInputSource.h>

Inheritance diagram for edm::RawInputSource:
edm::InputSource edm::ProductRegistryHelper edm::DQMHttpSource

List of all members.

Public Member Functions

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

Protected Member Functions

std::auto_ptr< EventmakeEvent (RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, Timestamp const &tstamp)
virtual std::auto_ptr< EventreadOneEvent ()=0

Private Member Functions

virtual ItemType getNextItemType ()
virtual EventPrincipalreadEvent_ ()
virtual EventPrincipalreadIt (EventID const &eventID)
virtual boost::shared_ptr
< LuminosityBlockAuxiliary
readLuminosityBlockAuxiliary_ ()
virtual boost::shared_ptr
< RunAuxiliary
readRunAuxiliary_ ()
virtual void skip (int offset)

Private Attributes

bool eventCached_
LuminosityBlockNumber_t luminosityBlockNumber_
bool newLumi_
bool newRun_
RunNumber_t runNumber_

Detailed Description

Definition at line 18 of file RawInputSource.h.


Constructor & Destructor Documentation

edm::RawInputSource::RawInputSource ( ParameterSet const &  pset,
InputSourceDescription const &  desc 
) [explicit]
edm::RawInputSource::~RawInputSource ( ) [virtual]

Definition at line 24 of file RawInputSource.cc.

                                  {
  }

Member Function Documentation

InputSource::ItemType edm::RawInputSource::getNextItemType ( ) [private, virtual]

Implements edm::InputSource.

Definition at line 67 of file RawInputSource.cc.

References alignCSCRings::e, eventCached_, edm::InputSource::IsEvent, edm::InputSource::IsFile, edm::InputSource::IsInvalid, edm::InputSource::IsLumi, edm::InputSource::IsRun, edm::InputSource::IsStop, luminosityBlockNumber_, newLumi_, newRun_, readOneEvent(), runNumber_, and edm::InputSource::state().

                                  {
    if(state() == IsInvalid) {
      return IsFile;
    }
    if(newRun_) {
      return IsRun;
    }
    if(newLumi_) {
      return IsLumi;
    }
    if(eventCached_) {
      return IsEvent;
    }
    std::auto_ptr<Event> e(readOneEvent());
    if(e.get() == 0) {
      return IsStop;
    } else {
      e->commit_();
    }
    if(e->run() != runNumber_) {
      newRun_ = newLumi_ = true;
      runNumber_ = e->run();
      luminosityBlockNumber_ = e->luminosityBlock();
      return IsRun;
    } else if(e->luminosityBlock() != luminosityBlockNumber_) {
      luminosityBlockNumber_ = e->luminosityBlock();
      newLumi_ = true;
      return IsLumi;
    }
    return IsEvent;
  }
std::auto_ptr< Event > edm::RawInputSource::makeEvent ( RunNumber_t  run,
LuminosityBlockNumber_t  lumi,
EventNumber_t  event,
Timestamp const &  tstamp 
) [protected]
EventPrincipal * edm::RawInputSource::readEvent_ ( ) [private, virtual]
EventPrincipal * edm::RawInputSource::readIt ( EventID const &  eventID) [private, virtual]

Reimplemented from edm::InputSource.

Definition at line 100 of file RawInputSource.cc.

References Exception, and edm::errors::LogicError.

                                       {
      throw Exception(errors::LogicError, "RawInputSource::readEvent_(EventID const& eventID)")
        << "Random access read cannot be used for RawInputSource.\n"
        << "Contact a Framework developer.\n";
  }
boost::shared_ptr< LuminosityBlockAuxiliary > edm::RawInputSource::readLuminosityBlockAuxiliary_ ( ) [private, virtual]

Implements edm::InputSource.

Definition at line 34 of file RawInputSource.cc.

References edm::Timestamp::invalidTimestamp(), luminosityBlockNumber_, newLumi_, runNumber_, and edm::InputSource::timestamp().

                                                {
    newLumi_ = false;
    return boost::shared_ptr<LuminosityBlockAuxiliary>(new LuminosityBlockAuxiliary(
        runNumber_, luminosityBlockNumber_, timestamp(), Timestamp::invalidTimestamp()));
  }
virtual std::auto_ptr<Event> edm::RawInputSource::readOneEvent ( ) [protected, pure virtual]

Implemented in edm::DQMHttpSource.

Referenced by getNextItemType().

boost::shared_ptr< RunAuxiliary > edm::RawInputSource::readRunAuxiliary_ ( ) [private, virtual]

Implements edm::InputSource.

Definition at line 28 of file RawInputSource.cc.

References edm::Timestamp::invalidTimestamp(), newRun_, runNumber_, and edm::InputSource::timestamp().

                                    {
    newRun_ = false;
    return boost::shared_ptr<RunAuxiliary>(new RunAuxiliary(runNumber_, timestamp(), Timestamp::invalidTimestamp()));
  }
void edm::RawInputSource::skip ( int  offset) [private, virtual]

Reimplemented from edm::InputSource.

Definition at line 108 of file RawInputSource.cc.

References Exception, and edm::errors::LogicError.

                          {
      throw Exception(errors::LogicError, "RawInputSource::skip(int offset)")
        << "Random access skip cannot be used for RawInputSource\n"
        << "Contact a Framework developer.\n";
  }

Member Data Documentation

Definition at line 39 of file RawInputSource.h.

Referenced by getNextItemType(), makeEvent(), and readEvent_().

Definition at line 36 of file RawInputSource.h.

Referenced by getNextItemType(), and readLuminosityBlockAuxiliary_().

Definition at line 38 of file RawInputSource.h.

Referenced by getNextItemType(), makeEvent(), and readLuminosityBlockAuxiliary_().

Definition at line 37 of file RawInputSource.h.

Referenced by getNextItemType(), makeEvent(), and readRunAuxiliary_().