a Code for the Combination of Indirect and Direct Constraints on High Energy Physics Models Logo
LHPC::LhefParser Class Reference

#include <LhefParser.hpp>

Detailed Description

Definition at line 28 of file LhefParser.hpp.

Public Member Functions

bool eventReadSuccessfully ()
 
LHEF::LhefEvent const & getEvent () const
 
 LhefParser (std::string const eventFileName="", bool const isVerbose=true)
 
bool openFile (std::string const &eventFileName)
 
bool readNextEvent ()
 
LhefParserregisterFilter (LHEF::AutomaticEventFilter &filterToUpdate)
 
 ~LhefParser ()
 

Protected Attributes

std::vector< LHEF::AutomaticEventFilter * > automaticFilters
 
LHEF::LhefEvent currentEvent
 
std::string eventAsString
 
bool eventIsValid
 
bool fileIsOpen
 
BOL::AsciiXmlParser fileParser
 
bool isVerbose
 

Static Protected Attributes

static std::string const eventTag
 

Constructor & Destructor Documentation

◆ LhefParser()

LHPC::LhefParser::LhefParser ( std::string const  eventFileName = "",
bool const  isVerbose = true 
)

Definition at line 20 of file LhefParser.cpp.

21 :
26 fileIsOpen( false ),
27 eventAsString( "" ),
28 eventIsValid( false )
29 {
30 if( !(eventFileName.empty()) )
31 {
32 openFile( eventFileName );
33 }
34 }
LHEF::LhefEvent currentEvent
Definition: LhefParser.hpp:61
std::string eventAsString
Definition: LhefParser.hpp:64
std::vector< LHEF::AutomaticEventFilter * > automaticFilters
Definition: LhefParser.hpp:62
BOL::AsciiXmlParser fileParser
Definition: LhefParser.hpp:60
bool openFile(std::string const &eventFileName)
Definition: LhefParser.hpp:82

◆ ~LhefParser()

LHPC::LhefParser::~LhefParser ( )

Definition at line 36 of file LhefParser.cpp.

37 {
38 // does nothing.
39 }

Member Function Documentation

◆ eventReadSuccessfully()

bool LHPC::LhefParser::eventReadSuccessfully ( )
inline

Definition at line 91 of file LhefParser.hpp.

94 {
95 return eventIsValid;
96 }

◆ getEvent()

LHEF::LhefEvent const & LHPC::LhefParser::getEvent ( ) const
inline

Definition at line 99 of file LhefParser.hpp.

101 {
102 return currentEvent;
103 }

◆ openFile()

bool LHPC::LhefParser::openFile ( std::string const &  eventFileName)
inline

Definition at line 82 of file LhefParser.hpp.

85 {
87 return fileIsOpen;
88 }
bool openRootElementOfFile(std::string const &fileName)

◆ readNextEvent()

bool LHPC::LhefParser::readNextEvent ( )

Definition at line 43 of file LhefParser.cpp.

46 {
47 if( fileIsOpen )
48 {
51 {
53 if( !fileIsOpen )
54 {
56 eventAsString.assign( "" );
57 return false;
58 }
59 }
62 for( int filterIndex( automaticFilters.size() - 1 );
63 0 <= filterIndex;
64 --filterIndex )
65 {
66 automaticFilters[ filterIndex ]->updateForNewEvent( currentEvent );
67 }
68 }
69 return fileIsOpen;
70 }
std::string const & getCurrentElementContent() const
bool currentElementNameMatches(std::string const &comparisonString) const
bool recordEvent(std::string const &eventAsString)
Definition: LhefEvent.cpp:81
static std::string const eventTag
Definition: LhefParser.hpp:57

◆ registerFilter()

LhefParser & LHPC::LhefParser::registerFilter ( LHEF::AutomaticEventFilter filterToUpdate)
inline

Definition at line 73 of file LhefParser.hpp.

76 {
77 automaticFilters.push_back( &filterToUpdate );
78 return *this;
79 }

Member Data Documentation

◆ automaticFilters

std::vector< LHEF::AutomaticEventFilter* > LHPC::LhefParser::automaticFilters
protected

Definition at line 62 of file LhefParser.hpp.

◆ currentEvent

LHEF::LhefEvent LHPC::LhefParser::currentEvent
protected

Definition at line 61 of file LhefParser.hpp.

◆ eventAsString

std::string LHPC::LhefParser::eventAsString
protected

Definition at line 64 of file LhefParser.hpp.

◆ eventIsValid

bool LHPC::LhefParser::eventIsValid
protected

Definition at line 65 of file LhefParser.hpp.

◆ eventTag

std::string const LHPC::LhefParser::eventTag
staticprotected

Definition at line 57 of file LhefParser.hpp.

◆ fileIsOpen

bool LHPC::LhefParser::fileIsOpen
protected

Definition at line 63 of file LhefParser.hpp.

◆ fileParser

BOL::AsciiXmlParser LHPC::LhefParser::fileParser
protected

Definition at line 60 of file LhefParser.hpp.

◆ isVerbose

bool LHPC::LhefParser::isVerbose
protected

Definition at line 59 of file LhefParser.hpp.


The documentation for this class was generated from the following files: