Mēnsūra
Public Member Functions | List of all members
EventIDFilter Class Reference

Filters events based on their ID. More...

#include <EventIDFilter.hpp>

Inheritance diagram for EventIDFilter:
AnalysisPlugin Plugin

Public Member Functions

 EventIDFilter (std::string const &name, std::string const &eventIDsFileName, bool rejectKnownEvent=true)
 Constructor.
 
 EventIDFilter (std::string const &eventIDsFileName, bool rejectKnownEvent=true)
 A short-cut for the above version with a default name "EventIDFilter".
 
 EventIDFilter (EventIDFilter &&)=default
 Default move constructor.
 
EventIDFilteroperator= (EventIDFilter const &)=delete
 Assignment operator is deleted.
 
virtual void BeginRun (Dataset const &) override
 Performs initialization for a new dataset. More...
 
virtual PluginClone () const override
 Creates a newly configured clone. More...
 
void SetEventIDPluginName (std::string const &name)
 Changes name of the plugin that provides event ID.
 
- Public Member Functions inherited from AnalysisPlugin
 AnalysisPlugin (std::string const &name)
 Constructor.
 
 AnalysisPlugin (AnalysisPlugin const &)=default
 Default copy constructor.
 
 AnalysisPlugin (AnalysisPlugin &&)=default
 Default move constructor.
 
AnalysisPluginoperator= (AnalysisPlugin const &)=default
 Default assignment operator.
 
virtual ~AnalysisPlugin ()
 Trivial destructor.
 
- Public Member Functions inherited from Plugin
 Plugin (std::string const &name)
 Constructor.
 
 Plugin (Plugin const &)=default
 Default copy constructor.
 
 Plugin (Plugin &&)=default
 Default move constructor.
 
Pluginoperator= (Plugin const &)=default
 Default assignment operator.
 
virtual ~Plugin ()
 Trivial destructor.
 
virtual void EndRun ()
 Performs necessary actions needed after processing of a dataset is finished. More...
 
Processor const & GetMaster () const
 Returns a reference to the master. More...
 
std::string const & GetName () const
 Returns name of the plugin.
 
EventOutcome ProcessEventToOutcome ()
 Processes a new event from the current dataset. More...
 
void SetMaster (Processor const *processor)
 Provides a pointer to an instance of Processor class that owns the plugin. More...
 

Additional Inherited Members

- Public Types inherited from Plugin
enum  EventOutcome { EventOutcome::Ok, EventOutcome::FilterFailed, EventOutcome::NoEvents }
 Outcome of processing of an event. More...
 
- Protected Member Functions inherited from Plugin
Plugin const * GetDependencyPlugin (std::string const &name) const
 Returns a pointer to a precedent plugin in the path with the given name. More...
 

Detailed Description

Filters events based on their ID.

This plugin filters events based on their ID (run, lumi, event numbers). The user specifies a list of event IDs in a text file, and the plugin either keeps or rejects events whose IDs are found in the list.

The file should have the following format. First, it identifies the dataset to which provided event IDs correpond. This is done with line "Dataset: <ID>", where <ID> is the unique label of the source dataset, as given by Dataset::GetSourceDatasetID(). Then IDs are provided in the format <run>:<lumi>:<event>, one per line. An arbitrary number of similar groups can be provided for other datasets. Empty lines can be inserted anywhere. Comments starting with symbol '#' are ignored.

The filter relies on the presence of a EventIDReader with a default name "InputData".

Warning
The class can filter atomic datasets only (i.e. ones that contain a single file).

Member Function Documentation

void EventIDFilter::BeginRun ( Dataset const &  dataset)
overridevirtual

Performs initialization for a new dataset.

Reimplemented from Plugin.

Reimplemented from Plugin.

Plugin * EventIDFilter::Clone ( ) const
overridevirtual

Creates a newly configured clone.

Implemented from Plugin.

Implements Plugin.


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