CMS 3D CMS Logo

Public Member Functions | Private Attributes

lhef::LHEReader::FileSource Class Reference

Inheritance diagram for lhef::LHEReader::FileSource:
lhef::LHEReader::Source

List of all members.

Public Member Functions

XMLDocumentcreateReader (XMLDocument::Handler &handler)
 FileSource (const std::string &fileURL)
 ~FileSource ()

Private Attributes

std::auto_ptr< StorageWrapfileStream

Detailed Description

Definition at line 39 of file LHEReader.cc.


Constructor & Destructor Documentation

lhef::LHEReader::FileSource::FileSource ( const std::string &  fileURL) [inline]

Definition at line 41 of file LHEReader.cc.

References Exception, fileStream, reco::get(), and IOFlags::OpenRead.

        {
                Storage *storage =
                        StorageFactory::get()->open(fileURL,
                                                    IOFlags::OpenRead);

                if (!storage)
                        throw cms::Exception("FileOpenError")
                                << "Could not open LHE file \""
                                << fileURL << "\" for reading"
                                << std::endl;

                fileStream.reset(new StorageWrap(storage));
        }

lhef::LHEReader::FileSource::~FileSource ( ) [inline]

Definition at line 56 of file LHEReader.cc.


Member Function Documentation

XMLDocument* lhef::LHEReader::FileSource::createReader ( XMLDocument::Handler handler) [inline, virtual]

Implements lhef::LHEReader::Source.

Definition at line 58 of file LHEReader.cc.

References fileStream.

        { return new XMLDocument(fileStream, handler); }


Member Data Documentation

Definition at line 62 of file LHEReader.cc.

Referenced by createReader(), and FileSource().