60 columns_m.
addColumn(
"ref_x",
"double",
"m",
"x coordinate of reference particle in lab cs");
61 columns_m.
addColumn(
"ref_y",
"double",
"m",
"y coordinate of reference particle in lab cs");
62 columns_m.
addColumn(
"ref_z",
"double",
"m",
"z coordinate of reference particle in lab cs");
64 columns_m.
addColumn(
"ref_px",
"double",
"1",
"x momentum of reference particle in lab cs");
65 columns_m.
addColumn(
"ref_py",
"double",
"1",
"y momentum of reference particle in lab cs");
66 columns_m.
addColumn(
"ref_pz",
"double",
"1",
"z momentum of reference particle in lab cs");
110 "Azimuth in global coordinates");
113 for (
size_t i = 0; i < losses.size(); ++ i) {
115 "Number of lost particles in element");
118 if (
mode_m == std::ios::app )
122 std::string dateStr(simtimer.
date());
123 std::string timeStr(simtimer.
time());
125 std::stringstream ss;
126 ss <<
"Statistics data '"
128 <<
"' " << dateStr <<
" " << timeStr;
140 const losses_t &losses,
const double& azimuth,
141 const size_t npOutside)
145 double pathLength = beam->
get_sPos();
246 for(
size_t i = 0; i < losses.size(); ++ i) {
247 long unsigned int loss = losses[i].second;
double get_meanKineticEnergy() const
size_t getLocalNum() const
size_t getTotalNum() const
ParticleAttrib< Vector_t > P
Vector_t get_rrms() const
Vector_t get_prms() const
double getCharge() const
get the total charge per simulation particle
Vector_t get_norm_emit() const
Vector_t get_rprms() const
Vector_t get_maxExtent() const
Vector_t get_halo() const
Vector_t get_rmean() const
std::string getInputFn()
get opals input filename
static OpalData * getInstance()
void addColumn(const std::string &name, const std::string &type, const std::string &unit, const std::string &desc, std::ios_base::fmtflags flags=std::ios_base::scientific, unsigned short precision=15)
void addColumnValue(const std::string &name, const T &val)
void addDefaultParameters()
void addDescription(const std::string &text, const std::string &content)
void writeHeader()
Write SDDS header.
std::ios_base::openmode mode_m
First write to the statistics output file.
void addInfo(const std::string &mode, const size_t &no_row_counts)
std::vector< std::pair< std::string, unsigned int > > losses_t
virtual void write(const PartBunchBase< double, 3 > *)
void fillHeader(const losses_t &losses=losses_t())
StatWriter(const std::string &fname, bool restart)
std::string date() const
Return date.
std::string time() const
Return time.