Changeset 386 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/include
- Timestamp:
- Mar 12, 2013, 1:54:41 PM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT/sources/controler/include
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h
r375 r386 4 4 #include "globalParameters.h" 5 5 #include "particleBeam.h" 6 6 #include "nomDeLogiciel.h" 7 7 #include <iostream> 8 8 #include <string> … … 17 17 protected : 18 18 19 unsigned numeroDeb_, numeroFin_; 19 20 globalParameters* globParamPtr_; 20 21 dataManager* dataManager_; 21 22 string inputFileName_; 22 23 nomDeLogiciel nameOfSoftware_; 23 24 abstractSoftware(); 24 25 25 26 bool launchJob(string commandLine, string& resul); 26 27 bool initComputationLimits(unsigned int numeroDeb,unsigned int numeroFin); 28 bool ComputationLimitsOk() const; 27 29 public : 28 30 … … 30 32 ~abstractSoftware() {;} 31 33 34 inline nomDeLogiciel getNomDeLogiciel() const { 35 return nameOfSoftware_; 36 } 37 32 38 virtual bool createInputFile(particleBeam* beamBefore,unsigned int numeroDeb, unsigned int numeroFin, string workingDir) = 0; 33 39 34 40 35 virtual bool execute( unsigned int numeroDeb,unsigned int numeroFin,string workingDir) = 0;41 virtual bool execute(string workingDir) = 0; 36 42 37 virtual bool buildBeamAfterElements( unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams,string workingDir) = 0;43 virtual bool buildBeamAfterElements(string workingDir) = 0; 38 44 39 45 /** Color of the background of this sofware … … 44 50 /** Name of this software 45 51 */ 46 virtual string getName() = 0; 52 inline string getName() const { 53 return nameOfSoftware_.getString(); 54 } 47 55 48 56 }; -
Interface_Web/trunk/pspaWT/sources/controler/include/beam2Moments.h
r257 r386 36 36 37 37 // void readFromTransportOutput(ifstream& inp); 38 voidreadFromTransportOutput(stringstream& inp);38 bool readFromTransportOutput(stringstream& inp); 39 39 string writeToTransportInput(double P0) const; 40 40 -
Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
r381 r386 29 29 30 30 particleBeam* getDiagnosticBeam(unsigned index); 31 31 particleBeam* getDiagnosticBeam(string elementLabel); 32 32 33 void addSectionToExecute(int debut, int fin, nomDeLogiciel prog); 33 34 … … 64 65 bool restoreElements(string inputFileName); 65 66 66 67 68 // si newBeam = true, on cree un nouveau diag 69 // si newBeam = false, on utilise le dernier 70 inline particleBeam* updateCurrentDiagnostic(bool newBeam) { 71 if ( newBeam ) { 72 diagnosticBeam_.push_back(particleBeam()); 73 } 74 indexElementToIndexDiag_.push_back(diagnosticBeam_.size() -1); 75 return &diagnosticBeam_.back(); 76 } 67 77 68 78 … … 73 83 unsigned firstComputedElemNumero_; 74 84 unsigned lastComputedElemNumero_; 85 75 86 vector<particleBeam> diagnosticBeam_; 76 87 vector<unsigned> indexElementToIndexDiag_; 88 // numeroElementToIndexDiag_[k] contient, pour l'element d'index k, l'indice ind tel que diagnosticBeam_[ind] 89 // soit le faisceau resultat, en l'etat qu'il doit avoir apres l'element k 90 77 91 vector<sectionToExecute*> jobList_; 78 92 -
Interface_Web/trunk/pspaWT/sources/controler/include/softwareGenerator.h
r375 r386 27 27 28 28 29 virtual bool execute( unsigned int numeroDeb,unsigned int numeroFin,string workingDir);29 virtual bool execute(string workingDir); 30 30 31 31 32 virtual bool buildBeamAfterElements( unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams,string workingDir);32 virtual bool buildBeamAfterElements(string workingDir); 33 33 34 34 inline string getColor() { … … 36 36 } 37 37 38 inline string getName() {39 return "generator";40 }38 /* inline string getName() const { */ 39 /* return "generator"; */ 40 /* } */ 41 41 }; 42 42 -
Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h
r381 r386 9 9 protected : 10 10 11 12 11 13 // les elements de parmela sont indexes à partir du premier, il faut 12 14 // donc prevoir un offset pour le raccord a pspa 13 unsigned offsetNumElem_; 14 // vector<unsigned> relativeParmelaElementNumbers_; 15 // unsigned offsetNumElem_; 16 17 vector<int> relativeParmelaElementIndices_; 15 18 16 19 bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles ); 17 20 18 21 bool beamToParmela(string workingDir, particleBeam* partic ); 19 22 void setRelativeParmelaElementIndices(); 20 23 public : 21 24 softwareParmela(); … … 28 31 virtual bool createInputFile(particleBeam* beamBefore, unsigned int numeroDeb, unsigned int numeroFin, string workingDir); 29 32 30 virtual bool execute( unsigned int numeroDeb,unsigned int numeroFin,string workingDir);33 virtual bool execute(string workingDir); 31 34 32 35 33 virtual bool buildBeamAfterElements( unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams,string workingDir);36 virtual bool buildBeamAfterElements(string workingDir); 34 37 35 38 inline string getColor() { … … 37 40 } 38 41 39 inline string getName() {40 return "parmela";41 }42 /* inline string getName() const { */ 43 /* return "parmela"; */ 44 /* } */ 42 45 43 46 }; -
Interface_Web/trunk/pspaWT/sources/controler/include/softwareTest.h
r375 r386 26 26 27 27 28 virtual bool execute( unsigned int numeroDeb,unsigned int numeroFin,string workingDir);28 virtual bool execute(string workingDir); 29 29 30 30 31 virtual bool buildBeamAfterElements( unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams,string workingDir);31 virtual bool buildBeamAfterElements(string workingDir); 32 32 33 33 inline string getColor() { … … 35 35 } 36 36 37 inline string getName() {38 return "test";39 }37 /* inline string getName() const { */ 38 /* return "test"; */ 39 /* } */ 40 40 41 41 }; -
Interface_Web/trunk/pspaWT/sources/controler/include/softwareTransport.h
r375 r386 18 18 virtual bool createInputFile( particleBeam* beamBefore,unsigned int numeroDeb, unsigned int numeroFin, string workingDir); 19 19 20 virtual bool execute( unsigned int numeroDeb,unsigned int numeroFin,string workingDir);20 virtual bool execute(string workingDir); 21 21 22 22 23 virtual bool buildBeamAfterElements( unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams,string workingDir);23 virtual bool buildBeamAfterElements(string workingDir); 24 24 25 25 inline string getColor() { … … 27 27 } 28 28 29 inline string getName() {30 return "transport";31 }29 /* inline string getName() const { */ 30 /* return "transport"; */ 31 /* } */ 32 32 33 33 };
Note: See TracChangeset
for help on using the changeset viewer.