Message: Re: Temporal Distributions GPS Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Temporal Distributions GPS 

Forum: Particles
Re: Question Temporal Distributions GPS (Michael)
Re: Feedback Re: Temporal Distributions GPS (Kevin Lynch)
Date: 12 Mar, 2009
From: Michael <Michael>

Hi Kevin,

Thanks for your reply. It sounds like you guys got it nailed! I don't think I'm as experienced with C++ as you are though so I'll probably try something a little less destructive! It'd be great if you could attach the files you used to save me a few days of throwing rocks in the dark though! I did think of writing a section of code in the "main" program to loop through commands manually using UI->ApplyCommand(""). Something along the lines of:

// list of commands specific to source and the first gps source array element.

UI->ApplyCommand("setup command1");

UI->ApplyCommand("setup command2");


// apply command strings and conversions parameters

string string1 = "/gps/source/add "

string string2 = "/gps/time "

int size;

int decimal;

int err;

char intensity[6];

char time[6];

// loop to go through a couple of arrays containing distribution data

do (int i = 0, i < 1024, i++)


err1 = _gcvt_s(intensity, size, intensityArray[i], decimal);

err2 = _gcvt_s(time, size, timeArray[i], decimal);




// run the beam...

run/beamOn ...

I've just written that from memory so there'll more than likely be some typos! The timeArray and intensityArray are obviously arrays containing the source distribution, could be read from a file or hard coded. I reckon this would work, haven't tried it yet so I'll let you know how it goes. Would be great to see what you guys did though.

Many thanks and if you have any thoughts on my "fudge" let me know! Mike

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Temporal Distributions GPS   (Kevin Lynch - 16 Mar, 2009)
 Add Message Add Message
to: "Re: Temporal Distributions GPS"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]