1 | #ifndef DATAMANAGER_SEEN |
---|
2 | #define DATAMANAGER_SEEN |
---|
3 | |
---|
4 | |
---|
5 | //#include<vector> |
---|
6 | |
---|
7 | |
---|
8 | #include "abstractElement.h" |
---|
9 | #include "elementsCollection.h" |
---|
10 | #include "globalParameters.h" |
---|
11 | #include "nomdElements.h" |
---|
12 | #include "particleBeam.h" |
---|
13 | #include "sectionToExecute.h" |
---|
14 | #include "nomDeLogiciel.h" |
---|
15 | |
---|
16 | |
---|
17 | //using namespace std; |
---|
18 | |
---|
19 | class dataManager |
---|
20 | { |
---|
21 | |
---|
22 | |
---|
23 | elementsCollection elementsGallery_; |
---|
24 | globalParameters globParam_; |
---|
25 | particleBeam currentBeam_; |
---|
26 | |
---|
27 | // vector<sectionToExecute*> jobList_; |
---|
28 | |
---|
29 | void createInputFileParmela( unsigned int indexDeb, unsigned int indexFin); |
---|
30 | void createInputFileTransport( unsigned int indexDeb, unsigned int indexFin); |
---|
31 | |
---|
32 | |
---|
33 | public: |
---|
34 | |
---|
35 | |
---|
36 | dataManager() {;} |
---|
37 | ~dataManager() |
---|
38 | { |
---|
39 | /* unsigned k; */ |
---|
40 | /* for (k=0; k < jobList_.size();k++) */ |
---|
41 | /* { */ |
---|
42 | /* if ( jobList_[k] != NULL ) delete jobList_[k]; */ |
---|
43 | /* } */ |
---|
44 | } |
---|
45 | |
---|
46 | inline int beamLineSize() {return elementsGallery_.size();} |
---|
47 | inline globalParameters* getGlobalParameters() {return &globParam_;} |
---|
48 | inline elementsCollection* getCollection() {return &elementsGallery_;} |
---|
49 | inline particleBeam& getCurrentBeam() {return currentBeam_;} |
---|
50 | |
---|
51 | // void addSectionToExecute(int debut, int fin, nomDeLogiciel prog); |
---|
52 | // void clearSectionToExecute(); |
---|
53 | |
---|
54 | abstractElement* addElement(nomdElement elemType); |
---|
55 | /* abstractElement* addCell(); */ |
---|
56 | /* abstractElement* addDrift(); */ |
---|
57 | /* abstractElement* addInitialBeam(); */ |
---|
58 | /* abstractElement* addSoleno(); */ |
---|
59 | /* abstractElement* addBend(); */ |
---|
60 | void initializeExecution(); |
---|
61 | string executeTransport( unsigned int indexDeb, unsigned int indexFin); |
---|
62 | string executeParmela( unsigned int indexDeb, unsigned int indexFin); |
---|
63 | // string executeAll(); |
---|
64 | void saveAll(); |
---|
65 | void restoreAll(); |
---|
66 | }; |
---|
67 | |
---|
68 | #endif |
---|