Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef DDVCS_OBSERVABLE_SERVICE_H
0002 #define DDVCS_OBSERVABLE_SERVICE_H
0003 
0004 /**
0005  * @file DDVCSObservableService.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/DDVCS/DDVCSObservableKinematic.h"
0015 #include "../beans/observable/DDVCS/DDVCSObservableResult.h"
0016 #include "../modules/observable/Observable.h"
0017 #include "../modules/process/ProcessModule.h"
0018 #include "ObservableService.h"
0019 
0020 namespace PARTONS {
0021 class DDVCSObservable;
0022 class DDVCSProcessModule;
0023 } /* namespace PARTONS */
0024 
0025 namespace PARTONS {
0026 
0027 /**
0028  * @class DDVCSObservableService
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 DDVCSObservableService: public ObservableService<DDVCSObservableKinematic,
0035         DDVCSObservableResult> {
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 ~DDVCSObservableService();
0045 
0046     virtual void resolveObjectDependencies();
0047     virtual DDVCSObservableKinematic newKinematicFromTask(
0048             const Task &task) const;
0049     virtual List<DDVCSObservableKinematic> newListOfKinematicFromTask(
0050             const Task &task) const;
0051 
0052     /**
0053      * Uses an automation task (XML file) to configure a DDVCSProcessModule.
0054      * @param task Automation task.
0055      * @return Pre-configured DDVCSProcessModule.
0056      */
0057     DDVCSProcessModule* newDDVCSProcessModuleFromTask(const Task &task) const;
0058 
0059     /**
0060      * Uses an automation task (XML file) to configure a DDVCSObservable.
0061      * @param task Automation task.
0062      * @return Pre-configured DDVCSObservable.
0063      */
0064     DDVCSObservable* newDDVCSObservableModuleFromTask(const Task &task) const;
0065 
0066 protected:
0067 
0068     /**
0069      * Default constructor.
0070      */
0071     DDVCSObservableService(const std::string &className);
0072 
0073     virtual ProcessModule<DDVCSObservableKinematic, DDVCSObservableResult>* newProcessModuleFromTask(
0074             const Task &task) const;
0075     virtual Observable<DDVCSObservableKinematic, DDVCSObservableResult>* newObservableModuleFromTask(
0076             const Task &task) const;
0077 };
0078 
0079 } /* namespace PARTONS */
0080 
0081 #endif /* DDVCS_OBSERVABLE_SERVICE_H */