PARTONS
|
PARtonic Tomography Of Nucleon Software
|
Class to handle and compute collinear-distribution modules. More...
Public Member Functions | |
virtual | ~CollinearDistributionService () |
Default 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 void | computeTask (Task &task) |
Compute task. More... | |
CollinearDistributionResult | computeSingleKinematic (const CollinearDistributionKinematic &colldistKinematic, CollinearDistributionModule *pCollinearDistributionModule, const List< CollinearDistributionType > &colldistType=List< CollinearDistributionType >()) const |
Computes collinear-distribution model at specific kinematics. More... | |
List< CollinearDistributionResult > | computeManyKinematic (const List< CollinearDistributionKinematic > &colldistKinematicList, CollinearDistributionModule *pCollinearDistributionModule, const List< CollinearDistributionType > &colldistTypeList=List< CollinearDistributionType >()) |
Computes a collinear-distribution model for a list of kinematics. More... | |
CollinearDistributionModule * | newCollinearDistributionModuleFromTask (const Task &task) const |
Devises the CollinearDistributionModule from an automation task. More... | |
CollinearDistributionKinematic | newKinematicFromTask (const Task &task) const |
Devises the collinear-distribution kinematics from an automation task. More... | |
List< CollinearDistributionKinematic > | newListOfKinematicFromTask (const Task &task) const |
Devises the collinear-distribution kinematics from an automation task. More... | |
Public Member Functions inherited from PARTONS::ServiceObjectTyped< CollinearDistributionKinematic, CollinearDistributionResult > | |
virtual | ~ServiceObjectTyped () |
Destructor. More... | |
void | add (const CollinearDistributionResult &result) |
Add single result to result list. More... | |
void | add (const List< CollinearDistributionResult > &resultList) |
Add many results to result list. More... | |
void | sortResultList () |
Sort result list. More... | |
List< CollinearDistributionResult > & | getResultList () |
Get result list. More... | |
void | clearResultListBuffer () |
Clear result list. More... | |
void | clearKinematicListBuffer () |
Clear kinematic list. More... | |
List< CollinearDistributionResult > | computeScenario (Scenario &scenario) |
Compute scenario. More... | |
List< CollinearDistributionResult > | 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 BaseObject * | clone () 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 const std::string | COLLINEAR_DISTRIBUTION_SERVICE_COMPUTE_SINGLE_KINEMATIC |
Name of the XML task used to compute a collinear-distribution at given kinematics. More... | |
static const std::string | COLLINEAR_DISTRIBUTION_SERVICE_COMPUTE_MANY_KINEMATIC |
Name of the XML task used to compute collinear-distributions for a list of kinematics. More... | |
static const std::string | COLLINEAR_DISTRIBUTION_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< CollinearDistributionKinematic, CollinearDistributionResult > | |
static const std::string | SERVICE_OBJECT_PRINT_RESULTS |
Name of the XML task used to print results via Logger. More... | |
Protected Member Functions | |
CollinearDistributionService (const std::string &className) | |
Default constructor used by the registry. More... | |
Protected Member Functions inherited from PARTONS::ServiceObjectTyped< CollinearDistributionKinematic, CollinearDistributionResult > | |
ServiceObjectTyped (const std::string &className) | |
Default constructor. More... | |
bool | computeGeneralTask (Task &task) |
General tasks. More... | |
void | printResultListBuffer () |
Print results to buffer. More... | |
void | updateResultInfo (CollinearDistributionResult &result, const ResultInfo &resultInfo) |
Update result info. More... | |
void | updateResultInfo (List< CollinearDistributionResult > &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< GPDType > | getGPDTypeListFromTask (Task &task) const |
Get list of GPD types to be computed from a task. More... | |
List< CollinearDistributionType > | getCollinearDistributionTypeListFromTask (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 ¶meterName) const |
Use in automation process to throw exception when a parameter is missing from the XML scenario file. More... | |
Private Member Functions | |
CollinearDistributionResult | computeSingleKinematicTask (Task &task) |
Method used in the automated interface to compute collinear-distribution. More... | |
List< CollinearDistributionResult > | computeManyKinematicTask (Task &task) |
Method used in the automated interface to compute collinear-distributions for a list of kinematics. More... | |
void | generatePlotFileTask (Task &task) |
Method used in the automated interface to generate a data file ready for plotting. More... | |
List< CollinearDistributionType > | getFinalCollinearDistributionTypeList (CollinearDistributionModule *pCollinearDistributionModule, const List< CollinearDistributionType > &colldistTypeList) const |
Method used to derive an intersection of available collinear-distribution types from the various underlying modules. More... | |
Additional Inherited Members | |
Protected Attributes inherited from PARTONS::ServiceObjectTyped< CollinearDistributionKinematic, CollinearDistributionResult > | |
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< CollinearDistributionKinematic > | m_kinematicListBuffer |
Kinematic list. More... | |
List< CollinearDistributionResult > | m_resultListBuffer |
Result list. More... | |
ResultInfo | m_resultInfo |
Result info. More... | |
Protected Attributes inherited from PARTONS::ServiceObject | |
ModuleObjectFactory * | m_pModuleObjectFactory |
Pointer to ModuleObjectFactory. More... | |
AutomationService * | m_pAutomationService |
Pointer to AutomationService. More... | |
Class to handle and compute collinear-distribution modules.
|
virtual |
Default destructor.
|
protected |
Default constructor used by the registry.
List< CollinearDistributionResult > PARTONS::CollinearDistributionService::computeManyKinematic | ( | const List< CollinearDistributionKinematic > & | colldistKinematicList, |
CollinearDistributionModule * | pCollinearDistributionModule, | ||
const List< CollinearDistributionType > & | colldistTypeList = List<CollinearDistributionType>() |
||
) |
Computes a collinear-distribution model for a list of kinematics.
colldistKinematicList | List of CollinearDistributionKinematics. |
pCollinearDistributionModule | CollinearDistributionModule to use for the computation. |
colldistTypeList | List of CollinearDistributionType to compute. Default: all the CollinearDistributionTypes available with the CollinearDistributionModule. |
storeInDB | Boolean to store the results and kinematics on the database. Default: false. |
|
private |
Method used in the automated interface to compute collinear-distributions for a list of kinematics.
task | Automated XML task. |
CollinearDistributionResult PARTONS::CollinearDistributionService::computeSingleKinematic | ( | const CollinearDistributionKinematic & | colldistKinematic, |
CollinearDistributionModule * | pCollinearDistributionModule, | ||
const List< CollinearDistributionType > & | colldistType = List<CollinearDistributionType>() |
||
) | const |
Computes collinear-distribution model at specific kinematics.
colldistKinematic | collinear-distribution kinematic. |
pCollinearDistributionModule | CollinearDistributionModule to use. |
colldistType | List of CollinearDistributionType to compute. Default: all the CollinearDistributionTypes available with the CollinearDistributionModule. |
|
private |
Method used in the automated interface to compute collinear-distribution.
task | Automated XML task. |
|
virtual |
Compute task.
Reimplemented from PARTONS::ServiceObjectTyped< CollinearDistributionKinematic, CollinearDistributionResult >.
|
private |
Method used in the automated interface to generate a data file ready for plotting.
task | Automated XML task. |
|
private |
Method used to derive an intersection of available collinear-distribution types from the various underlying modules.
pCollinearDistributionModule | CollinearDistributionModule used for the computation. |
colldistTypeList | List of desired collinear-distribution types to compute. |
CollinearDistributionModule * PARTONS::CollinearDistributionService::newCollinearDistributionModuleFromTask | ( | const Task & | task | ) | const |
Devises the CollinearDistributionModule from an automation task.
task | Automation task. |
CollinearDistributionKinematic PARTONS::CollinearDistributionService::newKinematicFromTask | ( | const Task & | task | ) | const |
Devises the collinear-distribution kinematics from an automation task.
task | Automation task. |
List< CollinearDistributionKinematic > PARTONS::CollinearDistributionService::newListOfKinematicFromTask | ( | const Task & | task | ) | const |
Devises the collinear-distribution kinematics from an automation task.
task | Automation task. |
|
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::ServiceObjectTyped< CollinearDistributionKinematic, CollinearDistributionResult >.
|
static |
Unique ID to automatically register the class in the registry.
|
static |
Name of the XML task used to compute collinear-distributions for a list of kinematics.
|
static |
Name of the XML task used to compute a collinear-distribution at given kinematics.
|
static |
Name of the XML task used for generating a data file ready for plotting.