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

Class representing single task. More...

Inheritance diagram for PARTONS::Task:
PARTONS::BaseObject

Public Member Functions

 Task ()
 Default constructor. More...
 
virtual ~Task ()
 Destructor. More...
 
virtual std::string toString () const
 Return a pre-formatted characters string for output visualization of class member's values. More...
 
ScenariogetScenario () const
 Get pointer to the scenario that holds this task. More...
 
void setScenario (Scenario *pScenario)
 Set pointer to the scenario that holds this task. More...
 
const std::string & getServiceName () const
 Get name of service responsible for running this scenario. More...
 
void setServiceName (const std::string &serviceName)
 Set name of service responsible for running this scenario. More...
 
const std::string & getFunctionName () const
 Get name of function to be evaluated by this task. More...
 
void setFunctionName (const std::string &functionName)
 Set name of function to be evaluated by this task. More...
 
bool isStoreInDB () const
 Check if the result of this task is going to be store in the database. More...
 
void setStoreInDB (bool storeInDb)
 Set if the result of this task is going to be store in the database. More...
 
unsigned int getScenarioTaskIndexNumber () const
 Get index of this task in a given scenario holding it. More...
 
void setScenarioTaskIndexNumber (unsigned int scenarioTaskIndexNumber)
 Set index of this task in a given scenario holding it. More...
 
const BaseObjectDatagetModuleComputationConfiguration () const
 Get base object data stored in xml block given by XMLParserI::COMPUTATION_CONFIGURATION_NODE_NAME tag. More...
 
void setModuleComputationConfiguration (const BaseObjectData &moduleComputationConfiguration)
 Set base object data stored in xml block given by XMLParserI::COMPUTATION_CONFIGURATION_NODE_NAME tag. More...
 
const BaseObjectDatagetKinematicsData () const
 Get base object data stored in xml block given by XMLParserI::KINEMATICS_NODE_NAME tag. More...
 
void setKinematicsData (const BaseObjectData &kinematicsData)
 Set base object data stored in xml block given by XMLParserI::KINEMATICS_NODE_NAME tag. More...
 
const BaseObjectDatagetTaskParameters () const
 Get base object data stored in xml block given by XMLParserI::TASK_NODE_NAME tag. More...
 
void setTaskParameters (const BaseObjectData &taskParameters)
 Set base object data stored in xml block given by XMLParserI::TASK_NODE_NAME tag. 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

Scenariom_pScenario
 Pointer to the scenario that holds this task. More...
 
std::string m_serviceName
 Name of service responsible for running this scenario. More...
 
std::string m_functionName
 Name of function to be evaluated by this task. More...
 
bool m_storeInDB
 Switch indicating if the result of this task is going to be store in the database. More...
 
unsigned int m_scenarioTaskIndexNumber
 Index of this task in a given scenario holding it. More...
 
BaseObjectData m_moduleComputationConfiguration
 Base object data stored in xml block given by XMLParserI::COMPUTATION_CONFIGURATION_NODE_NAME tag. More...
 
BaseObjectData m_kinematicsData
 Base object data stored in xml block given by XMLParserI::KINEMATICS_NODE_NAME tag. More...
 
BaseObjectData m_taskParameters
 Base object data stored in xml block given by XMLParserI::TASK_NODE_NAME tag. 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

Class representing single task.

This class represents a single task to be evaluated by one of services. An object of this class is intended to be created by a xml parser during running PARTONS with a specific xml file, which can be local or can be retrieved from a database. Therefore, this class may be seen as a representation of a single task encoded in a xml file, like:

<task service="GPDService" method="computeGPDModel" storeInDB="0">
<kinematics type="GPDKinematic">
<param name="x" value="0.1" />
<param name="xi" value="0.05" />
<param name="t" value="-0.3" />
<param name="MuF2" value="8." />
<param name="MuR2" value="8." />
</kinematics>
<computation_configuration>
<module type="GPDModule">
<param name="className" value="GK11Model" />
</module>
</computation_configuration>
</task>

Constructor & Destructor Documentation

◆ Task()

PARTONS::Task::Task ( )

Default constructor.

◆ ~Task()

PARTONS::Task::~Task ( )
virtual

Destructor.

Member Function Documentation

◆ getFunctionName()

const std::string & PARTONS::Task::getFunctionName ( ) const

Get name of function to be evaluated by this task.

◆ getKinematicsData()

const BaseObjectData & PARTONS::Task::getKinematicsData ( ) const

Get base object data stored in xml block given by XMLParserI::KINEMATICS_NODE_NAME tag.

◆ getModuleComputationConfiguration()

const BaseObjectData & PARTONS::Task::getModuleComputationConfiguration ( ) const

Get base object data stored in xml block given by XMLParserI::COMPUTATION_CONFIGURATION_NODE_NAME tag.

◆ getScenario()

Scenario * PARTONS::Task::getScenario ( ) const

Get pointer to the scenario that holds this task.

◆ getScenarioTaskIndexNumber()

unsigned int PARTONS::Task::getScenarioTaskIndexNumber ( ) const

Get index of this task in a given scenario holding it.

◆ getServiceName()

const std::string & PARTONS::Task::getServiceName ( ) const

Get name of service responsible for running this scenario.

◆ getTaskParameters()

const BaseObjectData & PARTONS::Task::getTaskParameters ( ) const

Get base object data stored in xml block given by XMLParserI::TASK_NODE_NAME tag.

◆ isStoreInDB()

bool PARTONS::Task::isStoreInDB ( ) const

Check if the result of this task is going to be store in the database.

◆ setFunctionName()

void PARTONS::Task::setFunctionName ( const std::string &  functionName)

Set name of function to be evaluated by this task.

◆ setKinematicsData()

void PARTONS::Task::setKinematicsData ( const BaseObjectData kinematicsData)

Set base object data stored in xml block given by XMLParserI::KINEMATICS_NODE_NAME tag.

◆ setModuleComputationConfiguration()

void PARTONS::Task::setModuleComputationConfiguration ( const BaseObjectData moduleComputationConfiguration)

Set base object data stored in xml block given by XMLParserI::COMPUTATION_CONFIGURATION_NODE_NAME tag.

◆ setScenario()

void PARTONS::Task::setScenario ( Scenario pScenario)

Set pointer to the scenario that holds this task.

◆ setScenarioTaskIndexNumber()

void PARTONS::Task::setScenarioTaskIndexNumber ( unsigned int  scenarioTaskIndexNumber)

Set index of this task in a given scenario holding it.

◆ setServiceName()

void PARTONS::Task::setServiceName ( const std::string &  serviceName)

Set name of service responsible for running this scenario.

◆ setStoreInDB()

void PARTONS::Task::setStoreInDB ( bool  storeInDb)

Set if the result of this task is going to be store in the database.

◆ setTaskParameters()

void PARTONS::Task::setTaskParameters ( const BaseObjectData taskParameters)

Set base object data stored in xml block given by XMLParserI::TASK_NODE_NAME tag.

◆ toString()

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

Return a pre-formatted characters string for output visualization of class member's values.

Returns
a pre-formatted characters string.

Reimplemented from PARTONS::BaseObject.

Member Data Documentation

◆ m_functionName

std::string PARTONS::Task::m_functionName
private

Name of function to be evaluated by this task.

◆ m_kinematicsData

BaseObjectData PARTONS::Task::m_kinematicsData
private

Base object data stored in xml block given by XMLParserI::KINEMATICS_NODE_NAME tag.

◆ m_moduleComputationConfiguration

BaseObjectData PARTONS::Task::m_moduleComputationConfiguration
private

Base object data stored in xml block given by XMLParserI::COMPUTATION_CONFIGURATION_NODE_NAME tag.

◆ m_pScenario

Scenario* PARTONS::Task::m_pScenario
private

Pointer to the scenario that holds this task.

◆ m_scenarioTaskIndexNumber

unsigned int PARTONS::Task::m_scenarioTaskIndexNumber
private

Index of this task in a given scenario holding it.

◆ m_serviceName

std::string PARTONS::Task::m_serviceName
private

Name of service responsible for running this scenario.

◆ m_storeInDB

bool PARTONS::Task::m_storeInDB
private

Switch indicating if the result of this task is going to be store in the database.

◆ m_taskParameters

BaseObjectData PARTONS::Task::m_taskParameters
private

Base object data stored in xml block given by XMLParserI::TASK_NODE_NAME tag.


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