7#ifndef LDMXSW_FRAMEWORK_PROCESS_H_
8#define LDMXSW_FRAMEWORK_PROCESS_H_
12#include "Framework/Configure/Parameters.h"
13#include "Framework/Exception/Exception.h"
14#include "Framework/Performance/Tracker.h"
15#include "Framework/RunHeader.h"
Container and caching class for conditions information.
Definitions related to event storage control from an EventProcessor.
Container and cache for conditions and conditions providers.
This class manages all ROOT file input/output operations.
Implements an event buffer system for storing event data.
Class which represents the process under execution.
std::vector< EventProcessor * > sequence_
Ordered list of EventProcessors to execute.
std::vector< std::string > outputFiles_
List of output file names.
ldmx::RunHeader * runHeader_
Pointer to the current RunHeader, used for Conditions information.
void requestFinish()
Request that the processing finish with this event.
bool skipCorruptedInputFiles_
allow the Process to skip input files that are corrupted
std::vector< std::string > dropKeepRules_
Set of drop/keep rules.
void setEventHeader(ldmx::EventHeader *h)
Set the pointer to the current event header, used only for tests.
void run()
Run the process.
void newRun(ldmx::RunHeader &header)
Run through the processors and let them know that we are starting a new run.
std::string histoFilename_
Filename for histograms and other user products.
StorageControl storageController_
Storage controller.
int getLogFrequency() const
Get the frequency with which the event information is printed.
const ldmx::RunHeader * getRunHeader() const
Get the pointer to the current run header, if defined.
TDirectory * openHistoFile()
Open a ROOT TFile to write histograms and TTrees.
static Process getDummy()
Get a dummy process.
int totalEvents_
Number of events we'd like to produce independetly of the number of tries it would take.
int maxTries_
Maximum number of attempts to make before giving up on an event.
~Process()
Class Destructor.
void onFileClose(EventFile &file) const
File is begin closed.
std::vector< std::string > inputFiles_
List of input files to process.
Conditions & getConditions()
Get a reference to the conditions system.
TDirectory * makeHistoDirectory(const std::string &dirName)
Construct a TDirectory* for the given module.
std::string passname_
Processing pass name.
const ldmx::EventHeader * getEventHeader() const
Get the pointer to the current event header, if defined.
performance::Tracker * performance_
class with calls backs to track performance measurements of software
StorageControl & getStorageController()
Access the storage control unit for this process.
const ldmx::EventHeader * eventHeader_
Pointer to the current EventHeader, used for Conditions information.
int compressionSetting_
Compression setting to pass to output files.
const std::string & getPassName() const
Get the processing pass label.
enableLogging("Process")
Turn on logging for our process.
bool process(int n, int n_tries, Event &event) const
Process the input event through the sequence of processors.
int logFrequency_
The frequency with which event info is printed.
int runForGeneration_
Run number to use if generating events.
Process()
Private dummy constructor We hide it here because it shouldn't be used anywhere else.
void onFileOpen(EventFile &file) const
File is being opened.
Conditions conditions_
Set of ConditionsProviders.
int eventLimit_
Limit on events to process.
int getRunNumber() const
Get the current run number or the run number to be used when initiating new events from the job.
framework::config::Parameters config_
The parameters used to configure this class.
TFile * histoTFile_
TFile for histograms and other user products.
Class which encapsulates storage control functionality, used by the Process class.
Class encapsulating parameters for configuring a processor.
All classes in the ldmx-sw project use this namespace.
std::unique_ptr< Process > ProcessHandle
A handle to the current process Used to pass a process from ConfigurePython to fire....