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 47 of file LHEReader.cc.

Constructor & Destructor Documentation

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

Definition at line 49 of file LHEReader.cc.

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

50  {
51  Storage *storage =
52  StorageFactory::get()->open(fileURL,
54 
55  if (!storage)
56  throw cms::Exception("FileOpenError")
57  << "Could not open LHE file \""
58  << fileURL << "\" for reading"
59  << std::endl;
60 
61  fileStream.reset(new StorageWrap(storage));
62  }
Storage * open(const std::string &url, int mode=IOFlags::OpenRead)
static StorageFactory * get(void)
std::auto_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:70
lhef::LHEReader::FileSource::~FileSource ( )
inline

Definition at line 64 of file LHEReader.cc.

64 {}

Member Function Documentation

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

Implements lhef::LHEReader::Source.

Definition at line 66 of file LHEReader.cc.

References fileStream.

67  { return new XMLDocument(fileStream, handler); }
std::auto_ptr< XMLHandler > handler
Definition: LHEReader.h:44
std::auto_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:70

Member Data Documentation

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

Definition at line 70 of file LHEReader.cc.

Referenced by createReader(), and FileSource().