PARTONS  
PARtonic Tomography Of Nucleon Software
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PARTONS::ProcessModule< KinematicType, ResultType > Class Template Referenceabstract

Abstract class that provides a skeleton to implement a Process module. More...

Inheritance diagram for PARTONS::ProcessModule< KinematicType, ResultType >:
PARTONS::ModuleObject PARTONS::BaseObject

Public Member Functions

virtual ~ProcessModule ()
 Destructor. More...
 
virtual ProcessModuleclone () const =0
 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...
 
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 run ()
 
virtual void configure (const ElemUtils::Parameters &parameters)
 Provides a generic method to configure all types of modules by passing a Parameters object. More...
 
virtual void prepareSubModules (const std::map< std::string, BaseObjectData > &subModulesData)
 Method used in automation to prepare all the modules used by this current module and configure them recursively. More...
 
virtual List< GPDTypegetListOfAvailableGPDTypeForComputation () const =0
 Must be implemented in child class. More...
 
bool isCCFModuleDependent () const
 Check if this process module depends on a CCF module. More...
 
void setIsCCFModuleDependent (bool isCCFModuleDependent)
 Set if this process module depends on a CCF module. More...
 
- Public Member Functions inherited from PARTONS::ModuleObject
 ModuleObject (const std::string &className, ChannelType::Type channelType)
 Constructor. More...
 
virtual ~ModuleObject ()
 Default destructor. More...
 
unsigned int getReferenceModuleId () const
 Get reference module id. More...
 
void setReferenceModuleId (unsigned int referenceModuleId)
 Set reference module id. More...
 
ChannelType::Type getChannelType () const
 Get channel type. More...
 
- Public Member Functions inherited from PARTONS::BaseObject
 BaseObject (const std::string &className)
 Constructor. More...
 
virtual ~BaseObject ()
 Default destructor. 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)
 

Protected Member Functions

 ProcessModule (const std::string &className, ChannelType::Type channelType)
 Constructor. More...
 
 ProcessModule (const ProcessModule &other)
 Copy constructor. More...
 
virtual void setKinematics (const KinematicType &kinematic)=0
 Set internal kinematics. More...
 
virtual void initModule ()
 Pure virtual function that provides skeleton for module initialization. More...
 
virtual void isModuleWellConfigured ()
 Pure virtual function that provides skeleton to check if the module is well initialized and configured. More...
 
- Protected Member Functions inherited from PARTONS::ModuleObject
 ModuleObject (const ModuleObject &other)
 
- 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...
 

Protected Attributes

bool m_isCCFModuleDependent
 Boolean (true if this Process module depends on a CCF module). More...
 
- Protected Attributes inherited from PARTONS::ModuleObject
ModuleObjectFactorym_pModuleObjectFactory
 Pointer tp module object factory. More...
 

Additional Inherited Members

- Static Public Attributes inherited from PARTONS::ModuleObject
static const std::string CLASS_NAME = "className"
 

Detailed Description

template<typename KinematicType, typename ResultType>
class PARTONS::ProcessModule< KinematicType, ResultType >

Abstract class that provides a skeleton to implement a Process module.

Constructor & Destructor Documentation

◆ ~ProcessModule()

template<typename KinematicType , typename ResultType >
virtual PARTONS::ProcessModule< KinematicType, ResultType >::~ProcessModule ( )
inlinevirtual

Destructor.

◆ ProcessModule() [1/2]

template<typename KinematicType , typename ResultType >
PARTONS::ProcessModule< KinematicType, ResultType >::ProcessModule ( const std::string &  className,
ChannelType::Type  channelType 
)
inlineprotected

Constructor.

See BaseObject::BaseObject and ModuleObject::ModuleObject for more details.

Parameters
classNamename of child class.
channelTypeChannel type.

◆ ProcessModule() [2/2]

template<typename KinematicType , typename ResultType >
PARTONS::ProcessModule< KinematicType, ResultType >::ProcessModule ( const ProcessModule< KinematicType, ResultType > &  other)
inlineprotected

Copy constructor.

Parameters
otherObject to be copied.

Member Function Documentation

◆ clone()

template<typename KinematicType , typename ResultType >
virtual ProcessModule* PARTONS::ProcessModule< KinematicType, ResultType >::clone ( ) const
pure virtual

