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