View | Details | Raw Unified | Return to problem 1744
Collapse All | Expand All

(-)source/event/include/G4GeneralParticleSource.hh (-4 / +4 lines)
Lines 189-201 class G4GeneralParticleSource : public G4VPrimaryGenerator Link Here
189
        G4int GetNumberofSource() { return GPSData->GetSourceVectorSize(); };
189
        G4int GetNumberofSource() { return GPSData->GetSourceVectorSize(); };
190
        void ListSource();
190
        void ListSource();
191
        void SetCurrentSourceto(G4int) ;
191
        void SetCurrentSourceto(G4int) ;
192
        void SetCurrentSourceIntensity(G4double);
192
        void SetCurrentSourceIntensity();
193
        G4SingleParticleSource* GetCurrentSource() {return currentSource;};
193
        G4SingleParticleSource* GetCurrentSource() {return currentSource;};
194
        G4int GetCurrentSourceIndex() { return currentSourceIdx; };
194
        G4int GetCurrentSourceIndex() { return currentSourceIdx; };
195
        G4double GetCurrentSourceIntensity() { return GPSData->GetIntensity(currentSourceIdx); };
195
        G4double GetCurrentSourceIntensity() { return GPSData->GetIntensity(currentSourceIdx); };
196
        void ClearAll();
196
        void ClearAll();
197
        void AddaSource (G4double);
197
        void AddaSource ();
198
        void DeleteaSource(G4int);
198
        void DeleteaSource();
199
199
200
        // Set the verbosity level.
200
        // Set the verbosity level.
201
        void SetVerbosity(G4int i) {currentSource->SetVerbosity(i);} ;
201
        void SetVerbosity(G4int i) {currentSource->SetVerbosity(i);} ;
Lines 205-211 class G4GeneralParticleSource : public G4VPrimaryGenerator Link Here
205
205
206
        // set if flat_sampling is applied in multiple source case
206
        // set if flat_sampling is applied in multiple source case
207
207
208
        void SetFlatSampling(G4bool av) {flat_sampling = av; GPSData->SetFlatSampling(av); normalised = false;} ;
208
        void SetFlatSampling(G4bool av) {flat_sampling = av; normalised = false;} ;
209
209
210
        // Set the particle species
210
        // Set the particle species
211
        void SetParticleDefinition (G4ParticleDefinition * aParticleDefinition) 
211
        void SetParticleDefinition (G4ParticleDefinition * aParticleDefinition) 
