6#include "Framework/RunHeader.h"
13 theLog_{logging::makeLogger(name)},
34 const std::string &purposeString) {
51 const std::vector<framework::config::Parameters> &histos) {
52 for (
auto const &h : histos) {
53 auto name{h.getParameter<std::string>(
"name")};
54 auto xLabel{h.getParameter<std::string>(
"xlabel")};
55 auto xbins{h.getParameter<std::vector<double>>(
"xbins")};
56 auto yLabel{h.getParameter<std::string>(
"ylabel")};
57 auto ybins{h.getParameter<std::vector<double>>(
"ybins", {})};
Base classes for all user event processing components to extend.
Class which provides a singleton module factory that creates EventProcessor objects.
Class which represents the process under execution.
Analyzer(const std::string &name, Process &process)
Class constructor.
Container and cache for conditions and conditions providers.
Base class for all event processing components.
static void declare(const std::string &classname, int classtype, EventProcessorMaker *)
Internal function which is part of the PluginFactory machinery.
Process & process_
Handle to the Process.
std::string name_
The name of the EventProcessor.
void createHistograms(const std::vector< framework::config::Parameters > &histos)
Internal function which is used to create histograms passed from the python configuration @parma hist...
TDirectory * histoDir_
Histogram directory.
EventProcessor(const std::string &name, Process &process)
Class constructor.
Conditions & getConditions() const
Internal getter for conditions without exposing all of Process.
const ldmx::EventHeader & getEventHeader() const
Internal getter for EventHeader without exposing all of Process.
int getRunNumber() const
Get the run number from the process.
TDirectory * getHistoDirectory()
Access/create a directory in the histogram file for this event processor to create histograms and ana...
HistogramHelper histograms_
Interface class for making and filling histograms.
int getLogFrequency() const
Get the current logging frequency from the process.
void setStorageHint(framework::StorageControl::Hint hint)
Mark the current event as having the given storage control hint from this module.
void create(const std::string &name, const std::string &xLabel, const double &bins, const double &xmin, const double &xmax)
Create a ROOT 1D histogram of type TH1F and pool it for later use.
void registerEventProcessor(const std::string &classname, int classtype, EventProcessorMaker *maker)
Register the event processor.
static PluginFactory & getInstance()
Get the factory instance.
Class which represents the process under execution.
int getLogFrequency() const
Get the frequency with which the event information is printed.
Conditions & getConditions()
Get a reference to the conditions system.
TDirectory * makeHistoDirectory(const std::string &dirName)
Construct a TDirectory* for the given module.
const ldmx::EventHeader * getEventHeader() const
Get the pointer to the current event header, if defined.
StorageControl & getStorageController()
Access the storage control unit for this process.
int getRunNumber() const
Get the current run number or the run number to be used when initiating new events from the job.
Producer(const std::string &name, Process &process)
Class constructor.
void addHint(const std::string &processor_name, Hint hint, const std::string &purposeString)
Add a storage hint for a given processor.
Hint
Hints that can be provided by processors to the storage controller.
All classes in the ldmx-sw project use this namespace.
EventProcessor * EventProcessorMaker(const std::string &name, Process &process)
Typedef for EventProcessorFactory use.