evio
6.0
|
This interface allows applications to create filters so that they only receive certain structures when events are being processed. More...
#include <IEvioFilter.h>
Public Member Functions | |
virtual bool | accept (StructureType const &structureType, std::shared_ptr< BaseStructure > structure)=0 |
Accept or reject the given structure. More... | |
This interface allows applications to create filters so that they only receive certain structures when events are being processed.
Below is a filter that accepts any structure that has tag = 400.
class MyFilter : IEvioFilter {
public bool accept(StructureType & structureType, std::shared_ptr<BaseStructure> structure) {
return (structure->getHeader()->getTag() == 400);
}
};
MyFilter myfilter();
EventParser.getInstance().setEvioFilter(myFilter);
|
pure virtual |
Accept or reject the given structure.
structureType | the structure type, a StructureType enum, of the structure that was just found, e.g., StructureType.BANK . |
structure | the structure that was just found. From its header the tag, num, length, and data type are available. The application can filter based on those quantities or on the data itself. |
true
if the structure passes the filter and should be given to the listeners.