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

Last change on this file since 342 was 342, checked in by touze, 11 years ago

nvx element snapshot

File size: 2.1 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
15class PspaApplication;
16
17class dataManager
18{
19  abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi);
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(int debut, int fin, nomDeLogiciel 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  void saveConfiguration(string nameOfCase);
55  bool restoreElements(string inputFileName);
56  void donneesRmsEnveloppe( string type, unsigned int numeroDeb, unsigned int numeroFin, vector<double>& xcor, vector<double>& ycor);
57  void donneesRmsEnveloppe(string type,unsigned int lineSize,vector<double>& xcor,vector<double>& ycor);
58 
59  inline void setWorkingDir(string wd) {
60    workingDir_ = wd;
61  }
62   
63 private :
64
65  PspaApplication* pspa_;
66  globalParameters globParam_;
67  particleBeam* currentBeam_;
68   
69  vector<particleBeam> diagnosticBeam_; 
70  vector<sectionToExecute*> jobList_;
71 
72  void removeFile(string nameOfFile);
73  void clearSectionToExecute();
74  };
75#endif
Note: See TracBrowser for help on using the repository browser.