11 #ifndef SRC_INCLUDE_SMASH_RIVETOUTPUT_H_
12 #define SRC_INCLUDE_SMASH_RIVETOUTPUT_H_
19 #include "Rivet/AnalysisHandler.hh"
48 RivetOutput(
const std::filesystem::path& path, std::string name,
73 void add_path(
const std::string& path);
85 void set_log_level(
const std::string& name,
const std::string& level);
109 using Handler = std::shared_ptr<Rivet::AnalysisHandler>;
Guard type that safely disables floating point traps for the scope in which it is placed.
Base class for output handlers that need the HepMC3 structure.
The Particles class abstracts the storage and manipulation of particles.
SMASH output to Rivet analyses.
Proxy analysis_handler_proxy()
Return a proxy that temporarily disables FP exceptions.
void add_path(const std::string &path)
Add a load path to the Rivet handler.
void add_analysis(const std::string &name)
Add an analysis or analyses to Rivet.
std::filesystem::path filename_
Output file.
std::shared_ptr< Rivet::AnalysisHandler > handler_
Rivet analysis handler.
bool need_init_
Whether we need initialisation.
~RivetOutput()
Destructor.
void set_cross_section(double xs, double xserr)
Set X-section.
void add_preload(const std::string &file)
Add preload to Rivet handler.
void setup(const RivetOutputParameters ¶ms)
Setup Rivet using SMASH configuration parameters.
void set_log_level(const std::string &name, const std::string &level)
Set log level in Rivet.
void at_eventend(const Particles &particles, const int32_t event_number, const EventInfo &event) override
Add the final particles information of an event to the central vertex.
RivetOutput(const std::filesystem::path &path, std::string name, const bool full_event, const RivetOutputParameters &rivet_par)
Create Rivet output.
void set_ignore_beams(bool ignore=true)
Do not insist on appropriate beams for analyses.
Structure to contain custom data for output.
Helper structure for OutputParameters in order to store and hand over Rivet parameters.
A proxy object that wraps all Rivet::AnalysisHandler calls in an environment where FP errors are disa...
DisableFloatTraps g_
FP traps temporaryly disabled.
Proxy(Proxy &&p)
Move construct.
std::shared_ptr< Rivet::AnalysisHandler > Handler
Type of handler.
Handler operator->()
Forward calls to handler.
Proxy(Handler h)
Construct proxy.