22#ifndef OPAL_OpalData_HH
23#define OPAL_OpalData_HH
80 void erase(
const std::string& name);
98 void printNames(std::ostream& stream,
const std::string& pattern);
std::map< double, double > energyEvolution_t
std::pair< std::string, double > MaxPhasesT
Abstract base class for attribute values of different types.
The base class for all OPAL objects.
The global OPAL structure.
void addEnergyData(double spos, double ekin)
void printAllNames(std::ostream &stream)
void storeTitle(const std::string &)
Store the page title.
double getP0() const
Return value of global reference momentum.
int getLastStep() const
get the last step from a possible previous run
void registerExpression(AttributeBase *)
Register expression.
int getNumberOfMaxPhases()
PartBunch_t * getPartBunch()
unsigned long long getMaxTrackSteps()
void storeInputFn(const std::string &fn)
store opals input filename
void setPartBunch(PartBunch_t *p)
void setRestartDumpFreq(const int &N)
set the dump frequency as found in restart file
std::vector< MaxPhasesT >::iterator getLastMaxPhases()
void erase(const std::string &name)
Delete existing entry.
std::string getInputBasename()
get input file name without extension
void makeDirty(Object *object)
Invalidate expressions.
void operator=(const OpalData &)
void setP0(ValueDefinition *p0)
Set the global momentum.
double getGlobalPhaseShift()
units: (sec)
std::map< std::string, std::string > getVariableData()
std::string getTitle()
Get the title string.
void checkAndAddOutputFileName(const std::string &outfn)
checks the output file names of all items to avoid duplicates
std::vector< MaxPhasesT >::iterator getFirstMaxPhases()
void printNames(std::ostream &stream, const std::string &pattern)
Print all objects.
void update()
Update all objects.
void apply(const ObjectFunction &)
Apply a function to all objects.
bool hasRestartFile()
true if we do a restart from specified h5 file
void setRestartRun(const bool &value=true)
set OPAL in restart mode
void setMaxPhase(std::string elName, double phi)
void setLastStep(const int &step)
set the last step in a run for possible follow-up run
std::vector< std::string > getArguments()
static void stashInstance()
int getRestartDumpFreq() const
get the dump frequency as found in restart file
std::string getRestartFileName()
get opals restart h5 format filename
std::string getInputFn()
get opals input filename
void unregisterExpression(AttributeBase *)
Unregister expression.
Object * find(const std::string &name)
Find entry.
bool hasPriorTrack()
true if in follow-up track
static std::stack< OpalData * > stashedInstances
int getRestartStep()
get the step where to restart
void create(Object *newObject)
Create new object.
static OpalData * instance
void printTitle(std::ostream &)
Print the page title.
static void deleteInstance()
void setRestartFileName(std::string s)
store opals restart h5 format filename
void setInPrepState(bool state)
void setPriorTrack(const bool &value=true)
true if in follow-up track
void setDataSink(DataSink *s)
OpenMode getOpenMode() const
bool hasDataSinkAllocated()
true if we already allocated a DataSink object
void setGlobalPhaseShift(double shift)
units: (sec)
bool hasBunchAllocated()
true if we already allocated a ParticleBunch object
energyEvolution_t::iterator getFirstEnergyData()
void unregisterTable(Table *t)
Unregister table.
OpalData(const OpalData &)
void reset()
reset object for consecutive runs
static OpalData * getInstance()
void setMaxTrackSteps(unsigned long long s)
void storeArguments(int argc, char *argv[])
static bool isInstantiated
BoundaryGeometry * getGlobalGeometry()
void define(Object *newObject)
Define a new object.
energyEvolution_t::iterator getLastEnergyData()
OpenMode
Enum for writing to files.
void setRestartStep(int s)
store the location where to restart
void setGlobalGeometry(BoundaryGeometry *bg)
void incMaxTrackSteps(unsigned long long s)
static OpalData * popInstance()
void registerTable(Table *t)
Register table.
std::string getAuxiliaryOutputDirectory() const
get the name of the the additional data directory
void addProblemCharacteristicValue(const std::string &name, unsigned int value)
void setOpenMode(OpenMode openMode)
bool inRestartRun()
true if we do a restart run
const std::map< std::string, unsigned int > & getProblemCharacteristicValues() const
std::vector< std::string > getVariableNames()
The base class for all OPAL tables.
The base class for all OPAL value definitions.
Abstract base class for functor objects whose argument is an Object.
virtual void operator()(Object *) const
The function to be executed.