OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
Util.h File Reference
#include "Algorithms/Quaternion.hpp"
#include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <initializer_list>
#include <limits>
#include <sstream>
#include <string>
#include <type_traits>
#include "OPALTypes.h"
Include dependency graph for Util.h:

Go to the source code of this file.

Classes

struct  Util::KahanAccumulation

Namespaces

namespace  Util

Macros

#define __FILENAME__   (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#define __DBGMSG__   __FILENAME__ << ": " << __LINE__ << "\t"

Functions

std::string Util::getGitRevision ()
double Util::erfinv (double x)
double Util::getGamma (ippl::Vector< double, 3 > p)
ippl::Vector< double, 3 > Util::getBeta (ippl::Vector< double, 3 > p)
double Util::getKineticEnergy (ippl::Vector< double, 3 > p, double mass)
double Util::getBetaGamma (double Ekin, double mass)
double Util::convertMomentumEVoverCToBetaGamma (double p, double mass)
std::string Util::getTimeString (double time, unsigned int precision=3)
std::string Util::getLengthString (double spos, unsigned int precision=3)
std::string Util::getLengthString (ippl::Vector< double, 3 > spos, unsigned int precision=3)
std::string Util::getEnergyString (double energyInMeV, unsigned int precision=3)
std::string Util::getChargeString (double charge, unsigned int precision=3)
Vector_t< double, 3 > Util::getTaitBryantAngles (Quaternion rotation, const std::string &)
std::string Util::toUpper (const std::string &str)
std::string Util::boolToUpperString (const bool &b)
std::string Util::boolVectorToUpperString (const std::vector< bool > &b)
std::string Util::doubleVectorToString (const std::vector< double > &v)
std::string Util::combineFilePath (std::initializer_list< std::string > ilist)
template<class IteratorIn, class IteratorOut>
void Util::toString (IteratorIn first, IteratorIn last, IteratorOut out)
template<typename T>
std::string Util::toStringWithThousandSep (T value, char sep='\'')
unsigned int Util::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
std::string Util::base64_encode (const std::string &string_to_encode)
std::string Util::base64_decode (std::string const &encoded_string)
template<typename T, typename A>
TUtil::c_data (std::vector< T, A > &v)
template<typename T, typename A>
T const * Util::c_data (std::vector< T, A > const &v)

Macro Definition Documentation

◆ __DBGMSG__

#define __DBGMSG__   __FILENAME__ << ": " << __LINE__ << "\t"

Definition at line 36 of file Util.h.

◆ __FILENAME__

#define __FILENAME__   (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)

Definition at line 35 of file Util.h.