OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Classes | Namespaces | Macros | Functions
Util.h File Reference
#include "Algorithms/Vektor.h"
#include "Algorithms/Quaternion.h"
#include <string>
#include <cstring>
#include <limits>
#include <sstream>
#include <type_traits>
#include <functional>
#include <cmath>
#include <initializer_list>
Include dependency graph for Util.h:

Go to the source code of this file.

Classes

struct  Util::KahanAccumulation
 

Namespaces

 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 (Vector_t p)
 
Vector_t Util::getBeta (Vector_t p)
 
double Util::getKineticEnergy (Vector_t 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 (Vector_t 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 Util::getTaitBryantAngles (Quaternion rotation, const std::string &)
 
std::string Util::toUpper (const std::string &str)
 
std::string Util::combineFilePath (std::initializer_list< std::string > ilist)
 
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 More...
 
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 >
T * Util::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 18 of file Util.h.

◆ __FILENAME__

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

Definition at line 17 of file Util.h.