CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
lhef::LHEReader::FileSource Class Reference
Inheritance diagram for lhef::LHEReader::FileSource:
lhef::LHEReader::Source

Public Member Functions

XMLDocumentcreateReader (XMLDocument::Handler &handler)
 
 FileSource (const std::string &fileURL)
 
 ~FileSource ()
 
- Public Member Functions inherited from lhef::LHEReader::Source
 Source ()
 
virtual ~Source ()
 

Private Attributes

std::auto_ptr< StorageWrapfileStream
 

Detailed Description

Definition at line 51 of file LHEReader.cc.

Constructor & Destructor Documentation

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

Definition at line 53 of file LHEReader.cc.

References edm::hlt::Exception, edm::errors::FileOpenError, fileStream, StorageFactory::get(), StorageFactory::open(), and IOFlags::OpenRead.

54  {
55  Storage *storage =
56  StorageFactory::get()->open(fileURL,
58 
59  if (!storage)
61  << "Could not open LHE file \""
62  << fileURL << "\" for reading"
63  << std::endl;
64 
65  fileStream.reset(new StorageWrap(storage));
66  }
Storage * open(const std::string &url, int mode=IOFlags::OpenRead)
Definition: Storage.h:8
static StorageFactory * get(void)
std::auto_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:74
lhef::LHEReader::FileSource::~FileSource ( )
inline

Definition at line 68 of file LHEReader.cc.

68 {}

Member Function Documentation

XMLDocument* lhef::LHEReader::FileSource::createReader ( XMLDocument::Handler handler)
inlinevirtual

Implements lhef::LHEReader::Source.

Definition at line 70 of file LHEReader.cc.

References fileStream.

71  { return new XMLDocument(fileStream, handler); }
std::auto_ptr< XMLHandler > handler
Definition: LHEReader.h:45
std::auto_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:74

Member Data Documentation

std::auto_ptr<StorageWrap> lhef::LHEReader::FileSource::fileStream
private

Definition at line 74 of file LHEReader.cc.

Referenced by createReader(), and FileSource().