(-)source/event/include/G4GeneralParticleSourceData.hh (-3 / +11 lines)
Lines 60-65 Link Here
60
#include "G4SingleParticleSource.hh"
60
#include "G4SingleParticleSource.hh"
61
#include "G4Threading.hh"
61
#include "G4Threading.hh"
62
62
63
class G4GeneralParticleSource;
64
63
class G4GeneralParticleSourceData
65
class G4GeneralParticleSourceData
64
{
66
{
65
    public:
67
    public:
Lines 81-89 class G4GeneralParticleSourceData Link Here
81
        G4int GetIntensityVectorSize() const {return G4int(sourceIntensity.size());}
83
        G4int GetIntensityVectorSize() const {return G4int(sourceIntensity.size());}
82
        G4double GetIntensity(G4int idx)const {return sourceIntensity.at(idx);}
84
        G4double GetIntensity(G4int idx)const {return sourceIntensity.at(idx);}
83
        G4double GetSourceProbability(G4int idx) const {return sourceProbability.at(idx);}
85
        G4double GetSourceProbability(G4int idx) const {return sourceProbability.at(idx);}
84
    
86
87
        void ListSource();
88
        G4int GetCurrentSourceIndex();
89
        G4double GetCurrentSourceIntensity();
85
        void SetCurrentSourceIntensity(G4double);
90
        void SetCurrentSourceIntensity(G4double);
86
        void SetFlatSampling(G4bool fSamp){flat_sampling = fSamp;}
91
        void SetFlatSampling(G4bool fSamp);
92
        void SetCurrentSourceto(G4int aV);
93
        void SetMultipleVertex(G4bool aV);
94
        void RegisterGPS(G4GeneralParticleSource *gps);
87
95
88
        //Lock/Unlock shared mutex
96
        //Lock/Unlock shared mutex
89
        void Lock();
97
        void Lock();
Lines 97-103 class G4GeneralParticleSourceData Link Here
97
    private:
105
    private:
98
    
106
    
99
        //static G4GeneralParticleSourceData* theInstance;
107
        //static G4GeneralParticleSourceData* theInstance;
100
    
108
        std::vector<G4GeneralParticleSource*> gpsVector;
101
        std::vector<G4SingleParticleSource*> sourceVector;
109
        std::vector<G4SingleParticleSource*> sourceVector;
102
        std::vector <G4double> sourceIntensity;
110
        std::vector <G4double> sourceIntensity;
103
        std::vector <G4double> sourceProbability;
111
        std::vector <G4double> sourceProbability;
(-)source/event/include/G4GeneralParticleSourceMessenger.hh (-3 / +4 lines)
Lines 105-110 class G4UIcmdWithoutParameter; Link Here
105
105
106
class G4SingleParticleSource;
106
class G4SingleParticleSource;
107
class G4GeneralParticleSource;
107
class G4GeneralParticleSource;
108
class G4GeneralParticleSourceData;
108
109
109
/** Andrea Dotti Feb 2015
110
/** Andrea Dotti Feb 2015
110
 * GPS messenger design requires some explanation for what distributions
111
 * GPS messenger design requires some explanation for what distributions
Lines 141-157 class G4GeneralParticleSourceMessenger: public G4UImessenger Link Here
141
142
142
    G4String GetCurrentValue(G4UIcommand *command);
143
    G4String GetCurrentValue(G4UIcommand *command);
143
144
144
    static G4GeneralParticleSourceMessenger* GetInstance(G4GeneralParticleSource*);
145
    static G4GeneralParticleSourceMessenger* GetInstance();
145
    static void Destroy();
146
    static void Destroy();
146
 private:
147
 private:
147
    G4GeneralParticleSourceMessenger(G4GeneralParticleSource*);
148
    G4GeneralParticleSourceMessenger();
148
    ~G4GeneralParticleSourceMessenger();
149
    ~G4GeneralParticleSourceMessenger();
149
150
150
    void IonCommand(G4String newValues);
151
    void IonCommand(G4String newValues);
151
    void IonLvlCommand(G4String newValues);
152
    void IonLvlCommand(G4String newValues);
152
153
153
  private:
154
  private:
154
    G4GeneralParticleSource* fGPS;
155
    G4GeneralParticleSourceData* gpsData;
155
    G4SingleParticleSource* fParticleGun;
156
    G4SingleParticleSource* fParticleGun;
156
    G4ParticleTable* particleTable;
157
    G4ParticleTable* particleTable;
157
    G4String histtype;
158
    G4String histtype;
(-)source/event/src/G4GeneralParticleSource.cc (-31 / +8 lines)
Lines 78-88 G4GeneralParticleSource::G4GeneralParticleSource() : multiple_vertex(false), fla Link Here
78
    theMessenger(0)
78
    theMessenger(0)
79
{
79
{
80
    GPSData = G4GeneralParticleSourceData::Instance();
80
    GPSData = G4GeneralParticleSourceData::Instance();
81
    GPSData->Lock();
82
    GPSData->RegisterGPS(this);
83
    GPSData->Unlock();
81
    currentSource = GPSData->GetCurrentSource();
84
    currentSource = GPSData->GetCurrentSource();
82
    currentSourceIdx = G4int(GPSData->GetSourceVectorSize() - 1);
85
    currentSourceIdx = G4int(GPSData->GetSourceVectorSize() - 1);
83
86
84
    //Messenger is special, only a worker should instantiate it. Singleton pattern
87
    //Messenger is special, only a worker should instantiate it. Singleton pattern
85
    theMessenger = G4GeneralParticleSourceMessenger::GetInstance(this);
88
    theMessenger = G4GeneralParticleSourceMessenger::GetInstance();
86
    //Some initialization should be done only once
89
    //Some initialization should be done only once
87
    G4AutoLock l(&messangerInit);
90
    G4AutoLock l(&messangerInit);
88
    static G4bool onlyOnce = false;
91
    static G4bool onlyOnce = false;
Lines 99-114 G4GeneralParticleSource::~G4GeneralParticleSource() Link Here
99
    theMessenger->Destroy();
102
    theMessenger->Destroy();
100
}
103
}
101
104
102
void G4GeneralParticleSource::AddaSource(G4double aV)
105
void G4GeneralParticleSource::AddaSource()
103
{
106
{
104
    normalised=false;
107
    normalised=false;
105
    GPSData->Lock();
106
    GPSData->AddASource(aV);
107
    currentSource = GPSData->GetCurrentSource();
108
    currentSource = GPSData->GetCurrentSource();
108
    theMessenger->SetParticleGun(currentSource);
109
    theMessenger->SetParticleGun(currentSource);
109
    currentSourceIdx = G4int(GPSData->GetSourceVectorSize() - 1);
110
    currentSourceIdx = G4int(GPSData->GetSourceVectorSize() - 1);
110
    IntensityNormalization();
111
    IntensityNormalization();
111
    GPSData->Unlock();
112
}
112
}
113
113
114
void G4GeneralParticleSource::IntensityNormalization()
114
void G4GeneralParticleSource::IntensityNormalization()
Lines 117-131 void G4GeneralParticleSource::IntensityNormalization() Link Here
117
    normalised=true;
117
    normalised=true;
118
}
118
}
119
119
120
void G4GeneralParticleSource::ListSource()
121
{
122
    G4cout << "The number of particle sources is: " << GPSData->GetIntensityVectorSize() << G4endl;
123
    for(G4int i=0; i<GPSData->GetIntensityVectorSize(); i++)
124
    {
125
        G4cout << "\tsource " << i << " intensity is: " << GPSData->GetIntensity(i) << G4endl;;
126
    }
127
}
128
129
void G4GeneralParticleSource::SetCurrentSourceto(G4int aV)
120
void G4GeneralParticleSource::SetCurrentSourceto(G4int aV)
130
{
121
{
131
    G4int id = aV;
122
    G4int id = aV;
Lines 142-152 void G4GeneralParticleSource::SetCurrentSourceto(G4int aV) Link Here
142
    }
133
    }
143
}
134
}
144
135
145
void G4GeneralParticleSource::SetCurrentSourceIntensity(G4double aV)
136
void G4GeneralParticleSource::SetCurrentSourceIntensity()
146
{
137
{
147
    GPSData->Lock();
148
    GPSData->SetCurrentSourceIntensity(aV);
149
    GPSData->Unlock();
150
    normalised = false;
138
    normalised = false;
151
}
139
}
152
140
Lines 154-176 void G4GeneralParticleSource::ClearAll() Link Here
154
{
142
{
155
    currentSourceIdx = -1;
143
    currentSourceIdx = -1;
156
    currentSource = 0;
144
    currentSource = 0;
157
    GPSData->ClearSources();
158
    normalised=false;
145
    normalised=false;
159
}
146
}
160
147
161
void G4GeneralParticleSource::DeleteaSource(G4int aV)
148
void G4GeneralParticleSource::DeleteaSource()
162
{
149
{
163
    G4int id = aV;
150
    normalised=false;
164
    if ( id <= GPSData->GetIntensityVectorSize() )
165
    {
166
        GPSData->DeleteASource(aV);
167
        normalised=false;
168
    }
169
    else
170
    {
171
        G4cout << " source index is invalid " << G4endl;
172
        G4cout << "    it shall be <= " << GPSData->GetIntensityVectorSize() << G4endl;
173
    }
174
}
151
}
175
152
176
void G4GeneralParticleSource::GeneratePrimaryVertex(G4Event* evt)
153
void G4GeneralParticleSource::GeneratePrimaryVertex(G4Event* evt)
(-)source/event/src/G4GeneralParticleSourceData.cc (-14 / +74 lines)
Lines 51-56 Link Here
51
//
51
//
52
52
53
#include "G4GeneralParticleSourceData.hh"
53
#include "G4GeneralParticleSourceData.hh"
54
#include "G4GeneralParticleSource.hh"
54
#include "G4Threading.hh"
55
#include "G4Threading.hh"
55
#include "G4AutoLock.hh"
56
#include "G4AutoLock.hh"
56
57
Lines 68-73 G4GeneralParticleSourceData::G4GeneralParticleSourceData() : flat_sampling(false Link Here
68
{
69
{
69
    G4MUTEXINIT(mutex);
70
    G4MUTEXINIT(mutex);
70
    
71
    
72
    gpsVector.clear();
71
    sourceVector.clear();
73
    sourceVector.clear();
72
    sourceIntensity.clear();
74
    sourceIntensity.clear();
73
    sourceProbability.clear();
75
    sourceProbability.clear();
Lines 85-90 G4GeneralParticleSourceData::~G4GeneralParticleSourceData() Link Here
85
  for ( std::vector<G4SingleParticleSource*>::const_iterator it = sourceVector.begin() ;
87
  for ( std::vector<G4SingleParticleSource*>::const_iterator it = sourceVector.begin() ;
86
	it != sourceVector.end() ; ++it ) { delete *it; }
88
	it != sourceVector.end() ; ++it ) { delete *it; }
87
  sourceVector.clear();
89
  sourceVector.clear();
90
  gpsVector.clear();
88
}
91
}
89
92
90
93
Lines 100-105 G4GeneralParticleSourceData* G4GeneralParticleSourceData::Instance() Link Here
100
    // return theInstance;
103
    // return theInstance;
101
}
104
}
102
105
106
void G4GeneralParticleSourceData::RegisterGPS(G4GeneralParticleSource *gps)
107
{
108
    gpsVector.push_back(gps);
109
}
110
103
void G4GeneralParticleSourceData::IntensityNormalise()
111
void G4GeneralParticleSourceData::IntensityNormalise()
104
{
112
{
105
    G4double total  = 0.;
113
    G4double total  = 0.;
Lines 137-146 void G4GeneralParticleSourceData::IntensityNormalise() Link Here
137
    normalised = true;
145
    normalised = true;
138
}
146
}
139
147
148
void G4GeneralParticleSourceData::ListSource()
149
{
150
    G4cout << "The number of particle sources is: " << G4int(sourceIntensity.size()) << G4endl;
151
    for(G4int i=0; i<G4int(sourceIntensity.size()); i++)
152
    {
153
        G4cout << "\tsource " << i << " intensity is: " << sourceIntensity.at(i) << G4endl;;
154
    }
155
}
156
140
void G4GeneralParticleSourceData::SetCurrentSourceIntensity(G4double intensity)
157
void G4GeneralParticleSourceData::SetCurrentSourceIntensity(G4double intensity)
141
{
158
{
142
    sourceIntensity.at(currentSourceIdx) = intensity;
159
    sourceIntensity.at(currentSourceIdx) = intensity;
143
    normalised = false;
160
    normalised = false;
161
    for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
162
          it != gpsVector.end(); ++it ) { (*it)->SetCurrentSourceIntensity(); }
144
}
163
}
145
164
146
void G4GeneralParticleSourceData::AddASource(G4double intensity)
165
void G4GeneralParticleSourceData::AddASource(G4double intensity)
Lines 150-177 void G4GeneralParticleSourceData::AddASource(G4double intensity) Link Here
150
    sourceIntensity.push_back(intensity);
169
    sourceIntensity.push_back(intensity);
151
    currentSourceIdx = sourceVector.size() - 1;
170
    currentSourceIdx = sourceVector.size() - 1;
152
    normalised = false;
171
    normalised = false;
172
    for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
173
          it != gpsVector.end(); ++it ) { (*it)->AddaSource(); }
153
}
174
}
154
175
155
void G4GeneralParticleSourceData::DeleteASource(G4int idx)
176
void G4GeneralParticleSourceData::DeleteASource(G4int idx)
156
{
177
{
157
    delete sourceVector[idx];
178
    if ( idx <= G4int(sourceIntensity.size()) )
158
    sourceVector.erase(sourceVector.begin() + idx);
159
    sourceIntensity.erase(sourceIntensity.begin()+idx);
160
    normalised = false ;
161
    if (currentSourceIdx == idx )
162
    {
179
    {
163
        if ( this->GetIntensityVectorSize() > 0 )
180
        delete sourceVector[idx];
164
        {
181
        sourceVector.erase(sourceVector.begin() + idx);
165
            currentSource = this->GetCurrentSource(0);
182
        sourceIntensity.erase(sourceIntensity.begin()+idx);
166
            currentSourceIdx = 0;
183
        normalised = false ;
167
        }
184
        if (currentSourceIdx == idx )
168
        else
169
        {
185
        {
170
            currentSource = NULL;
186
            if ( this->GetIntensityVectorSize() > 0 )
171
            currentSourceIdx = -1;
187
            {
188
                currentSource = this->GetCurrentSource(0);
189
                currentSourceIdx = 0;
190
            }
191
            else
192
            {
193
                currentSource = NULL;
194
                currentSourceIdx = -1;
195
            }
172
        }
196
        }
197
        for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
198
            it != gpsVector.end(); ++it ) { (*it)->DeleteaSource(); }
199
    }
200
    else
201
    {
202
        G4cout << " source index is invalid " << G4endl;
203
        G4cout << "    it shall be <= " << G4int(sourceIntensity.size()) << G4endl;
173
    }
204
    }
174
175
}
205
}
176
206
177
void G4GeneralParticleSourceData::ClearSources()
207
void G4GeneralParticleSourceData::ClearSources()
Lines 180-187 void G4GeneralParticleSourceData::ClearSources() Link Here
180
    currentSource = NULL;
210
    currentSource = NULL;
181
    sourceVector.clear();
211
    sourceVector.clear();
182
    sourceIntensity.clear();
212
    sourceIntensity.clear();
213
    for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
214
          it != gpsVector.end(); ++it ) { (*it)->ClearAll(); }
183
}
215
}
184
216
217
G4int G4GeneralParticleSourceData::GetCurrentSourceIndex()
218
{
219
    return currentSourceIdx;
220
}
221
222
G4double G4GeneralParticleSourceData::GetCurrentSourceIntensity()
223
{
224
    return sourceIntensity[currentSourceIdx];
225
}
185
226
186
G4SingleParticleSource* G4GeneralParticleSourceData::GetCurrentSource(G4int idx)
227
G4SingleParticleSource* G4GeneralParticleSourceData::GetCurrentSource(G4int idx)
187
{
228
{
Lines 190-195 G4SingleParticleSource* G4GeneralParticleSourceData::GetCurrentSource(G4int idx) Link Here
190
    return sourceVector[idx];
231
    return sourceVector[idx];
191
}
232
}
192
233
234
void G4GeneralParticleSourceData::SetCurrentSourceto(G4int idx)
235
{
236
    for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
237
          it != gpsVector.end(); ++it ) { (*it)->SetCurrentSourceto(idx); }
238
}
239
240
void G4GeneralParticleSourceData::SetMultipleVertex(G4bool aV)
241
{
242
    for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
243
          it != gpsVector.end(); ++it ) { (*it)->SetMultipleVertex(aV); }
244
}
245
246
void G4GeneralParticleSourceData::SetFlatSampling(G4bool fSamp)
247
{
248
    flat_sampling = fSamp;
249
    for ( std::vector<G4GeneralParticleSource*>::iterator it = gpsVector.begin();
250
          it != gpsVector.end(); ++it ) { (*it)->SetFlatSampling(fSamp); }
251
}
252
193
void G4GeneralParticleSourceData::Lock()
253
void G4GeneralParticleSourceData::Lock()
194
{
254
{
195
    G4MUTEXLOCK(&mutex);
255
    G4MUTEXLOCK(&mutex);
(-)source/event/src/G4GeneralParticleSourceMessenger.cc (-17 / +17 lines)
Lines 74-80 Link Here
74
74
75
#include "G4Tokenizer.hh"
75
#include "G4Tokenizer.hh"
76
#include "G4SingleParticleSource.hh"
76
#include "G4SingleParticleSource.hh"
77
#include "G4GeneralParticleSource.hh"
77
#include "G4GeneralParticleSourceData.hh"
78
78
79
#include "G4AutoLock.hh"
79
#include "G4AutoLock.hh"
80
80
Lines 83-92 namespace { Link Here
83
    G4GeneralParticleSourceMessenger* theInstance = 0;
83
    G4GeneralParticleSourceMessenger* theInstance = 0;
84
}
84
}
85
85
86
G4GeneralParticleSourceMessenger* G4GeneralParticleSourceMessenger::GetInstance(G4GeneralParticleSource* ps)
86
G4GeneralParticleSourceMessenger* G4GeneralParticleSourceMessenger::GetInstance()
87
{
87
{
88
    G4AutoLock l(&creationM);
88
    G4AutoLock l(&creationM);
89
    if ( theInstance == 0 ) theInstance = new G4GeneralParticleSourceMessenger(ps);
89
    if ( theInstance == 0 ) theInstance = new G4GeneralParticleSourceMessenger();
90
    return theInstance;
90
    return theInstance;
91
}
91
}
92
92
Lines 100-107 void G4GeneralParticleSourceMessenger::Destroy() { Link Here
100
///////////////////////////////////////////////////////////////////////////////
100
///////////////////////////////////////////////////////////////////////////////
101
//
101
//
102
G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger
102
G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger
103
  (G4GeneralParticleSource *fPtclGun) 
103
  ()
104
    : fGPS(fPtclGun),fParticleGun(0),fShootIon(false),
104
    : fParticleGun(0),fShootIon(false),
105
      fAtomicNumber(0),fAtomicMass(0),fIonCharge(0),fIonExciteEnergy(0.),
105
      fAtomicNumber(0),fAtomicMass(0),fIonCharge(0),fIonExciteEnergy(0.),
106
      fShootIonL(0),fAtomicNumberL(0),fAtomicMassL(0),fIonChargeL(0),fIonEnergyLevel(0)
106
      fShootIonL(0),fAtomicNumberL(0),fAtomicMassL(0),fIonChargeL(0),fIonEnergyLevel(0)
107
      
107
      
Lines 120-126 G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger Link Here
120
  commandsShouldBeInMaster = true;
120
  commandsShouldBeInMaster = true;
121
121
122
  
122
  
123
    
123
  gpsData = G4GeneralParticleSourceData::Instance();
124
  particleTable = G4ParticleTable::GetParticleTable();
124
  particleTable = G4ParticleTable::GetParticleTable();
125
  histtype = "biasx";
125
  histtype = "biasx";
126
126
Lines 1406-1445 void G4GeneralParticleSourceMessenger::SetNewValue(G4UIcommand *command, G4Strin Link Here
1406
  }
1406
  }
1407
  else if( command==addsourceCmd )
1407
  else if( command==addsourceCmd )
1408
    {
1408
    {
1409
      fGPS->AddaSource(addsourceCmd->GetNewDoubleValue(newValues));
1409
      gpsData->AddASource(addsourceCmd->GetNewDoubleValue(newValues));
1410
    }
1410
    }
1411
  else if( command==listsourceCmd )
1411
  else if( command==listsourceCmd )
1412
    { 
1412
    { 
1413
      fGPS->ListSource();
1413
      gpsData->ListSource();
1414
    }
1414
    }
1415
  else if( command==clearsourceCmd )
1415
  else if( command==clearsourceCmd )
1416
    { 
1416
    {
1417
      fGPS->ClearAll();
1417
      gpsData->ClearSources();
1418
    }
1418
    }
1419
  else if( command==getsourceCmd )
1419
  else if( command==getsourceCmd )
1420
    { 
1420
    { 
1421
      G4cout << " Current source index:" << fGPS->GetCurrentSourceIndex() 
1421
      G4cout << " Current source index:" << gpsData->GetCurrentSourceIndex()
1422
	     << " ; Intensity:" << fGPS->GetCurrentSourceIntensity() << G4endl;
1422
	     << " ; Intensity:" << gpsData->GetCurrentSourceIntensity() << G4endl;
1423
    }
1423
    }
1424
  else if( command==setsourceCmd )
1424
  else if( command==setsourceCmd )
1425
    { 
1425
    { 
1426
      fGPS->SetCurrentSourceto(setsourceCmd->GetNewIntValue(newValues));
1426
      gpsData->SetCurrentSourceto(setsourceCmd->GetNewIntValue(newValues));
1427
    }
1427
    }
1428
  else if( command==setintensityCmd )
1428
  else if( command==setintensityCmd )
1429
    { 
1429
    { 
1430
      fGPS->SetCurrentSourceIntensity(setintensityCmd->GetNewDoubleValue(newValues));
1430
      gpsData->SetCurrentSourceIntensity(setintensityCmd->GetNewDoubleValue(newValues));
1431
    }
1431
    }
1432
  else if( command==deletesourceCmd )
1432
  else if( command==deletesourceCmd )
1433
    { 
1433
    { 
1434
      fGPS->DeleteaSource(deletesourceCmd->GetNewIntValue(newValues));
1434
      gpsData->DeleteASource(deletesourceCmd->GetNewIntValue(newValues));
1435
    }
1435
    }
1436
  else if(command == multiplevertexCmd)
1436
  else if(command == multiplevertexCmd)
1437
    {
1437
    {
1438
      fGPS->SetMultipleVertex(multiplevertexCmd->GetNewBoolValue(newValues));
1438
      gpsData->SetMultipleVertex(multiplevertexCmd->GetNewBoolValue(newValues));
1439
    }
1439
    }
1440
  else if(command == flatsamplingCmd)
1440
  else if(command == flatsamplingCmd)
1441
    {
1441
    {
1442
      fGPS->SetFlatSampling(flatsamplingCmd->GetNewBoolValue(newValues));
1442
      gpsData->SetFlatSampling(flatsamplingCmd->GetNewBoolValue(newValues));
1443
    }
1443
    }
1444
  //
1444
  //
1445
  // new implementations
1445
  // new implementations

Return to problem 1744