]>
Commit | Line | Data |
---|---|---|
1 | #include <Riostream.h> | |
2 | #include "TVirtualMCApplication.h" | |
3 | #include "TVirtualMCStack.h" | |
4 | #include "TFluka.h" | |
5 | // Fluka include | |
6 | #include "Fdimpar.h" //(DIMPAR) fluka include | |
7 | #include "Fdblprc.h" //(DBLPRC) fluka common | |
8 | #include "Ftrackr.h" //(TRACKR) fluka common | |
9 | ||
10 | #ifndef WIN32 | |
11 | # define mgdraw mgdraw_ | |
12 | #else | |
13 | # define mgdraw MGDRAW | |
14 | #endif | |
15 | ||
16 | extern "C" { | |
17 | void mgdraw(Int_t& icode, Int_t& mreg) | |
18 | { | |
19 | TFluka* fluka = (TFluka*) gMC; | |
20 | Int_t verbosityLevel = fluka->GetVerbosityLevel(); | |
21 | // | |
22 | // Make sure that stack has currrent track Id | |
23 | Int_t trackId = TRACKR.ispusr[mkbmx2-1]; | |
24 | TVirtualMCStack* cppstack = fluka->GetStack(); | |
25 | cppstack->SetCurrentTrack(trackId); | |
26 | // | |
27 | // | |
28 | fluka->SetMreg(mreg); | |
29 | fluka->SetNewreg(mreg); | |
30 | fluka->SetIcode(icode); | |
31 | fluka->SetCaller(4); | |
32 | ||
33 | if (verbosityLevel >= 3) { | |
34 | cout << endl << " !!! I am in mgdraw - calling Stepping()" << endl; | |
35 | cout << endl << " Track Id =" << trackId << endl; | |
36 | } | |
37 | ||
38 | (TVirtualMCApplication::Instance())->Stepping(); | |
39 | ||
40 | } // end of mgdraw | |
41 | } // end of extern "C" | |
42 |