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

Definition of enumeration values for VCS subprocess types. More...

Inheritance diagram for PARTONS::VCSSubProcessType:
PARTONS::BaseObject

Public Types

enum  Type {
  UNDEFINED = 0 , ALL = 1 , DVCS = 2 , BH = 3 ,
  INT = 4 , TCS = 5 , DDVCS = 6
}
 

Public Member Functions

 VCSSubProcessType ()
 Default constructor. More...
 
 VCSSubProcessType (Type type)
 Assignment constructor. More...
 
 VCSSubProcessType (const std::string &dvcsSubProcessTypeString)
 Assignment constructor trying to match subprocess type from given string. More...
 
std::string toString () const
 Get string representation of type being assigned to a declared object of this class. More...
 
VCSSubProcessType::Type getType () const
 Get type being assigned to a declared object of this class. More...
 
void setType (Type type)
 Assign type to a declared object of this class. 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...
 
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 Attributes

VCSSubProcessType::Type m_type
 Type associated to a declared object of this class. 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

Definition of enumeration values for VCS subprocess types.

This class defines a set of enumeration values that are used to distinguish between VCS subprocess types. In addition, a declared object of this class is always associated to one VCS subrpocess type (see VCSSubProcessType::m_type), so member functions can act on it. E.g.

//this is single enum variable - nothing to play with
//this is declared object
VCSSubProcessType enum_object;
//let us assign some type (default is VCSSubProcessType::UNDEFINED)
enum_object.setType(enum_variable);
//with objects you can use available functions, e.g. you can represent enumeration type by a corresponding string
std::string enum_string_1 = enum_object.toString();
//you can achieve some basic operations without the explicit declaration of objects by using the assignment constructor
std::string enum_string_2 = VCSSubProcessType(VCSSubProcessType::DVCS).toString();
Partons::getInstance()->getLoggerManager()->info("example", __func__, ElemUtils::Formatter() << "Subprocess is: " << enum_string_1);
Partons::getInstance()->getLoggerManager()->info("example", __func__, ElemUtils::Formatter() << "Subprocess is: " << enum_string_2);
ElemUtils::LoggerManager * getLoggerManager() const
Definition: Partons.cpp:191
static Partons * getInstance()
Share a unique pointer of this class.
Definition: Partons.cpp:27
Type
Definition: VCSSubProcessType.h:52
@ BH
Bethe-Heitler subrocess.
Definition: VCSSubProcessType.h:56
@ DVCS
DVCS subprocess.
Definition: VCSSubProcessType.h:55
VCSSubProcessType()
Default constructor.
Definition: VCSSubProcessType.cpp:8

which gives via Logger:

20-05-2017 12:13:02 [INFO] (example::main) Subprocess is: BH
20-05-2017 12:13:02 [INFO] (example::main) Subprocess is: DVCS

Member Enumeration Documentation

◆ Type

Enumerator
UNDEFINED 

Undefined type.

ALL 

All subprocesses, i.e. VCS, BH and INT.

DVCS 

DVCS subprocess.

BH 

Bethe-Heitler subrocess.

INT 

Interference between VCS and Bethe-Heitler contribution.

TCS 

TCS subprocess.

DDVCS 

DDVCS subprocess.

Constructor & Destructor Documentation

◆ VCSSubProcessType() [1/3]

PARTONS::VCSSubProcessType::VCSSubProcessType ( )

Default constructor.

◆ VCSSubProcessType() [2/3]

PARTONS::VCSSubProcessType::VCSSubProcessType ( Type  type)

Assignment constructor.

Parameters
typeType to be assigned.

◆ VCSSubProcessType() [3/3]

PARTONS::VCSSubProcessType::VCSSubProcessType ( const std::string &  dvcsSubProcessTypeString)

Assignment constructor trying to match subprocess type from given string.

If unable to match set VCSSubProcessType::UNDEFINED.

Parameters
dvcsSubProcessTypeStringString to be matched.

Member Function Documentation

◆ getType()

VCSSubProcessType::Type PARTONS::VCSSubProcessType::getType ( ) const

Get type being assigned to a declared object of this class.

◆ setType()

void PARTONS::VCSSubProcessType::setType ( Type  type)

Assign type to a declared object of this class.

◆ toString()

std::string PARTONS::VCSSubProcessType::toString ( ) const
virtual

Get string representation of type being assigned to a declared object of this class.

Returns
String representation of assigned type, like "LO" for VCSSubProcessType::LO.

Reimplemented from PARTONS::BaseObject.

Member Data Documentation

◆ m_type

VCSSubProcessType::Type PARTONS::VCSSubProcessType::m_type
private

Type associated to a declared object of this class.


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