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.
int log_frequency_
The frequency with which event info is printed.
std::vector< EventProcessor * > sequence_
Ordered list of EventProcessors to execute.
bool skip_corrupted_input_files_
allow the Process to skip input files that are corrupted
std::string histo_filename_
Filename for histograms and other user products.
int max_tries_
Maximum number of attempts to make before giving up on an event.
void requestFinish()
Request that the processing finish with this event.
int run_for_generation_
Run number to use if generating events.
void setEventHeader(ldmx::EventHeader *h)
Set the pointer to the current event header, used only for tests.
int compression_setting_
Compression setting to pass to output files.
void run()
Run the process.
int event_limit_
Limit on events to process.
std::string pass_name_
Processing pass name.
void newRun(ldmx::RunHeader &header)
Run through the processors and let them know that we are starting a new run.
TFile * histo_t_file_
TFile for histograms and other user products.
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.
int total_events_
Number of events we'd like to produce independetly of the number of tries it would take.
~Process()
Class Destructor.
void onFileClose(EventFile &file) const
File is begin closed.
std::vector< std::string > drop_keep_rules_
Set of drop/keep rules.
ldmx::RunHeader * run_header_
Pointer to the current RunHeader, used for Conditions information.
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.
performance::Tracker * performance_
class with calls backs to track performance measurements of software
StorageControl & getStorageController()
Access the storage control unit for this process.
int min_events_
When reading a file in, what's the first event to read.
StorageControl storage_controller_
Storage controller.
std::vector< std::string > output_files_
List of output file names.
std::vector< std::string > input_files_
List of input files to process.
const std::string & getPassName() const
Get the processing pass label.
enableLogging("Process")
Turn on logging for our process.
const ldmx::EventHeader * event_header_
Pointer to the current EventHeader, used for Conditions information.
bool process(int n, int n_tries, Event &event) const
Process the input event through the sequence of processors.
void onFileOpen(EventFile &file) const
File is being opened.
Conditions conditions_
Set of ConditionsProviders.
Process(const framework::config::Parameters &configuration)
Class constructor.
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.
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....