PARTONS  
PARtonic Tomography Of Nucleon Software
Public Member Functions | Private Member Functions | List of all members
PARTONS::KinematicUtils Class Reference

Set of utilization tools to handle kinematic-like classes. More...

Inheritance diagram for PARTONS::KinematicUtils:
PARTONS::BaseObject

Public Member Functions

 KinematicUtils ()
 Default constructor. More...
 
virtual ~KinematicUtils ()
 Destructor. More...
 
List< GPDKinematicgetGPDKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of GPDKinematic objects. More...
 
List< CollinearDistributionKinematicgetCollinearDistributionKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of CollienearDistributionKinematic objects. More...
 
List< DVCSConvolCoeffFunctionKinematicgetDVCSCCFKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of DVCSConvolCoeffFunctionKinematic objects. More...
 
List< TCSConvolCoeffFunctionKinematicgetTCSCCFKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of TCSConvolCoeffFunctionKinematic objects. More...
 
List< DVMPConvolCoeffFunctionKinematicgetDVMPCCFKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of DVMPConvolCoeffFunctionKinematic objects. More...
 
List< DDVCSConvolCoeffFunctionKinematicgetDDVCSCCFKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of DDVCSConvolCoeffFunctionKinematic objects. More...
 
List< DVCSObservableKinematicgetDVCSObservableKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of ObservableKinematic objects. More...
 
List< TCSObservableKinematicgetTCSObservableKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of ObservableKinematic objects. More...
 
List< DVMPObservableKinematicgetDVMPObservableKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of ObservableKinematic objects. More...
 
List< DDVCSObservableKinematicgetDDVCSObservableKinematicFromFile (const std::string &filePath)
 Parse a text file in order to retrieve a list of ObservableKinematic objects. More...
 
- Public Member Functions inherited from PARTONS::BaseObject
 BaseObject (const std::string &className)
 Constructor. More...
 
virtual ~BaseObject ()
 Default destructor. More...
 
virtual BaseObjectclone () const
 Virtual clone function to allow the factory to clone all derived members object stored in the BaseObjectRegistry. More...
 
virtual void resolveObjectDependencies ()
 Because of the initialization step order of the program, objects are registered in a total random order and some objects depend on others. More...
 
virtual std::string toString () const
 Return a pre-formatted characters string for output visualization of class member's values. More...
 
void serialize (ElemUtils::Packet &packet) const
 Used to split a complex C++ object into a concatenation of simple types. More...
 
void unserialize (ElemUtils::Packet &packet)
 Used to rebuild a complex C++ object from a concatenation of simple type. More...
 
bool operator< (const BaseObject &other) const
 Overload of < operator to sort BaseObject object by its indexId value. More...
 
const std::string & getClassName () const
 
unsigned int getObjectId () const
 
int getIndexId () const
 
void setIndexId (int indexId)
 

Private Member Functions

void error (const std::string &funcName, const std::string &msg)
 Throw a custom error. More...
 
void errorCannotOpenFile (const std::string &funcName, const std::string &msg)
 Throw an error when unable to open a file. More...
 
void checkEmptyInputFile (const std::string &funcName, const std::vector< std::string > &kinematicString, const std::string &filePath)
 Check if content of a file is empty. More...
 
std::vector< PhysicalUnitgetUnitsFromInputFileLine (const std::string &funcName, const std::string &line) const
 Return vector containing units according to a give string. More...
 

Additional Inherited Members

- Protected Member Functions inherited from PARTONS::BaseObject
 BaseObject (const BaseObject &other)
 Copy constructor. More...
 
void info (const std::string &functionName, const std::string &message) const
 Print info message into logger. More...
 
void debug (const std::string &functionName, const std::string &message) const
 Print debug message into logger. More...
 
void warn (const std::string &functionName, const std::string &message) const
 Print warning message into logger. More...
 
void errorMissingParameter (const std::string &parameterName) const
 Use in automation process to throw exception when a parameter is missing from the XML scenario file. More...
 

Detailed Description

Set of utilization tools to handle kinematic-like classes.

This class is used as a container for utilization tools to handle kinematic-like classes. It provides in particular tools to parse text files in order to create a set of kinematic-like objects.

Constructor & Destructor Documentation

◆ KinematicUtils()

PARTONS::KinematicUtils::KinematicUtils ( )

Default constructor.

◆ ~KinematicUtils()

PARTONS::KinematicUtils::~KinematicUtils ( )
virtual

Destructor.

Member Function Documentation

◆ checkEmptyInputFile()

void PARTONS::KinematicUtils::checkEmptyInputFile ( const std::string &  funcName,
const std::vector< std::string > &  kinematicString,
const std::string &  filePath 
)
private

