#include <StreamerInputFile.h>
Public Types | |
enum | Next { Next::kEvent, Next::kFile, Next::kStop } |
Public Member Functions | |
void | closeStreamerFile () |
EventMsgView const * | currentRecord () const |
bool | newHeader () |
Next | next () |
bool | openNextFile () |
InitMsgView const * | startMessage () const |
StreamerInputFile (std::string const &name, std::string const &LFN, std::shared_ptr< EventSkipperByID > eventSkipperByID=std::shared_ptr< EventSkipperByID >()) | |
StreamerInputFile (std::string const &name, std::shared_ptr< EventSkipperByID > eventSkipperByID=std::shared_ptr< EventSkipperByID >()) | |
StreamerInputFile (std::vector< FileCatalogItem > const &names, std::shared_ptr< EventSkipperByID > eventSkipperByID=std::shared_ptr< EventSkipperByID >()) | |
~StreamerInputFile () | |
Private Member Functions | |
bool | compareHeader () |
void | logFileAction (char const *msg) |
void | openStreamerFile (std::string const &name, std::string const &LFN) |
storage::IOSize | readBytes (char *buf, storage::IOSize nBytes) |
int | readEventMessage () |
void | readStartMessage () |
storage::IOOffset | skipBytes (storage::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< edm::storage::Storage > > | storage_ |
std::vector< FileCatalogItem > | streamerNames_ |
Definition at line 19 of file StreamerInputFile.h.
|
strong |
|
explicit |
Reads a Streamer file
Definition at line 21 of file StreamerInputFile.cc.
References Skims_PA_cff::name, openStreamerFile(), and readStartMessage().
|
explicit |
Definition at line 43 of file StreamerInputFile.cc.
|
explicit |
Multiple Streamer files
Definition at line 46 of file StreamerInputFile.cc.
References currentFile_, currProto_, currRun_, names, openStreamerFile(), readStartMessage(), and startMsg_.
edm::StreamerInputFile::~StreamerInputFile | ( | ) |
Definition at line 19 of file StreamerInputFile.cc.
References closeStreamerFile().
void edm::StreamerInputFile::closeStreamerFile | ( | ) |
Test bit if a new header is encountered
Definition at line 106 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 211 of file StreamerInputFile.cc.
References currentFile_, currProto_, currRun_, Exception, edm::errors::MismatchedInputFiles, readStartMessage(), startMsg_, and streamerNames_.
Referenced by openNextFile().
|
inline |
Points to File Start Header/Message
Definition at line 40 of file StreamerInputFile.h.
References currentEvMsg_, and edm::propagate_const< T >::get().
|
private |
Definition at line 288 of file StreamerInputFile.cc.
References currentFileName_, edm::FlushMessageLog(), and mps_check::msg.
Referenced by closeStreamerFile(), and openStreamerFile().
|
inline |
Points to current Record
Definition at line 43 of file StreamerInputFile.h.
References newHeader_, and createJobs::tmp.
StreamerInputFile::Next edm::StreamerInputFile::next | ( | void | ) |
Definition at line 177 of file StreamerInputFile.cc.
References currentFile_, kEvent, kFile, kStop, multiStreams_, newHeader_, readEventMessage(), and streamerNames_.
bool edm::StreamerInputFile::openNextFile | ( | ) |
Definition at line 191 of file StreamerInputFile.cc.
References compareHeader(), currentFile_, endOfFile_, FDEBUG, openStreamerFile(), startMsg_, and streamerNames_.
|
private |
Definition at line 69 of file StreamerInputFile.cc.
References cms::Exception::addContext(), edm::check(), cms::Exception::clearMessage(), closeStreamerFile(), currentFileName_, currentFileOpen_, MillePedeFileConverter_cfg::e, Exception, edm::errors::FileOpenError, get, logFileAction(), Skims_PA_cff::name, edm::storage::IOFlags::OpenRead, findQualityFiles::size, and storage_.
Referenced by openNextFile(), and StreamerInputFile().
|
private |
Definition at line 114 of file StreamerInputFile.cc.
References cms::Exception::addContext(), visDQMUpload::buf, edm::errors::FileReadError, dqmiodumpmetadata::n, and storage_.
Referenced by readEventMessage(), and readStartMessage().
|
private |
Definition at line 225 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 140 of file StreamerInputFile.cc.
References HeaderView::code(), Exception, edm::errors::FileReadError, headerBuf_, Header::INIT, readBytes(), HeaderView::size(), and startMsg_.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 126 of file StreamerInputFile.cc.
References cms::Exception::addContext(), edm::storage::Storage::CURRENT, edm::errors::FileReadError, dqmiodumpmetadata::n, and storage_.
Referenced by readEventMessage().
|
inline |
Moves the handler to next Event Record
Definition at line 37 of file StreamerInputFile.h.
References edm::propagate_const< T >::get(), and startMsg_.
|
private |
Definition at line 67 of file StreamerInputFile.h.
Referenced by currentRecord(), and readEventMessage().
|
private |
Buffer to store Event Data
Definition at line 72 of file StreamerInputFile.h.
Referenced by compareHeader(), next(), openNextFile(), and StreamerInputFile().
|
private |
True if Multiple Streams are Read
Definition at line 75 of file StreamerInputFile.h.
Referenced by logFileAction(), and openStreamerFile().
|
private |
Definition at line 76 of file StreamerInputFile.h.
Referenced by closeStreamerFile(), and openStreamerFile().
|
private |
Definition at line 81 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 80 of file StreamerInputFile.h.
Referenced by compareHeader(), and StreamerInputFile().
|
private |
Definition at line 87 of file StreamerInputFile.h.
Referenced by openNextFile(), and readEventMessage().
|
private |
Buffer to store file Header
Definition at line 70 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 78 of file StreamerInputFile.h.
Referenced by readEventMessage().
|
private |
Definition at line 69 of file StreamerInputFile.h.
Referenced by readStartMessage().
|
private |
|
private |
Definition at line 83 of file StreamerInputFile.h.
Referenced by newHeader(), and next().
|
private |
Definition at line 66 of file StreamerInputFile.h.
Referenced by compareHeader(), openNextFile(), readStartMessage(), startMessage(), and StreamerInputFile().
|
private |
Definition at line 85 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 73 of file StreamerInputFile.h.
Referenced by compareHeader(), next(), and openNextFile().