30#include <boost/filesystem.hpp>
81 throw std::runtime_error(
"Fix this function please");
88 throw std::runtime_error(
"Fix this function please");
110 throw std::runtime_error(
"Fix this function please");
149 throw std::runtime_error(
"Fix this function please");
159 double currentPosition = endField;
161 currentPosition = bunch->
get_sPos();
182 throw std::runtime_error(
"Fix this function please");
194 for (
auto& stat : stats) {
214 throw std::runtime_error(
"Fix this function please");
221 std::string fileName =
224 bool hasPriorTrack = instance->hasPriorTrack();
225 bool inRestartRun = instance->inRestartRun();
228 double spos = it->first;
234 writer.
addRow(entry.second);
PartBunch< PLayout_t< double, 3 >, double, 3 > PartBunch_t
ippl::Vector< T, Dim > Vector_t
unsigned int rewindLinesSDDS(const std::string &fileName, double maxSPos, bool checkForTime)
rewind the SDDS file such that the spos of the last step is less or equal to maxSPos
virtual void visitMonitor(const Monitor &)=0
Apply the algorithm to a beam position monitor.
Component(const std::string &name)
Constructor with given name.
PartBunch_t * RefPartBunch_m
std::string getOutputFN() const
Get output filename.
static void writeStatistics()
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Monitor.
virtual void goOnline(const double &kineticEnergy) override
@ OFF
Monitor is off (inactive).
virtual ElementType getType() const override
Get element type std::string.
virtual void goOffline() override
std::unique_ptr< LossDataSink > lossDs_m
virtual void getDimensions(double &zBegin, double &zEnd) const override
Monitor(const std::string &name)
Constructor with given name.
static std::map< double, SetStatistics > statFileEntries_sm
virtual void finalise() override
unsigned int numPassages_m
virtual bool applyToReferenceParticle(const Vector_t< double, 3 > &R, const Vector_t< double, 3 > &P, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) override
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField) override
virtual bool apply(const size_t &i, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) override
static const double halfLength_s
void driftToCorrectPositionAndSave(const Vector_t< double, 3 > &R, const Vector_t< double, 3 > &P)
virtual bool bends() const override
std::string getInputBasename()
get input file name without extension
static OpalData * getInstance()
size_t getTotalNum() const
void addRow(const SetStatistics &set)