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

Last change on this file since 312 was 312, checked in by lemeur, 11 years ago

suppression designation elements par index + fin generator

File size: 2.0 KB
Line 
1#ifndef DATAMANAGER_SEEN
2#define DATAMANAGER_SEEN
3
4#include "abstractElement.h"
5#include "globalParameters.h"
6#include "nomdElements.h"
7#include "particleBeam.h"
8#include "sectionToExecute.h"
9#include "nomDeLogiciel.h"
10#include "trivaluedBool.h"
11#include "beam2Moments.h"
12#include "parmelaParticle.h"
13
14class PspaApplication;
15
16class dataManager
17{
18   
19public:
20   
21    dataManager(PspaApplication*);
22    virtual ~dataManager();
23   
24    int getBeamLineSize();
25    inline globalParameters* getGlobalParameters()  {return &globParam_;}
26    inline particleBeam* getCurrentBeam() {return currentBeam_;}
27   
28    particleBeam* getDiagnosticBeam(unsigned index);
29   
30    void addSectionToExecute(int debut, int fin, nomDeLogiciel prog);
31   
32    abstractElement* addElement(typedElement elemType);
33    void removeElement(string);
34
35    /**
36     Get the label from the order number in the beam line
37     @return return "" if not found
38     */
39    string getLabelFromElementNumero(int numero);
40
41    /**
42     Get the numero from the label in the beam line
43     @return return -1 if not found
44     */
45    int getNumeroFromElementLabel(string);
46    abstractElement* getElementPointerFromNumero(int);
47   
48    void initializeExecution();
49    trivaluedBool checkExecute(string& diagnostic);
50    trivaluedBool checkElementsForExec(nomDeLogiciel logiciel, unsigned indexDeb, unsigned indexFin, string& diagnostic);
51    bool executeAll(string& resul);
52    void saveConfiguration(string nameOfFile);
53    bool restoreElements(string inputFileName);
54    void donneesRmsEnveloppe( string type, unsigned int numeroDeb, unsigned int numeroFin, vector<double>& xcor, vector<double>& ycor);
55    inline void setWorkingDir(string wd) {
56        workingDir_ = wd;
57    }
58   
59private:
60    globalParameters globParam_;
61    particleBeam* currentBeam_;
62   
63    vector<particleBeam> diagnosticBeam_;
64   
65    vector<sectionToExecute*> jobList_;
66   
67    void removeFile(string nameOfFile);
68    void clearSectionToExecute();
69
70    string workingDir_;
71    PspaApplication* pspa_;
72};
73#endif
Note: See TracBrowser for help on using the repository browser.