]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TFluka/endraw.cxx
Protection against icode==11 [to be clarified]. (E. Futo)
[u/mrichter/AliRoot.git] / TFluka / endraw.cxx
1 #include <Riostream.h>
2 #include "TVirtualMCApplication.h"
3
4 #ifndef WITH_ROOT
5 #include "TFluka.h"
6 #else
7 #include "TFlukaGeo.h"
8 #endif
9
10 #include "Fdimpar.h"  //(DIMPAR) fluka include
11 #include "Ftrackr.h"  //(TRACKR) fluka common
12 #ifndef WIN32
13 # define endraw endraw_
14 #else
15 # define endraw ENDRAW
16 #endif
17 extern "C" {
18 void endraw(Int_t& icode, Int_t& mreg, Double_t& rull, Double_t& xsco, Double_t& ysco, Double_t& zsco)
19 {
20   TFluka* fluka = (TFluka*) gMC;
21   fluka->SetCaller(3);
22   fluka->SetIcode(icode);
23   fluka->SetRull(rull);
24   fluka->SetXsco(xsco);
25   fluka->SetYsco(ysco);
26   fluka->SetZsco(zsco);
27   fluka->SetMreg(mreg);
28   if (icode == 11) {
29     cout << " For icode=" << icode << " Stepping is NOT called" << endl;
30     return;
31   }
32   (TVirtualMCApplication::Instance())->Stepping();
33 } // end of endraw
34 } // end of extern "C"
35