Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef TCS_OBSERVABLE_H
0002 #define TCS_OBSERVABLE_H
0003 
0004 /**
0005  * @file TCSObservable.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/TCS/TCSObservableKinematic.h"
0019 #include "../../../beans/observable/TCS/TCSObservableResult.h"
0020 #include "../../../utils/type/PhysicalType.h"
0021 #include "../Observable.h"
0022 
0023 namespace PARTONS {
0024 class TCSProcessModule;
0025 } /* namespace PARTONS */
0026 
0027 namespace PARTONS {
0028 
0029 /**
0030  * @class TCSObservable
0031  *
0032  * @brief Abstract class that provides a skeleton to implement a TCSObservable module.
0033  */
0034 class TCSObservable: public Observable<TCSObservableKinematic,
0035         TCSObservableResult> {
0036 
0037 public:
0038 
0039     static const std::string TCS_OBSERVABLE_MODULE_CLASS_NAME; ///< Type of the module in XML automation.
0040 
0041     /**
0042      * Destructor
0043      */
0044     virtual ~TCSObservable();
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 TCSObservableResult compute(const TCSObservableKinematic& kinematic,
0054             const List<GPDType> & gpdType = List<GPDType>());
0055     virtual List<GPDType> getListOfAvailableGPDTypeForComputation() const;
0056     virtual std::vector<double> test();
0057 
0058     // ##### GETTERS & SETTERS #####
0059 
0060     /**
0061      * Get process module.
0062      */
0063     TCSProcessModule* getProcessModule() const;
0064 
0065     /**
0066      * Set process module.
0067      */
0068     void setProcessModule(TCSProcessModule* pProcessModule);
0069 
0070 protected:
0071 
0072     /**
0073      * Default constructor.
0074      */
0075     TCSObservable(const std::string &className);
0076 
0077     /**
0078      * Copy constructor.
0079      * @param other Object to be copied.
0080      */
0081     TCSObservable(const TCSObservable& other);
0082 
0083     virtual void initModule();
0084     virtual void isModuleWellConfigured();
0085     virtual PhysicalType<double> computeObservable(
0086             const TCSObservableKinematic& kinematic,
0087             const List<GPDType>& gpdType) = 0;
0088 
0089     TCSProcessModule* m_pProcessModule; ///< Pointer to the underlying process module.
0090 };
0091 
0092 } /* namespace PARTONS */
0093 
0094 #endif /* TCS_OBSERVABLE_H */