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

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

introduction softwareTest

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