11 #ifndef EVIO_6_0_EVENTPARSER_H
12 #define EVIO_6_0_EVENTPARSER_H
59 std::vector<std::shared_ptr<IEvioListener>> evioListenerList;
60 std::shared_ptr<IEvioFilter> evioFilter;
62 void parseStructure(std::shared_ptr<EvioEvent> evioEvent, std::shared_ptr<BaseStructure> structure);
68 std::recursive_mutex
mtx;
72 static void eventParse(std::shared_ptr<EvioEvent> & evioEvent);
74 void parseEvent(std::shared_ptr<EvioEvent> & evioEvent);
75 void parseEvent(std::shared_ptr<EvioEvent> & evioEvent,
bool synced);
79 static void parseStruct(std::shared_ptr<BaseStructure> structure);
89 std::shared_ptr<BaseStructure> & structure);
90 void notifyStart(std::shared_ptr<EvioEvent> & event);
91 void notifyStop(std::shared_ptr<EvioEvent> & event);
107 std::shared_ptr<IEvioListener>
const & listener);
109 std::shared_ptr<IEvioListener>
const & listener,
110 std::shared_ptr<IEvioFilter>
const & filter);
112 std::shared_ptr<IEvioFilter>
const & filter,
113 std::vector<std::shared_ptr<BaseStructure>> & structs);
116 static void visitAllDescendants(std::shared_ptr<BaseStructure>
const & topLevelStruct,
117 std::shared_ptr<BaseStructure>
const & structure,
118 std::shared_ptr<IEvioListener>
const & listener,
119 std::shared_ptr<IEvioFilter>
const & filter);
127 #endif //EVIO_6_0_EVENTPARSER_H
static void getMatchingStructures(std::shared_ptr< BaseStructure > const &structure, std::shared_ptr< IEvioFilter > const &filter, std::vector< std::shared_ptr< BaseStructure >> &structs)
Visit all the descendant structures, and collect those that pass a filter.
Definition: EventParser.cpp:531
void notifyStop(std::shared_ptr< EvioEvent > &event)
Notify listeners we are done to parsing a new event.
Definition: EventParser.cpp:367
static void vistAllStructures(std::shared_ptr< BaseStructure > const &structure, std::shared_ptr< IEvioListener > const &listener)
Visit all the structures in the given structure (including the structure itself – which is considered...
Definition: EventParser.cpp:464
void notifyEvioListeners(std::shared_ptr< EvioEvent > &event, std::shared_ptr< BaseStructure > &structure)
This is when a structure is encountered while parsing an event.
Definition: EventParser.cpp:315
void setEvioFilter(std::shared_ptr< IEvioFilter > evioFilter)
Set the global filter used for filtering structures.
Definition: EventParser.cpp:445
bool isNotificationActive() const
Get the flag determining whether notification of listeners is active.
Definition: EventParser.cpp:425
void addEvioListener(std::shared_ptr< IEvioListener > listener)
Add an Evio listener.
Definition: EventParser.cpp:410
void setNotificationActive(bool notificationActive)
Set the flag determining whether notification of listeners is active.
Definition: EventParser.cpp:435
std::recursive_mutex mtx
Mutex for thread safety.
Definition: EventParser.h:68
Creates an object that controls the parsing of events.
Definition: EventParser.h:55
void parseEvent(std::shared_ptr< EvioEvent > &evioEvent)
This is the workhorse method for parsing the event.
Definition: EventParser.cpp:134
void notifyStart(std::shared_ptr< EvioEvent > &event)
Notify listeners we are starting to parse a new event.
Definition: EventParser.cpp:345
void removeEvioListener(std::shared_ptr< IEvioListener > listener)
Remove an Evio listener.
Definition: EventParser.cpp:389
static void eventParse(std::shared_ptr< EvioEvent > &evioEvent)
Method for parsing the event which will drill down and uncover all structures.
Definition: EventParser.cpp:21
bool notificationActive
Definition: EventParser.h:66