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