#include <StreamerInputFile.h>
Public Member Functions | |
EventMsgView const * | currentRecord () const |
bool | newHeader () |
bool | next () |
InitMsgView const * | startMessage () const |
StreamerInputFile (std::string const &name, int *numberOfEventsToSkip=0, boost::shared_ptr< EventSkipperByID > eventSkipperByID=boost::shared_ptr< EventSkipperByID >()) | |
StreamerInputFile (std::vector< std::string > const &names, int *numberOfEventsToSkip=0, boost::shared_ptr< EventSkipperByID > eventSkipperByID=boost::shared_ptr< EventSkipperByID >()) | |
~StreamerInputFile () | |
Private Member Functions | |
bool | compareHeader () |
void | logFileAction (char const *msg) |
bool | openNextFile () |
void | openStreamerFile (std::string const &name) |
IOSize | readBytes (char *buf, IOSize nBytes) |
int | readEventMessage () |
void | readStartMessage () |
IOOffset | skipBytes (IOSize nBytes) |
Private Attributes | |
boost::shared_ptr< EventMsgView > | currentEvMsg_ |
unsigned int | currentFile_ |
std::string | currentFileName_ |
bool | currentFileOpen_ |
uint32 | currProto_ |
uint32 | currRun_ |
bool | endOfFile_ |
std::vector< char > | eventBuf_ |
boost::shared_ptr < EventSkipperByID > | eventSkipperByID_ |
std::vector< char > | headerBuf_ |
bool | multiStreams_ |
bool | newHeader_ |
int * | numberOfEventsToSkip_ |
boost::shared_ptr< InitMsgView > | startMsg_ |
boost::shared_ptr< Storage > | storage_ |
std::vector< std::string > | streamerNames_ |
Definition at line 17 of file StreamerInputFile.h.
|
explicit |
Reads a Streamer file
Definition at line 25 of file StreamerInputFile.cc.
References openStreamerFile(), and readStartMessage().
|
explicit |
Multiple Streamer files
Definition at line 48 of file StreamerInputFile.cc.
References currentFile_, currProto_, currRun_, openStreamerFile(), readStartMessage(), and startMsg_.
edm::StreamerInputFile::~StreamerInputFile | ( | ) |
Definition at line 18 of file StreamerInputFile.cc.
References currentFileOpen_, logFileAction(), and storage_.
|
private |
Compares current File header with the newly opened file header Returns false in case of mismatch
Definition at line 208 of file StreamerInputFile.cc.
References currentFile_, currProto_, currRun_, edm::hlt::Exception, edm::errors::MismatchedInputFiles, newHeader_, readStartMessage(), startMsg_, and streamerNames_.
Referenced by openNextFile().
|
inline |
Points to File Start Header/Message
Definition at line 37 of file StreamerInputFile.h.
References currentEvMsg_.
Referenced by WatcherStreamFileReader::getNextEvent().
|
private |
Definition at line 292 of file StreamerInputFile.cc.
References currentFileName_, and edm::FlushMessageLog().
Referenced by openStreamerFile(), and ~StreamerInputFile().
|
inline |
Points to current Record
Definition at line 40 of file StreamerInputFile.h.
References newHeader_, and tmp.
Referenced by WatcherStreamFileReader::newHeader().
bool edm::StreamerInputFile::next | ( | void | ) |
Definition at line 170 of file StreamerInputFile.cc.
References endOfFile_, multiStreams_, openNextFile(), and readEventMessage().
Referenced by BeautifulSoup.PageElement::_invert(), and WatcherStreamFileReader::getNextEvent().
|
private |
Definition at line 186 of file StreamerInputFile.cc.
References compareHeader(), currentFile_, FDEBUG, openStreamerFile(), startMsg_, and streamerNames_.
Referenced by next().
|
private |
Test bit if a new header is encountered
Definition at line 74 of file StreamerInputFile.cc.
References cms::Exception::addContext(), edm::check(), cms::Exception::clearMessage(), currentFileName_, currentFileOpen_, alignCSCRings::e, edm::hlt::Exception, edm::errors::FileOpenError, StorageFactory::get(), logFileAction(), mergeVDriftHistosByStation::name, IOFlags::OpenRead, findQualityFiles::size, and storage_.
Referenced by openNextFile(), and StreamerInputFile().
Definition at line 107 of file StreamerInputFile.cc.
References cms::Exception::addContext(), edm::errors::FileReadError, n, and storage_.
Referenced by readEventMessage(), and readStartMessage().
|
private |
Definition at line 226 of file StreamerInputFile.cc.
References HeaderView::code(), convert32(), currentEvMsg_, endOfFile_, Header::EOFRECORD, Header::EVENT, EventHeader::event_, eventBuf_, eventSkipperByID_, edm::hlt::Exception, edm::errors::FileReadError, EventHeader::lumi_, numberOfEventsToSkip_, readBytes(), EventHeader::run_, HeaderView::size(), and skipBytes().
Referenced by next().
|
private |
Not an init message should return
Definition at line 135 of file StreamerInputFile.cc.
References HeaderView::code(), edm::hlt::Exception, edm::errors::FileReadError, headerBuf_, Header::INIT, readBytes(), HeaderView::size(), and startMsg_.
Referenced by compareHeader(), and StreamerInputFile().
Definition at line 120 of file StreamerInputFile.cc.
References cms::Exception::addContext(), Storage::CURRENT, edm::errors::FileReadError, n, and storage_.
Referenced by readEventMessage().
|
inline |
Moves the handler to next Event Record
Definition at line 34 of file StreamerInputFile.h.
References startMsg_.
Referenced by WatcherStreamFileReader::getHeader().
|
private |
Definition at line 60 of file StreamerInputFile.h.
Referenced by currentRecord(), and readEventMessage().
|
private |
Definition at line 65 of file StreamerInputFile.h.
Referenced by compareHeader(), openNextFile(), and StreamerInputFile().
|
private |
True if Multiple Streams are Read
Definition at line 68 of file StreamerInputFile.h.
Referenced by logFileAction(), and openStreamerFile().
|
private |
Definition at line 69 of file StreamerInputFile.h.
Referenced by openStreamerFile(), and ~StreamerInputFile().
|
private |
Definition at line 76 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 75 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 82 of file StreamerInputFile.h.
Referenced by next(), and readEventMessage().
|
private |
Buffer to store file Header
Definition at line 63 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 71 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 62 of file StreamerInputFile.h.
Referenced by readStartMessage().
|
private |
|
private |
Definition at line 78 of file StreamerInputFile.h.
Referenced by compareHeader(), and newHeader().
|
private |
Definition at line 73 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 59 of file StreamerInputFile.h.
Referenced by compareHeader(), openNextFile(), readStartMessage(), startMessage(), and StreamerInputFile().
|
private |
Definition at line 80 of file StreamerInputFile.h.
Referenced by openStreamerFile(), readBytes(), skipBytes(), and ~StreamerInputFile().
|
private |
keeps track of which file is in use at the moment
Definition at line 66 of file StreamerInputFile.h.
Referenced by compareHeader(), and openNextFile().