OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <StatWriter.h>
Public Types | |
typedef std::vector< std::pair< std::string, unsigned int > > | losses_t |
![]() | |
typedef std::pair< std::string, std::string > | desc_t |
typedef std::tuple< std::string, std::string, std::string > | param_t |
typedef std::pair< std::string, size_t > | data_t |
typedef std::tuple< std::string, std::string, std::string, std::string > | cols_t |
Public Member Functions | |
StatWriter (const std::string &fname, bool restart) | |
void | write (const PartBunchBase< double, 3 > *beam, Vector_t FDext[], const losses_t &losses=losses_t(), const double &azimuth=-1, const size_t npOutside=0) |
Write statistical data. More... | |
virtual void | write (const PartBunchBase< double, 3 > *) |
![]() | |
StatBaseWriter (const std::string &fname, bool restart) | |
unsigned int | rewindToSpos (double maxSpos) |
delete the last 'numberOfLines' lines of the statistics file More... | |
![]() | |
SDDSWriter (const std::string &fname, bool restart) | |
virtual | ~SDDSWriter () |
virtual void | write (const PartBunchBase< double, 3 > *) |
void | rewindLines (size_t numberOfLines) |
delete the last 'numberOfLines' lines of the file 'fileName' More... | |
void | replaceVersionString () |
double | getLastValue (const std::string &column) |
bool | exists () const |
Private Member Functions | |
void | fillHeader (const losses_t &losses=losses_t()) |
Additional Inherited Members | |
![]() | |
void | addDescription (const std::string &text, const std::string &content) |
template<typename T > | |
void | addParameter (const std::string &name, const std::string &type, const std::string &desc, const T &value) |
void | addDefaultParameters () |
void | addColumn (const std::string &name, const std::string &type, const std::string &unit, const std::string &desc) |
void | addInfo (const std::string &mode, const size_t &no_row_counts) |
void | writeRow () |
void | open () |
void | close () |
void | writeHeader () |
Write SDDS header. More... | |
template<typename T > | |
std::string | toString (const T &val) |
bool | hasColumns () const |
![]() | |
std::string | fname_m |
std::ios_base::openmode | mode_m |
First write to the statistics output file. More... | |
SDDSColumnSet | columns_m |
Definition at line 24 of file StatWriter.h.
typedef std::vector<std::pair<std::string, unsigned int> > StatWriter::losses_t |
Definition at line 27 of file StatWriter.h.
StatWriter::StatWriter | ( | const std::string & | fname, |
bool | restart | ||
) |
Definition at line 27 of file StatWriter.cpp.
Definition at line 32 of file StatWriter.cpp.
References SDDSColumnSet::addColumn(), SDDSWriter::addDefaultParameters(), SDDSWriter::addDescription(), SDDSWriter::addInfo(), SDDSWriter::columns_m, OPALTimer::Timer::date(), OpalData::getInputFn(), OpalData::getInstance(), IpplInfo::getNodes(), SDDSWriter::hasColumns(), SDDSWriter::mode_m, and OPALTimer::Timer::time().
Referenced by write().
|
inline |
Definition at line 66 of file SDDSWriter.h.
void StatWriter::write | ( | const PartBunchBase< double, 3 > * | beam, |
Vector_t | FDext[], | ||
const losses_t & | losses = losses_t() , |
||
const double & | azimuth = -1 , |
||
const size_t | npOutside = 0 |
||
) |
Write statistical data.
Writes statistical beam data to proper output file. This is information such as RMS beam parameters etc.
Also gathers and writes load balancing data to load balance statistics file.
beam | The beam. |
FDext | The external E and B field for the head, reference and tail particles. The vector array has the following layout:
|
Write data to files. If this is the first write to the beam statistics file, write SDDS header information.
Definition at line 139 of file StatWriter.cpp.
References SDDSColumnSet::addColumnValue(), SDDSWriter::close(), SDDSWriter::columns_m, fillHeader(), PartBunchBase< T, Dim >::get_DDx(), PartBunchBase< T, Dim >::get_DDy(), PartBunchBase< T, Dim >::get_Dx(), PartBunchBase< T, Dim >::get_Dy(), PartBunchBase< T, Dim >::get_halo(), PartBunchBase< T, Dim >::get_maxExtent(), PartBunchBase< T, Dim >::get_meanKineticEnergy(), PartBunchBase< T, Dim >::get_norm_emit(), PartBunchBase< T, Dim >::get_prms(), PartBunchBase< T, Dim >::get_rmean(), PartBunchBase< T, Dim >::get_rprms(), PartBunchBase< T, Dim >::get_rrms(), PartBunchBase< T, Dim >::get_sPos(), PartBunchBase< T, Dim >::getCharge(), PartBunchBase< T, Dim >::getdE(), PartBunchBase< T, Dim >::getdT(), OpalData::getInstance(), PartBunchBase< T, Dim >::getLocalNum(), IpplInfo::getNodes(), PartBunchBase< T, Dim >::getT(), PartBunchBase< T, Dim >::getTotalNum(), IpplInfo::myNode(), SDDSWriter::open(), PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::R, PartBunchBase< T, Dim >::RefPartP_m, PartBunchBase< T, Dim >::RefPartR_m, SDDSWriter::writeHeader(), and SDDSWriter::writeRow().