CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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) override
 
 FileSource (const std::string &fileURL)
 
 ~FileSource () override
 
- Public Member Functions inherited from lhef::LHEReader::Source
 Source ()
 
virtual ~Source ()
 

Private Attributes

std::unique_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 Exception, fileStream, get, eostools::move(), and edm::storage::IOFlags::OpenRead.

49  {
50  using namespace edm::storage;
51  auto storage = StorageFactory::get()->open(fileURL, IOFlags::OpenRead);
52 
53  if (!storage)
54  throw cms::Exception("FileOpenError")
55  << "Could not open LHE file \"" << fileURL << "\" for reading" << std::endl;
56 
57  fileStream = std::make_unique<StorageWrap>(std::move(storage));
58  }
std::unique_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:65
def move
Definition: eostools.py:511
#define get
lhef::LHEReader::FileSource::~FileSource ( )
inlineoverride

Definition at line 60 of file LHEReader.cc.

60 {}

Member Function Documentation

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

Implements lhef::LHEReader::Source.

Definition at line 62 of file LHEReader.cc.

References fileStream.

62 { return new XMLDocument(fileStream, handler); }
std::unique_ptr< StorageWrap > fileStream
Definition: LHEReader.cc:65
std::unique_ptr< XMLHandler > handler
Definition: LHEReader.h:41

Member Data Documentation

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