◆ configure()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::configure ( const ElemUtils::Parameters &  parameters)
inlinevirtual

Provides a generic method to configure all types of modules by passing a Parameters object.

Parameters class represents a list of couples key/value (see Parameters class documentation for more info).

Parameters
parametersElemUtils::Parameters object.

Reimplemented from PARTONS::ModuleObject.

Reimplemented in PARTONS::TCSProcessModule, PARTONS::GAM2ProcessModule, PARTONS::DVMPProcessModule, PARTONS::DVCSProcessModule, and PARTONS::DDVCSProcessModule.

◆ getListOfAvailableGPDTypeForComputation()

template<typename KinematicType , typename ResultType >
virtual List<GPDType> PARTONS::ProcessModule< KinematicType, ResultType >::getListOfAvailableGPDTypeForComputation ( ) const
pure virtual

Must be implemented in child class.

Returns
List of GPD/CCF types the child class can compute.

Implemented in PARTONS::TCSProcessModule, PARTONS::GAM2ProcessModule, PARTONS::DVMPProcessModule, PARTONS::DVCSProcessModule, and PARTONS::DDVCSProcessModule.

◆ initModule()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::initModule ( )
inlineprotectedvirtual

◆ isCCFModuleDependent()

template<typename KinematicType , typename ResultType >
bool PARTONS::ProcessModule< KinematicType, ResultType >::isCCFModuleDependent ( ) const
inline

Check if this process module depends on a CCF module.

◆ isModuleWellConfigured()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::isModuleWellConfigured ( )
inlineprotectedvirtual

◆ prepareSubModules()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::prepareSubModules ( const std::map< std::string, BaseObjectData > &  subModulesData)
inlinevirtual

Method used in automation to prepare all the modules used by this current module and configure them recursively.

The recursion is linked to the imbrication in XML files.
Can be implemented in the child class if it needs modules not needed by the parent class. But there must be first a call to the parent method.

Parameters
subModulesDataData used to retrieve the needed modules and their configuration.

Reimplemented from PARTONS::ModuleObject.

Reimplemented in PARTONS::TCSProcessModule, PARTONS::GAM2ProcessModule, PARTONS::DVMPProcessModule, PARTONS::DVCSProcessModule, and PARTONS::DDVCSProcessModule.

◆ resolveObjectDependencies()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::resolveObjectDependencies ( )
inlinevirtual

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::ModuleObject.

Reimplemented in PARTONS::TCSProcessModule, PARTONS::GAM2ProcessModule, PARTONS::DVMPProcessModule, PARTONS::DVCSProcessModule, and PARTONS::DDVCSProcessModule.

◆ run()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::run ( )
inlinevirtual

◆ setIsCCFModuleDependent()

template<typename KinematicType , typename ResultType >
void PARTONS::ProcessModule< KinematicType, ResultType >::setIsCCFModuleDependent ( bool  isCCFModuleDependent)
inline

Set if this process module depends on a CCF module.

◆ setKinematics()

template<typename KinematicType , typename ResultType >
virtual void PARTONS::ProcessModule< KinematicType, ResultType >::setKinematics ( const KinematicType kinematic)
protectedpure virtual

Set internal kinematics.

Parameters
kinematicKinematics to be set

Implemented in PARTONS::TCSProcessModule, PARTONS::GAM2ProcessModule, PARTONS::DVMPProcessModule, PARTONS::DVCSProcessModule, and PARTONS::DDVCSProcessModule.

◆ toString()

template<typename KinematicType , typename ResultType >
virtual std::string PARTONS::ProcessModule< KinematicType, ResultType >::toString ( ) const
inlinevirtual

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

Returns
a pre-formatted characters string.

Reimplemented from PARTONS::ModuleObject.

Reimplemented in PARTONS::TCSProcessModule, PARTONS::GAM2ProcessModule, PARTONS::DVMPProcessModule, PARTONS::DVCSProcessModule, and PARTONS::DDVCSProcessModule.

Member Data Documentation

◆ m_isCCFModuleDependent

template<typename KinematicType , typename ResultType >
bool PARTONS::ProcessModule< KinematicType, ResultType >::m_isCCFModuleDependent
protected

Boolean (true if this Process module depends on a CCF module).


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