#include <StreamerInputFile.h>
Public Member Functions | |
void | closeStreamerFile () |
Needs to be public because of forking. More... | |
EventMsgView const * | currentRecord () const |
bool | newHeader () |
bool | next () |
InitMsgView const * | startMessage () const |
StreamerInputFile (std::string const &name, boost::shared_ptr< EventSkipperByID > eventSkipperByID=boost::shared_ptr< EventSkipperByID >()) | |
StreamerInputFile (std::vector< std::string > const &names, 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_ |
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 22 of file StreamerInputFile.cc.
References openStreamerFile(), and readStartMessage().
|
explicit |
Multiple Streamer files
Definition at line 43 of file StreamerInputFile.cc.
References currentFile_, currProto_, currRun_, openStreamerFile(), readStartMessage(), and startMsg_.
edm::StreamerInputFile::~StreamerInputFile | ( | ) |
Definition at line 18 of file StreamerInputFile.cc.
References closeStreamerFile().
void edm::StreamerInputFile::closeStreamerFile | ( | ) |
Needs to be public because of forking.
Test bit if a new header is encountered
Definition at line 97 of file StreamerInputFile.cc.
References currentFileOpen_, logFileAction(), and storage_.
Referenced by openStreamerFile(), and ~StreamerInputFile().
|
private |
Compares current File header with the newly opened file header Returns false in case of mismatch
Definition at line 206 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 35 of file StreamerInputFile.h.
References currentEvMsg_.
Referenced by WatcherStreamFileReader::getNextEvent().
|
private |
Definition at line 285 of file StreamerInputFile.cc.
References currentFileName_, and edm::FlushMessageLog().
Referenced by closeStreamerFile(), and openStreamerFile().
|
inline |
Points to current Record
Definition at line 38 of file StreamerInputFile.h.
References newHeader_, and tmp.
Referenced by WatcherStreamFileReader::newHeader().
bool edm::StreamerInputFile::next | ( | void | ) |
Definition at line 168 of file StreamerInputFile.cc.
References endOfFile_, multiStreams_, openNextFile(), and readEventMessage().
Referenced by BeautifulSoup.PageElement::_invert(), and WatcherStreamFileReader::getNextEvent().
|
private |
Definition at line 184 of file StreamerInputFile.cc.
References compareHeader(), currentFile_, FDEBUG, openStreamerFile(), startMsg_, and streamerNames_.
Referenced by next().
|
private |
Definition at line 67 of file StreamerInputFile.cc.
References cms::Exception::addContext(), edm::check(), cms::Exception::clearMessage(), closeStreamerFile(), 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 105 of file StreamerInputFile.cc.
References cms::Exception::addContext(), edm::errors::FileReadError, n, and storage_.
Referenced by readEventMessage(), and readStartMessage().
|
private |
Definition at line 224 of file StreamerInputFile.cc.
References HeaderView::code(), convert32(), currentEvMsg_, endOfFile_, Header::EVENT, EventHeader::event_, eventBuf_, eventSkipperByID_, edm::hlt::Exception, edm::errors::FileReadError, EventHeader::lumi_, readBytes(), EventHeader::run_, HeaderView::size(), and skipBytes().
Referenced by next().
|
private |
Not an init message should return
Definition at line 133 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 118 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 32 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 closeStreamerFile(), and openStreamerFile().
|
private |
Definition at line 74 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 73 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 80 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 76 of file StreamerInputFile.h.
Referenced by compareHeader(), and newHeader().
|
private |
Definition at line 59 of file StreamerInputFile.h.
Referenced by compareHeader(), openNextFile(), readStartMessage(), startMessage(), and StreamerInputFile().
|
private |
Definition at line 78 of file StreamerInputFile.h.
Referenced by closeStreamerFile(), openStreamerFile(), readBytes(), and skipBytes().
|
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().