source: PSPA/Interface_Web/branches/12_03_12-managerComboBox/pspaWT/sources/controler/include/dataManager.h @ 388

Last change on this file since 388 was 388, checked in by garnier, 11 years ago

Etape 2 : Remplacement de la structure selectedSections par un vecteur de GWt_sectionToExecute

File size: 2.7 KB
Line 
1#ifndef DATAMANAGER_SEEN
2#define DATAMANAGER_SEEN
3
4#include "abstractElement.h"
5#include "abstractSoftware.h"
6#include "globalParameters.h"
7#include "nomdElements.h"
8#include "particleBeam.h"
9#include "sectionToExecute.h"
10#include "nomDeLogiciel.h"
11#include "trivaluedBool.h"
12#include "beam2Moments.h"
13#include "parmelaParticle.h"
14#include "nomDeLogiciel.h"
15
16class PspaApplication;
17
18class dataManager
19{
20
21 public:
22 
23  dataManager(PspaApplication*);
24  virtual ~dataManager();
25  void consoleMessage(string message);
26  int getBeamLineSize();
27  inline globalParameters* getGlobalParameters()  {return &globParam_;}
28  inline particleBeam* getCurrentBeam() {return currentBeam_;}
29   
30  particleBeam* getDiagnosticBeam(unsigned index);
31   
32  void addSectionToExecute(abstractElement* debut,int debutIndex, abstractElement* fin, int finIndex, abstractSoftware* prog);
33
34    abstractElement* addElement(typedElement elemType);
35  void removeElement(string);
36 
37  /**
38     Get the label from the order number in the beam line
39     @return return "" if not found
40  */
41  string getLabelFromElementNumero(int numero);
42 
43  /**
44     Get the numero from the label in the beam line
45     @return return -1 if not found
46  */
47  int getNumeroFromElementLabel(string);
48    abstractElement*  getElementPointerFromNumero(int);
49 
50  void initializeExecution();
51//  trivaluedBool checkExecute(string& diagnostic);
52//  trivaluedBool checkElementsForExec(nomDeLogiciel logiciel, unsigned indexDeb, unsigned indexFin, string& diagnostic);
53  bool executeAll();
54 
55  void donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor, string& titre, string& legendx, string& legendy);
56
57  /**
58   Save a configuration file on the server
59   @param folder
60   @param filename
61   */
62    void saveConfiguration(string folder, string filename);
63   
64    bool restoreElements(string inputFileName);
65   
66    abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi);
67   
68    /** return the jobList size
69     */
70    inline int getJobListSize() {
71        return jobList_.size();
72    }
73
74    /** return a specific jobList index
75     return NULL if the index does not exist
76     */
77    inline sectionToExecute* getJobListAt(int a) {
78        if (a < 0) return NULL;
79        if (a >= getJobListSize()) return NULL;
80        return jobList_[a];
81    }
82   
83    /** Clear a specific jobList */
84    void clearSectionToExecute(int a);
85   
86private:
87    globalParameters globParam_;
88    particleBeam* currentBeam_;
89  PspaApplication* pspa_;
90  unsigned firstComputedElemNumero_;
91  unsigned lastComputedElemNumero_;
92    vector<particleBeam> diagnosticBeam_;
93   
94    vector<sectionToExecute*> jobList_;
95   
96    void removeFile(string nameOfFile);
97    void clearSectionToExecute();
98 
99  };
100#endif
Note: See TracBrowser for help on using the repository browser.