source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h @ 488

Last change on this file since 488 was 488, checked in by lemeur, 10 years ago

lecture fichier sauvegarde AML

File size: 2.2 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#include "sector.h"
16
17#include "sectorParameters.h" //xx
18
19class PspaApplication;
20
21class dataManager
22{
23
24 public:
25 
26  dataManager() {;}
27  dataManager(PspaApplication*);
28  virtual ~dataManager();
29  void consoleMessage(string message);
30  inline globalParameters* getGlobalParameters()  {return &globParam_;}
31   
32  particleBeam* getDiagnosticBeam(unsigned index);
33  particleBeam* getDiagnosticBeam_deprecated(string elementLabel);
34
35/** Add a new sector
36 */
37  sector* addNewSector();
38 
39  /** return all sectors
40   */
41  inline std::vector <sector*> getSectors() {return jobList_;};
42 
43 
44 
45  void initializeExecution();
46
47  bool executeAll();
48 
49  void donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor, string& titre, string& legendx, string& legendy);
50
51  /**
52   Save a configuration file on the server
53   @param folder
54   @param filename
55   */
56  //  void saveConfiguration(string folder, string filename);
57  //  bool restoreElements(string inputFileName);
58  bool restoreAMLElements(string inputFileName);
59
60  void writeToAMLFile(string fileName);
61   
62  /** return the jobList size
63   */
64  inline unsigned long getJobListSize() const {
65    return jobList_.size();
66  }
67 
68  // si newBeam = true, on cree un nouveau diag
69  // si newBeam = false, on utilise le dernier
70  inline particleBeam* updateCurrentDiagnostic(bool newBeam) {
71    if ( newBeam ) {
72      diagnosticBeam_.push_back(particleBeam());
73    }
74    indexElementToIndexDiag_.push_back(diagnosticBeam_.size() -1);
75    return &diagnosticBeam_.back();
76  }
77   
78 
79  /**
80   Return the application attatch to this controler
81   */
82  inline PspaApplication* getPspaApplication() {
83    return pspa_;
84  };
85
86 
87 private:
88
89  globalParameters globParam_;
90  PspaApplication* pspa_;
91 
92  vector<particleBeam> diagnosticBeam_;
93  vector<unsigned> indexElementToIndexDiag_;
94  vector <sector*> jobList_;
95  void removeFile(string nameOfFile);
96};
97#endif
Note: See TracBrowser for help on using the repository browser.