Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef DVMP_OBSERVABLE_SERVICE_H
0002 #define DVMP_OBSERVABLE_SERVICE_H
0003 
0004 /**
0005  * @file DVMPObservableService.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @date November 20, 2014
0008  * @version 1.0
0009  */
0010 
0011 #include <string>
0012 
0013 #include "../beans/List.h"
0014 #include "../beans/observable/DVMP/DVMPObservableKinematic.h"
0015 #include "../beans/observable/DVMP/DVMPObservableResult.h"
0016 #include "../modules/observable/Observable.h"
0017 #include "../modules/process/ProcessModule.h"
0018 #include "ObservableService.h"
0019 
0020 namespace PARTONS {
0021 class DVMPObservable;
0022 class DVMPProcessModule;
0023 } /* namespace PARTONS */
0024 
0025 namespace PARTONS {
0026 
0027 /**
0028  * @class DVMPObservableService
0029  *
0030  * @brief Singleton to handle and compute some pre-configured observable modules.
0031  *
0032  * See the [general tutorial](@ref usage) and this [table](@ref usage_tasks) of examples.
0033  */
0034 class DVMPObservableService: public ObservableService<DVMPObservableKinematic,
0035         DVMPObservableResult> {
0036 
0037 public:
0038 
0039     static const unsigned int classId; ///< Unique ID to automatically register the class in the registry.
0040 
0041     /**
0042      * Destructor.
0043      */
0044     virtual ~DVMPObservableService();
0045 
0046     virtual void resolveObjectDependencies();
0047     virtual DVMPObservableKinematic newKinematicFromTask(
0048             const Task &task) const;
0049     virtual List<DVMPObservableKinematic> newListOfKinematicFromTask(
0050             const Task &task) const;
0051 
0052     /**
0053      * Uses an automation task (XML file) to configure a DVMPProcessModule.
0054      * @param task Automation task.
0055      * @return Pre-configured DVMPProcessModule.
0056      */
0057     DVMPProcessModule* newDVMPProcessModuleFromTask(const Task &task) const;
0058 
0059     /**
0060      * Uses an automation task (XML file) to configure a DVMPObservable.
0061      * @param task Automation task.
0062      * @return Pre-configured DVMPObservable.
0063      */
0064     DVMPObservable* newDVMPObservableModuleFromTask(const Task &task) const;
0065 
0066 protected:
0067 
0068     /**
0069      * Default constructor.
0070      */
0071     DVMPObservableService(const std::string &className);
0072 
0073     virtual ProcessModule<DVMPObservableKinematic, DVMPObservableResult>* newProcessModuleFromTask(
0074             const Task &task) const;
0075     virtual Observable<DVMPObservableKinematic, DVMPObservableResult>* newObservableModuleFromTask(
0076             const Task &task) const;
0077 };
0078 
0079 } /* namespace PARTONS */
0080 
0081 #endif /* DVMP_OBSERVABLE_SERVICE_H */