source: PSPA/Interface_Web/trunk/pspaWT/sources/controler/include/abstractSoftware.h @ 431

Last change on this file since 431 was 431, checked in by touze, 11 years ago

systeme periodique (mailles) + multipoles + madx

File size: 1.8 KB
Line 
1#ifndef ABSTRACTSOFTWARE_SEEN
2#define ABSTRACTSOFTWARE_SEEN
3
4#include "globalParameters.h"
5#include "sectorParameters.h"
6#include "particleBeam.h"
7#include "nomDeLogiciel.h"
8#include "nomdElements.h"
9#include "trivaluedBool.h"
10
11#include <iostream>
12#include <string>
13
14using namespace std;
15
16class dataManager;
17
18class abstractSoftware
19{
20
21 protected :
22 
23  unsigned numeroDeb_, numeroFin_;
24  globalParameters* globParamPtr_;
25  sectorParameters* sectParamPtr_; //xx
26  dataManager* dataManager_;
27  string inputFileName_;
28  nomDeLogiciel nameOfSoftware_;
29
30  /**
31     Accepted elements list for this software
32  */
33  std::vector <nomdElements::typedElement> acceptedElements_;
34
35  /**
36     Ignore software list for this element
37  */
38  std::vector <nomdElements::typedElement> ignoredElements_;
39 
40  abstractSoftware();
41
42  bool launchJob(string commandLine, string& resul);
43  bool initComputationLimits(unsigned int numeroDeb,unsigned int numeroFin);
44  bool ComputationLimitsOk() const;
45
46  void registerElement(nomdElements::typedElement nomdel,trivaluedBool b);
47
48 public :
49
50  abstractSoftware(string,globalParameters*,dataManager*);
51  abstractSoftware(string,sectorParameters*,dataManager*);
52  ~abstractSoftware() {;}
53
54  inline const nomDeLogiciel* getNomDeLogiciel() const {
55    return &nameOfSoftware_;
56  }
57
58  trivaluedBool doAcceptElement(nomdElements::typedElement typdel);
59
60  virtual bool createInputFile(particleBeam* beamBefore,unsigned int numeroDeb, unsigned int numeroFin, string workingDir) = 0;
61  virtual bool execute(string workingDir) = 0;
62  virtual bool buildBeamAfterElements(string workingDir) = 0;
63
64  /** Color of the background of this sofware
65      Should be a valid Css name as FFEEDD
66  */
67  virtual string getColor() = 0;
68 
69  /** Name of this software
70   */
71  inline string getName() const {
72    return nameOfSoftware_.getString();
73  }
74};
75#endif
Note: See TracBrowser for help on using the repository browser.