6#ifndef FIRE_FRAMEWORK_EVENTPROCESSOR_H
7#define FIRE_FRAMEWORK_EVENTPROCESSOR_H
9#include "fire/Processor.h"
10#include "Framework/Configure/Parameters.h"
11#include "Framework/Logger.h"
91 return getObject<std::vector<T>>(n,p);
98 template<
typename K,
typename V>
100 return getObject<std::map<K,V>>(n,p);
252#define DECLARE_PRODUCER_NS(NS,CLASS) DECLARE_PROCESSOR(NS::CLASS)
259#define DECLARE_PRODUCER(CLASS) DECLARE_PROCESSOR(CLASS)
269#define DECLARE_ANALYZER_NS(NS,CLASS) DECLARE_PROCESSOR(NS::CLASS)
276#define DECLARE_ANALYZER(CLASS) DECLARE_PROCESSOR(CLASS)
Event class for interfacing with processors.
Definition: Event.h:28
const EventHeader & header() const
Get the event header.
Definition: Event.h:156
const DataType & get(const std::string &name, const std::string &pass="") const
get a piece of data from the event
Definition: Event.h:349
void add(const std::string &name, const DataType &data)
add a piece of data to the event
Definition: Event.h:242
The central object managing the data processing.
Definition: Process.h:16
Base class for all event processing components.
Definition: Processor.h:57
virtual void attach(Process *p) final
Attach the current process to this processor.
Definition: Processor.h:172
Processor(const config::Parameters &ps)
Configure the processor upon construction.
Definition: Processor.cxx:7
Class encapsulating parameters for configuring a processor.
Definition: Parameters.h:28
void add(const std::string &name, const T &value)
Add a parameter to the parameter list.
Definition: Parameters.h:41
Legacy analyzer class.
Definition: EventProcessor.h:209
virtual void analyze(const framework::Event &event)=0
Pure virtual analyze function to align with legacy implementation.
virtual void beforeNewRun(fire::RunHeader &) final override
Don't allow legacy analyzers to use this method by defining the final version to be empty.
Definition: EventProcessor.h:222
virtual void process(fire::Event &event) final override
Final implementation of pure virtual process method, wrapping event in framework::Event and giving it...
Definition: EventProcessor.h:236
Analyzer(const std::string &name, framework::Process &p)
Pass construction to base legacy processor.
Definition: EventProcessor.h:216
Wrapper class for fire::Processor which does the necessary modifications on the constructors and adds...
Definition: EventProcessor.h:116
virtual void process(fire::Event &event)=0
pass on pure virtual process function
static fire::config::Parameters minimal_parameter_set(const std::string &name)
Construct the minimal parameter set for a fire::Processor.
Definition: EventProcessor.h:126
virtual void configure(config::Parameters &ps)
Legacy configure method.
Definition: EventProcessor.h:157
EventProcessor(const std::string &name, framework::Process &p)
Construct a legacy event processor.
Definition: EventProcessor.h:142
Wrapper Event in this namespace reintroducing legacy functionality.
Definition: EventProcessor.h:34
int getEventNumber() const
Get the event number.
Definition: EventProcessor.h:55
fire::EventHeader & getEventHeader()
Get the event header.
Definition: EventProcessor.h:47
fire::Event & event_
reference to current event bus
Definition: EventProcessor.h:36
const T & getObject(const std::string &n, const std::string &p="") const
Retrieve an object from the event bus.
Definition: EventProcessor.h:81
double getEventWeight() const
Get the event weight.
Definition: EventProcessor.h:63
void add(const std::string &n, const T &o)
Add an object to the event bus.
Definition: EventProcessor.h:72
Event(fire::Event &e)
wrap the current event with a legacy interface
Definition: EventProcessor.h:41
const std::map< K, V > & getCollection(const std::string &n, const std::string &p="") const
Retrieve an object from the event bus.
Definition: EventProcessor.h:99
const std::vector< T > & getCollection(const std::string &n, const std::string &p="") const
Retrieve an object from the event bus.
Definition: EventProcessor.h:90
Legacy producer class.
Definition: EventProcessor.h:167
virtual void produce(framework::Event &event)=0
Pure virtual produce function to align with legacy implementation.
Producer(const std::string &name, framework::Process &p)
Pass construction to base legacy processor.
Definition: EventProcessor.h:174
virtual void process(fire::Event &event) final override
Final implementation of pure virtual process method, wrapping event in framework::Event and giving it...
Definition: EventProcessor.h:189
Namespace for interop with ROOT-based framework styled processors.
Definition: ConditionsObject.h:6
fire::Process Process
alias Process into this namespace
Definition: EventProcessor.h:105