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

Last change on this file since 472 was 472, checked in by garnier, 10 years ago

Modification pour remettre en marche le Run. Desormais Transport passe, mais aucun test ne permet de dire si c est bon

File size: 2.5 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  int getBeamLineSize_deprecated();
31  inline globalParameters* getGlobalParameters()  {return &globParam_;}
32   
33  particleBeam* getDiagnosticBeam(unsigned index);
34  particleBeam* getDiagnosticBeam_deprecated(string elementLabel);
35
36/** Add a new sector
37 */
38  sector* addNewSector();
39 
40  /** return all sectors
41   */
42  inline std::vector <sector*> getSectors() {return jobList_;};
43 
44  /**
45     Get the label from the order number in the beam line
46     @return return "" if not found
47  */
48  string getLabelFromElementNumero_deprecated(int numero);
49 
50  /**
51     Get the numero from the label in the beam line
52     @return return -1 if not found
53  */
54  int getNumeroFromElementLabel_deprecated(string);
55 
56  void initializeExecution();
57
58  bool executeAll();
59 
60  void donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor, string& titre, string& legendx, string& legendy);
61
62  /**
63   Save a configuration file on the server
64   @param folder
65   @param filename
66   */
67  void saveConfiguration(string folder, string filename);
68  bool restoreElements(string inputFileName);
69 
70  void writeToAMLFile(string fileName);
71   
72  /** return the jobList size
73   */
74  inline unsigned long getJobListSize() const {
75    return jobList_.size();
76  }
77 
78  // si newBeam = true, on cree un nouveau diag
79  // si newBeam = false, on utilise le dernier
80  inline particleBeam* updateCurrentDiagnostic(bool newBeam) {
81    if ( newBeam ) {
82      diagnosticBeam_.push_back(particleBeam());
83    }
84    indexElementToIndexDiag_.push_back(diagnosticBeam_.size() -1);
85    return &diagnosticBeam_.back();
86  }
87   
88 
89  /**
90   Return the application attatch to this controler
91   */
92  inline PspaApplication* getPspaApplication() {
93    return pspa_;
94  };
95
96 
97 private:
98
99  globalParameters globParam_;
100  PspaApplication* pspa_;
101 
102  vector<particleBeam> diagnosticBeam_;
103  vector<unsigned> indexElementToIndexDiag_;
104  vector <sector*> jobList_;
105  void removeFile(string nameOfFile);
106};
107#endif
Note: See TracBrowser for help on using the repository browser.