Skip to content

change tutor7pp to score by history #817

Answered by Jaap1957
Jaap1957 asked this question in Questions
Discussion options

You must be logged in to vote

Indeed, it works like this:

1 add at the class:
class APP_EXPORT Tutor7_Application : public EGS_AdvancedApplication {
ofstream RH_stream;

2 add RH_stream(0) in the definition of the application:

Tutor7_Application(int argc, char **argv) : EGS_AdvancedApplication(argc,argv), score(0), eflu(0), gflu(0), pheight(0), iregMaxHist(0), nreg(0), nph(0), Etot(0), rr_flag(0), current_weight(1), deflect_brems(false), RH_stream(0)

3 in

int Tutor7_Application::initScoring() {

add

string ofile = constructIOFileName(".egsRHXYZE.xls",true);
RH_stream = ofstream(ofile.c_str(), ios::out);

Now you can use

`RH_stream <<

in the same way as

cout <<

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@rtownson
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Jaap1957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants