PARTONS  
PARtonic Tomography Of Nucleon Software
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
PARTONS::DVMPConvolCoeffFunctionService Class Reference

Singleton to handle and compute some pre-configured CCF modules. More...

Inheritance diagram for PARTONS::DVMPConvolCoeffFunctionService:
PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult > PARTONS::ServiceObjectTyped< KinematicType, ResultType > PARTONS::ServiceObject PARTONS::BaseObject

Public Member Functions

virtual ~DVMPConvolCoeffFunctionService ()
 Destructor. 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 DVMPConvolCoeffFunctionKinematic newKinematicFromTask (const Task &task) const
 Uses an automation task (XML file) to set specific kinematics. More...
 
virtual List< DVMPConvolCoeffFunctionKinematicnewListOfKinematicFromTask (const Task &task) const
 Uses an automation task (XML file) to set a list of kinematics. More...
 
virtual void storeResultListInDatabase (const List< DVMPConvolCoeffFunctionResult > &results) const
 Store list of results in DB. More...
 
virtual void generatePlotFileTask (Task &task)
 Method used in the automated interface to generate a data file ready for plotting. More...
 
DVMPConvolCoeffFunctionModulenewDVMPConvolCoeffFunctionModuleFromTask (const Task &task) const
 Uses an automation task (XML file) to configure a DVMPConvolCoeffFunctionModule. More...
 
- Public Member Functions inherited from PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >
virtual ~ConvolCoeffFunctionService ()
 Destructor. More...
 
virtual void computeTask (Task &task)
 Compute task. More...
 
DVMPConvolCoeffFunctionResult computeSingleKinematic (const DVMPConvolCoeffFunctionKinematic &kinematic, ConvolCoeffFunctionModule< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult > *pConvolCoeffFunctionModule, const List< GPDType > &gpdTypeList=List< GPDType >()) const
 Computes a ConvolCoeffFunctionModule at specific kinematics. More...
 
List< DVMPConvolCoeffFunctionResultcomputeManyKinematic (List< DVMPConvolCoeffFunctionKinematic > &kinematics, ConvolCoeffFunctionModule< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult > *pConvolCoeffFunctionModule, const List< GPDType > &gpdTypeList=List< GPDType >())
 Computes a CCF Model for a list of kinematics. More...
 
- Public Member Functions inherited from PARTONS::ServiceObjectTyped< KinematicType, ResultType >
virtual ~ServiceObjectTyped ()
 Destructor. More...
 
void add (const ResultType &result)
 Add single result to result list. More...
 
void add (const List< ResultType > &resultList)
 Add many results to result list. More...
 
void sortResultList ()
 Sort result list. More...
 
List< ResultType > & getResultList ()
 Get result list. More...
 
void clearResultListBuffer ()
 Clear result list. More...
 
void clearKinematicListBuffer ()
 Clear kinematic list. More...
 
List< ResultType > computeScenario (Scenario &scenario)
 Compute scenario. More...
 
List< ResultType > flushResultList ()
 Flush result list. More...
 
- Public Member Functions inherited from PARTONS::ServiceObject
 ServiceObject (const std::string &className)
 Default constructor. More...
 
virtual ~ServiceObject ()
 Default destructor. More...
 
void addTasks (const List< ElemUtils::Packet > &tasks)
 Add task to queue. More...
 
bool isEmptyTaskQueue ()
 Check if queue is empty. More...
 
ElemUtils::Packet popTaskFormQueue ()
 Pop task from queue. More...
 
void initComputationalThread (ModuleObject *pModuleObject)
 Initialize all threads. More...
 
void launchAllThreadAndWaitingFor ()
 Lunch all threads. More...
 
void clearAllThread ()
 Clear all threads. More...
 
std::string generateSQLQueryForPlotFile (const std::string &tableName, const ElemUtils::Parameters &selectParams, const ElemUtils::Parameters &whereParams) const
 Generate SQL query to create a plot file. More...
 
void generatePlotFile (const std::string &filePath, const std::string &sqlQuery, const char splitChar) const
 Generate a plot file. 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 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)
 

Static Public Attributes

static const unsigned int classId
 Unique ID to automatically register the class in the registry. More...
 
- Static Public Attributes inherited from PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >
static const std::string CCF_SERVICE_COMPUTE_SINGLE_KINEMATIC
 Name of the XML task used for computing a CCF. More...
 
static const std::string CCF_SERVICE_COMPUTE_MANY_KINEMATIC
 Name of the XML task used for computing CCFs with a list of kinematics. More...
 
static const std::string CCF_SERVICE_GENERATE_PLOT_FILE
 Name of the XML task used for generating a data file ready for plotting. More...
 
- Static Public Attributes inherited from PARTONS::ServiceObjectTyped< KinematicType, ResultType >
static const std::string SERVICE_OBJECT_PRINT_RESULTS
 Name of the XML task used to print results via Logger. More...
 

Protected Member Functions

 DVMPConvolCoeffFunctionService (const std::string &className)
 Default constructor. More...
 
virtual ConvolCoeffFunctionModule< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult > * newConvolCoeffFunctionModuleFromTask (const Task &task) const
 Uses an automation task (XML file) to configure a ConvolCoeffFunctionModule. More...
 
- Protected Member Functions inherited from PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >
 ConvolCoeffFunctionService (const std::string &className)
 Default constructor. More...
 
- Protected Member Functions inherited from PARTONS::ServiceObjectTyped< KinematicType, ResultType >
 ServiceObjectTyped (const std::string &className)
 Default constructor. More...
 
bool computeGeneralTask (Task &task)
 General tasks. More...
 
void printResultListBuffer ()
 Print results to buffer. More...
 
void updateResultInfo (ResultType &result, const ResultInfo &resultInfo)
 Update result info. More...
 
void updateResultInfo (List< ResultType > &resultList, const ResultInfo &resultInfo)
 Update result info. More...
 
- Protected Member Functions inherited from PARTONS::ServiceObject
std::string generateSQLQueryForPlotFileTask (Task &task, const std::string &tableName) const
 Generate SQL query from a task. More...
 
std::string getOutputFilePathForPlotFileTask (Task &task) const
 Get path to a plot file from a task. More...
 
List< GPDTypegetGPDTypeListFromTask (Task &task) const
 Get list of GPD types to be computed from a task. More...
 
List< CollinearDistributionTypegetCollinearDistributionTypeListFromTask (Task &task) const
 Get list of Collinear Distribution types to be computed from a task. More...
 
void errorUnknownMethod (const Task &task) const
 Throw exception if unknown method. More...
 
- 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...
 

Additional Inherited Members

- Protected Attributes inherited from PARTONS::ServiceObjectTyped< KinematicType, ResultType >
unsigned int m_batchSize
 Batch size. More...
 
sf::Mutex m_mutexKinematicList
 Mutex for kinematic list. More...
 
sf::Mutex m_mutexResultListBuffer
 Mutex for result list. More...
 
List< KinematicTypem_kinematicListBuffer
 Kinematic list. More...
 
List< ResultType > m_resultListBuffer
 Result list. More...
 
ResultInfo m_resultInfo
 Result info. More...
 
- Protected Attributes inherited from PARTONS::ServiceObject
ModuleObjectFactorym_pModuleObjectFactory
 Pointer to ModuleObjectFactory. More...
 
AutomationServicem_pAutomationService
 Pointer to AutomationService. More...
 

Detailed Description

Singleton to handle and compute some pre-configured CCF modules.

See the general tutorial and this table of examples.

Constructor & Destructor Documentation

◆ ~DVMPConvolCoeffFunctionService()

PARTONS::DVMPConvolCoeffFunctionService::~DVMPConvolCoeffFunctionService ( )
virtual

Destructor.

◆ DVMPConvolCoeffFunctionService()

PARTONS::DVMPConvolCoeffFunctionService::DVMPConvolCoeffFunctionService ( const std::string &  className)
protected

Default constructor.

Member Function Documentation

◆ generatePlotFileTask()

void PARTONS::DVMPConvolCoeffFunctionService::generatePlotFileTask ( Task task)
virtual

Method used in the automated interface to generate a data file ready for plotting.

Parameters
taskAutomated XML task.

Implements PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >.

◆ newConvolCoeffFunctionModuleFromTask()

ConvolCoeffFunctionModule< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult > * PARTONS::DVMPConvolCoeffFunctionService::newConvolCoeffFunctionModuleFromTask ( const Task task) const
protectedvirtual

Uses an automation task (XML file) to configure a ConvolCoeffFunctionModule.

Parameters
taskAutomation task.
Returns
Pre-configured ConvolCoeffFunctionModule.

Implements PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >.

◆ newDVMPConvolCoeffFunctionModuleFromTask()

DVMPConvolCoeffFunctionModule * PARTONS::DVMPConvolCoeffFunctionService::newDVMPConvolCoeffFunctionModuleFromTask ( const Task task) const

Uses an automation task (XML file) to configure a DVMPConvolCoeffFunctionModule.

Parameters
taskAutomation task.
Returns
Pre-configured DVMPConvolCoeffFunctionModule.

◆ newKinematicFromTask()

DVMPConvolCoeffFunctionKinematic PARTONS::DVMPConvolCoeffFunctionService::newKinematicFromTask ( const Task task) const
virtual

Uses an automation task (XML file) to set specific kinematics.

Parameters
taskTask.
Returns
CCF kinematics.

Implements PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >.

◆ newListOfKinematicFromTask()

List< DVMPConvolCoeffFunctionKinematic > PARTONS::DVMPConvolCoeffFunctionService::newListOfKinematicFromTask ( const Task task) const
virtual

Uses an automation task (XML file) to set a list of kinematics.

Parameters
taskTask.
Returns
List of CCF kinematics.

Implements PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >.

◆ resolveObjectDependencies()

void PARTONS::DVMPConvolCoeffFunctionService::resolveObjectDependencies ( )
virtual

Because of the initialization step order of the program, objects are registered in a total random order and some objects depend on others.

To avoid the problem of pointer resolution order, this method is called by the BaseObjectRegistery after all objects are well registered in it. See BaseObjectRegistry class documentation for more details.

Reimplemented from PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >.

◆ storeResultListInDatabase()

void PARTONS::DVMPConvolCoeffFunctionService::storeResultListInDatabase ( const List< DVMPConvolCoeffFunctionResult > &  results) const
virtual

Store list of results in DB.

Parameters
resultsList of results.
Returns
True is insertion successful.

Implements PARTONS::ConvolCoeffFunctionService< DVMPConvolCoeffFunctionKinematic, DVMPConvolCoeffFunctionResult >.

Member Data Documentation

◆ classId

const unsigned int PARTONS::DVMPConvolCoeffFunctionService::classId
static
Initial value:
=
"DVMPConvolCoeffFunctionService"))
unsigned int registerBaseObject(BaseObject *pBaseObject)
Store a unique instance of a module identified by a unique string character key.
Definition: BaseObjectRegistry.cpp:45
DVMPConvolCoeffFunctionService(const std::string &className)
Default constructor.
Definition: DVMPConvolCoeffFunctionService.cpp:25
static Partons * getInstance()
Share a unique pointer of this class.
Definition: Partons.cpp:27
BaseObjectRegistry * getBaseObjectRegistry() const
Definition: Partons.cpp:175

Unique ID to automatically register the class in the registry.


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