Check if content of a file is empty.

If yes, throw an error.

Parameters
funcNameName of function where the check is performed.
kinematicStringContent of file.
filePathPath to file.

◆ error()

void PARTONS::KinematicUtils::error ( const std::string &  funcName,
const std::string &  msg 
)
private

Throw a custom error.

Parameters
funcNameName of function where the error has appeared.
msgUser readable message to be thrown.

◆ errorCannotOpenFile()

void PARTONS::KinematicUtils::errorCannotOpenFile ( const std::string &  funcName,
const std::string &  msg 
)
private

Throw an error when unable to open a file.

Parameters
funcNameName of function where the error has appeared.
msgUser readable message to be thrown.

◆ getCollinearDistributionKinematicFromFile()

List< CollinearDistributionKinematic > PARTONS::KinematicUtils::getCollinearDistributionKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of CollienearDistributionKinematic objects.

The parsed file should display separate lines of the form "x | MuF2 | MuR2".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted GPDKinematic objects.

◆ getDDVCSCCFKinematicFromFile()

List< DDVCSConvolCoeffFunctionKinematic > PARTONS::KinematicUtils::getDDVCSCCFKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of DDVCSConvolCoeffFunctionKinematic objects.

The parsed file should display separate lines of the form "xi | t | Q2 | Q2 | MuF2 | MuR2".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted DDVCSConvolCoeffFunctionKinematic objects.

◆ getDDVCSObservableKinematicFromFile()

List< DDVCSObservableKinematic > PARTONS::KinematicUtils::getDDVCSObservableKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of ObservableKinematic objects.

The parsed file should display separate lines of the form "xB | t | Q2 | Q2 | E | phi | phiL | thetaL".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted ObservableKinematic objects.

◆ getDVCSCCFKinematicFromFile()

List< DVCSConvolCoeffFunctionKinematic > PARTONS::KinematicUtils::getDVCSCCFKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of DVCSConvolCoeffFunctionKinematic objects.

The parsed file should display separate lines of the form "xi | t | Q2 | MuF2 | MuR2".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted DVCSConvolCoeffFunctionKinematic objects.

◆ getDVCSObservableKinematicFromFile()

List< DVCSObservableKinematic > PARTONS::KinematicUtils::getDVCSObservableKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of ObservableKinematic objects.

The parsed file should display separate lines of the form "xB | t | Q2 | E | phi".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted ObservableKinematic objects.

◆ getDVMPCCFKinematicFromFile()

List< DVMPConvolCoeffFunctionKinematic > PARTONS::KinematicUtils::getDVMPCCFKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of DVMPConvolCoeffFunctionKinematic objects.

The parsed file should display separate lines of the form "xi | t | Q2 | MuF2 | MuR2 | mesonType | mesonPolarization".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted DVMPConvolCoeffFunctionKinematic objects.

◆ getDVMPObservableKinematicFromFile()

List< DVMPObservableKinematic > PARTONS::KinematicUtils::getDVMPObservableKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of ObservableKinematic objects.

The parsed file should display separate lines of the form "xB | t | Q2 | E | phi | mesonType".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted ObservableKinematic objects.

◆ getGPDKinematicFromFile()

List< GPDKinematic > PARTONS::KinematicUtils::getGPDKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of GPDKinematic objects.

The parsed file should display separate lines of the form "x | xi | t | MuF2 | MuR2".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted GPDKinematic objects.

◆ getTCSCCFKinematicFromFile()

List< TCSConvolCoeffFunctionKinematic > PARTONS::KinematicUtils::getTCSCCFKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of TCSConvolCoeffFunctionKinematic objects.

The parsed file should display separate lines of the form "xi | t | Q2' | MuF2 | MuR2".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted TCSConvolCoeffFunctionKinematic objects.

◆ getTCSObservableKinematicFromFile()

List< TCSObservableKinematic > PARTONS::KinematicUtils::getTCSObservableKinematicFromFile ( const std::string &  filePath)

Parse a text file in order to retrieve a list of ObservableKinematic objects.

The parsed file should display separate lines of the form "t | Q2' | E | phi | theta | MLepton".

Parameters
filePathPath to file to be parsed.
Returns
List of extracted ObservableKinematic objects.

◆ getUnitsFromInputFileLine()

std::vector< PhysicalUnit > PARTONS::KinematicUtils::getUnitsFromInputFileLine ( const std::string &  funcName,
const std::string &  line 
) const
private

Return vector containing units according to a give string.

Parameters
funcNameName of function to throw error if needed.
lineInput line.
Returns
Vector containing returned units.

The documentation for this class was generated from the following files: