#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, std::shared_ptr< EventSkipperByID > eventSkipperByID=std::shared_ptr< EventSkipperByID >()) | |
StreamerInputFile (std::vector< std::string > const &names, std::shared_ptr< EventSkipperByID > eventSkipperByID=std::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 | |
edm::propagate_const < std::shared_ptr < EventMsgView > > | currentEvMsg_ |
unsigned int | currentFile_ |
std::string | currentFileName_ |
bool | currentFileOpen_ |
uint32 | currProto_ |
uint32 | currRun_ |
bool | endOfFile_ |
std::vector< char > | eventBuf_ |
edm::propagate_const < std::shared_ptr < EventSkipperByID > > | eventSkipperByID_ |
std::vector< char > | headerBuf_ |
bool | multiStreams_ |
bool | newHeader_ |
edm::propagate_const < std::shared_ptr< InitMsgView > > | startMsg_ |
edm::propagate_const < std::unique_ptr< Storage > > | storage_ |
std::vector< std::string > | streamerNames_ |
Definition at line 18 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_, Exception, edm::errors::MismatchedInputFiles, newHeader_, readStartMessage(), startMsg_, and streamerNames_.
Referenced by openNextFile().
|
inline |
Points to File Start Header/Message
Definition at line 36 of file StreamerInputFile.h.
References currentEvMsg_, and edm::propagate_const< T >::get().
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 39 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, Exception, edm::errors::FileOpenError, StorageFactory::get(), logFileAction(), mergeVDriftHistosByStation::name, StorageFactory::open(), 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, gen::n, and storage_.
Referenced by readEventMessage(), and readStartMessage().
|
private |
Definition at line 224 of file StreamerInputFile.cc.
References HeaderView::code(), convert32(), convert64(), currentEvMsg_, endOfFile_, Header::EVENT, EventHeader::event_, eventBuf_, eventSkipperByID_, 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(), 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, gen::n, and storage_.
Referenced by readEventMessage().
|
inline |
Moves the handler to next Event Record
Definition at line 33 of file StreamerInputFile.h.
References edm::propagate_const< T >::get(), and startMsg_.
Referenced by WatcherStreamFileReader::getHeader().
|
private |
Definition at line 61 of file StreamerInputFile.h.
Referenced by currentRecord(), and readEventMessage().
|
private |
Buffer to store Event Data
Definition at line 66 of file StreamerInputFile.h.
Referenced by compareHeader(), openNextFile(), and StreamerInputFile().
|
private |
True if Multiple Streams are Read
Definition at line 69 of file StreamerInputFile.h.
Referenced by logFileAction(), and openStreamerFile().
|
private |
Definition at line 70 of file StreamerInputFile.h.
Referenced by closeStreamerFile(), and openStreamerFile().
|
private |
Definition at line 75 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 74 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 81 of file StreamerInputFile.h.
Referenced by next(), and readEventMessage().
|
private |
Buffer to store file Header
Definition at line 64 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 72 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 63 of file StreamerInputFile.h.
Referenced by readStartMessage().
|
private |
|
private |
Definition at line 77 of file StreamerInputFile.h.
Referenced by compareHeader(), and newHeader().
|
private |
Definition at line 60 of file StreamerInputFile.h.
Referenced by compareHeader(), openNextFile(), readStartMessage(), startMessage(), and StreamerInputFile().
|
private |
Definition at line 79 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 67 of file StreamerInputFile.h.
Referenced by compareHeader(), and openNextFile().