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 | |
---|
16 | class PspaApplication; |
---|
17 | |
---|
18 | class dataManager |
---|
19 | { |
---|
20 | abstractSoftware* createSoftwareConnexion(nomDeLogiciel logi); |
---|
21 | |
---|
22 | public: |
---|
23 | |
---|
24 | dataManager(PspaApplication*); |
---|
25 | virtual ~dataManager(); |
---|
26 | void consoleMessage(string message); |
---|
27 | int getBeamLineSize(); |
---|
28 | inline globalParameters* getGlobalParameters() {return &globParam_;} |
---|
29 | inline particleBeam* getCurrentBeam() {return currentBeam_;} |
---|
30 | |
---|
31 | particleBeam* getDiagnosticBeam(unsigned index); |
---|
32 | |
---|
33 | void addSectionToExecute(int debut, int fin, nomDeLogiciel prog); |
---|
34 | |
---|
35 | abstractElement* addElement(typedElement elemType); |
---|
36 | void removeElement(string); |
---|
37 | |
---|
38 | /** |
---|
39 | Get the label from the order number in the beam line |
---|
40 | @return return "" if not found |
---|
41 | */ |
---|
42 | string getLabelFromElementNumero(int numero); |
---|
43 | |
---|
44 | /** |
---|
45 | Get the numero from the label in the beam line |
---|
46 | @return return -1 if not found |
---|
47 | */ |
---|
48 | int getNumeroFromElementLabel(string); |
---|
49 | abstractElement* getElementPointerFromNumero(int); |
---|
50 | |
---|
51 | void initializeExecution(); |
---|
52 | // trivaluedBool checkExecute(string& diagnostic); |
---|
53 | // trivaluedBool checkElementsForExec(nomDeLogiciel logiciel, unsigned indexDeb, unsigned indexFin, string& diagnostic); |
---|
54 | bool executeAll(); |
---|
55 | |
---|
56 | void donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor); |
---|
57 | |
---|
58 | /** |
---|
59 | Save a configuration file on the server |
---|
60 | @param folder |
---|
61 | @param filename |
---|
62 | */ |
---|
63 | void saveConfiguration(string folder, string filename); |
---|
64 | |
---|
65 | bool restoreElements(string inputFileName); |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | private : |
---|
70 | |
---|
71 | |
---|
72 | // void donneesRmsEnveloppe( string type, unsigned int numeroDeb, unsigned int numeroFin, vector<double>& xcor, vector<double>& ycor); |
---|
73 | /* inline void setWorkingDir(string wd) { */ |
---|
74 | /* workingDir_ = wd; */ |
---|
75 | /* } */ |
---|
76 | |
---|
77 | private: |
---|
78 | globalParameters globParam_; |
---|
79 | particleBeam* currentBeam_; |
---|
80 | PspaApplication* pspa_; |
---|
81 | |
---|
82 | vector<particleBeam> diagnosticBeam_; |
---|
83 | |
---|
84 | vector<sectionToExecute*> jobList_; |
---|
85 | |
---|
86 | void removeFile(string nameOfFile); |
---|
87 | void clearSectionToExecute(); |
---|
88 | |
---|
89 | }; |
---|
90 | #endif |
---|