Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:51:47

0001 #ifndef DVCS_OBSERVABLE_H
0002 #define DVCS_OBSERVABLE_H
0003 
0004 /**
0005  * @file DVCSObservable.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date November 25, 2014
0008  * @version 1.0
0009  */
0010 
0011 #include <ElementaryUtils/parameters/Parameters.h>
0012 #include <map>
0013 #include <string>
0014 
0015 #include "../../../beans/automation/BaseObjectData.h"
0016 #include "../../../beans/gpd/GPDType.h"
0017 #include "../../../beans/List.h"
0018 #include "../../../beans/observable/DVCS/DVCSObservableKinematic.h"
0019 #include "../../../beans/observable/DVCS/DVCSObservableResult.h"
0020 #include "../../../utils/type/PhysicalType.h"
0021 #include "../Observable.h"
0022 
0023 namespace PARTONS {
0024 class DVCSProcessModule;
0025 } /* namespace PARTONS */
0026 
0027 namespace PARTONS {
0028 
0029 /**
0030  * @class DVCSObservable
0031  *
0032  * @brief Abstract class that provides a skeleton to implement a DVCSObservable module.
0033  */
0034 class DVCSObservable: public Observable<DVCSObservableKinematic,
0035         DVCSObservableResult> {
0036 
0037 public:
0038 
0039     static const std::string DVCS_OBSERVABLE_MODULE_CLASS_NAME; ///< Type of the module in XML automation.
0040 
0041     /**
0042      * Destructor
0043      */
0044     virtual ~DVCSObservable();
0045 
0046     virtual Observable* clone() const = 0;
0047     virtual std::string toString() const;
0048     virtual void resolveObjectDependencies();
0049     virtual void run();
0050     virtual void configure(const ElemUtils::Parameters &parameters);
0051     virtual void prepareSubModules(
0052             const std::map<std::string, BaseObjectData>& subModulesData);
0053     virtual DVCSObservableResult compute(
0054             const DVCSObservableKinematic& kinematic,
0055             const List<GPDType> & gpdType = List<GPDType>());
0056     virtual List<GPDType> getListOfAvailableGPDTypeForComputation() const;
0057     virtual std::vector<double> test();
0058 
0059     // ##### GETTERS & SETTERS #####
0060 
0061     /**
0062      * Get process module.
0063      */
0064     DVCSProcessModule* getProcessModule() const;
0065 
0066     /**
0067      * Set process module.
0068      */
0069     void setProcessModule(DVCSProcessModule* pProcessModule);
0070 
0071 protected:
0072 
0073     /**
0074      * Default constructor.
0075      */
0076     DVCSObservable(const std::string &className);
0077 
0078     /**
0079      * Copy constructor.
0080      * @param other Object to be copied.
0081      */
0082     DVCSObservable(const DVCSObservable& other);
0083 
0084     virtual void initModule();
0085     virtual void isModuleWellConfigured();
0086     virtual PhysicalType<double> computeObservable(
0087             const DVCSObservableKinematic& kinematic,
0088             const List<GPDType>& gpdType) = 0;
0089 
0090     DVCSProcessModule* m_pProcessModule; ///< Pointer to the underlying process module.
0091 };
0092 
0093 } /* namespace PARTONS */
0094 
0095 #endif /* DVCS_OBSERVABLE_H */