10#include <analysis/utility/PostProcessingParticleWeighting.h>
13#include <framework/database/Database.h>
18 const char* lookupTableName) :
19 m_EventMetaData(-1, -1), m_LookupTable(lookupTableName)
28 std::string variableName,
double value)
46 int experiment,
int run)
49 PyObject* dictionary = PyDict_New();
50 for (
const auto& [name, val] : weightInfo) {
51 PyObject* key = PyUnicode_FromString(name.c_str());
52 PyObject* value = PyFloat_FromDouble(val);
53 PyDict_SetItem(dictionary, key, value);
void setValue(std::string variableName, double value)
Set value.
PyObject * getInfoPython(int experiment, int run)
Get weight information (Python).
EventMetaData m_EventMetaData
Event metadata.
std::map< std::string, double > m_Values
Values.
PostProcessingParticleWeighting(const char *lookupTableName)
Constructor.
~PostProcessingParticleWeighting()
Destructor.
WeightInfo getInfo(int experiment, int run)
Get weight information.
DBObjPtr< ParticleWeightingLookUpTable > m_LookupTable
Lookup table.
std::map< std::string, double > WeightInfo
Weight information: a line from the weight lookup table.
static DBStore & Instance()
Instance of a singleton DBStore.
void update()
Updates all objects that are outside their interval of validity.
Abstract base class for different kinds of events.