61#ifndef _PMUPPSCRIPT_H_
62#define _PMUPPSCRIPT_H_
164 int select(
const QString str);
177 int addX(
const QString str);
184 int addY(
const QString str);
191 int plot(
const QString str);
199 int macro(
const QString str,
const QString plotFln=
"");
209 int var_cmd(
const QString str,
int script_idx = -1);
272 void minMax(QVector<double> dvec,
double &min,
double &max);
Administration and configuration management for mupp application.
Core data structures and handler classes for mupp parameter management.
Represents a collection of related experimental runs.
PmuppPlotEntry fPlotEntry
single plot configuration (for specific selection)
QString fSavePath
directory path for saving output files
void setSavePath(const QString cmd)
Sets the save path for output files.
int getCollectionIndex(const QString var_name)
Gets the collection index associated with a variable.
QVector< PmuppPlotEntry > fPlotInfo
vector of all plot configurations (for all selections)
int select(const QString str)
Selects a specific collection for plotting.
int fSelected
selection state: -2=none, -1=all, >=0=specific index
QString getPythonBlock(int start_idx=-1)
Returns the verbatim <python> ... </python> block of the script.
int addX(const QString str)
Adds a parameter to the X-axis.
std::unique_ptr< PmuppAdmin > fAdmin
administration object for configuration
QString fLoadPath
directory path for loading input data files
QString getSavePath()
Gets the current save path.
PmuppScript(QStringList script)
Constructor. Initializes the script interpreter.
QString getNicerLabel(const QString label)
Converts parameter labels to prettier ROOT format.
int addY(const QString str)
Adds one or more parameters to the Y-axis.
void minMax(QVector< double > dvec, double &min, double &max)
Finds minimum and maximum values in a data vector.
void setLoadPath(const QString cmd)
Sets the load path for input data files.
int macro(const QString str, const QString plotFln="")
Generates a ROOT macro for plotting.
QString getLoadPath()
Gets the current load path.
int executeScript()
Executes all script commands sequentially.
int plot(const QString str)
Creates a plot file by generating and executing a ROOT macro.
QVector< PVarHandler > fVarHandler
vector of variable expression handlers
int selectAll()
Selects all loaded collections for plotting.
int var_cmd(const QString str, int script_idx=-1)
Processes a variable definition command.
QStringList fScript
list of script commands to execute
bool foundLabel(PmuppCollection *coll, const QString label)
Checks if a parameter label exists in a collection.
int loadCollection(const QString str)
Loads a data collection from file.
void finished()
Signal emitted when script execution completes.
int getVarIndex(const QString var)
Gets the index of a variable in the handler vector.
std::unique_ptr< PParamDataHandler > fParamDataHandler
handler for parameter data collections
bool foundVariable(const QString var)
Checks if a variable is defined in the variable handler.
bool fNorm
normalization flag (true = normalize Y-data to max value)
Data structure for plot configuration.
QString xLabel
X-axis parameter label (independent variable)
QVector< QString > yLabel
vector of Y-axis parameter labels (dependent variables)
int collIdx
index of the data collection to plot