<commit_before>#include <Riostream.h>
#include "TVirtualMCApplication.h"
#include "TVirtualMCStack.h"
#include "TFluka.h"
// Fluka include
#include "Fdimpar.h"  //(DIMPAR) fluka include
#include "Fdblprc.h"  //(DBLPRC) fluka common
#include "Ftrackr.h"  //(TRACKR) fluka common

#ifndef WIN32
# define mgdraw mgdraw_
#else
# define mgdraw MGDRAW
#endif

extern "C" {
void mgdraw(Int_t& icode, Int_t& mreg)
{
    TFluka* fluka =  (TFluka*) gMC;
    Int_t verbosityLevel = fluka->GetVerbosityLevel();
//
//  Make sure that stack has currrent track Id
    Int_t trackId = TRACKR.ispusr[mkbmx2-1];
    TVirtualMCStack* cppstack = fluka->GetStack();
    cppstack->SetCurrentTrack(trackId);
//
//    
    Int_t oldreg = ((TFluka*) gMC)->GetMreg();
    if (oldreg != mreg) {
//
//  Boundary Crossing
//
	fluka->SetNewreg(mreg);
	if (oldreg == -1) fluka->SetMreg(mreg);
	if (verbosityLevel >= 3)
	    printf("Boundary Crossing %d %d \n", oldreg, mreg);
    } else {
	fluka->SetMreg(mreg);
	fluka->SetNewreg(mreg);
	if (verbosityLevel >= 3)
	    printf("Normal step %d %d \n", oldreg, mreg);
    }
    fluka->SetIcode(icode);

    cout << endl << " !!! I am in mgdraw - calling Stepping()" << endl;
    cout << endl << " Track Id =" << trackId << endl;
    
    fluka->FutoTest();

    if (oldreg != mreg) {
//
//  Double step for boundary crossing
//
	fluka->SetTrackIsExiting();
	(TVirtualMCApplication::Instance())->Stepping();
	fluka->SetMreg(mreg);
	fluka->SetTrackIsEntering();
	(TVirtualMCApplication::Instance())->Stepping();
	fluka->SetTrackIsInside();
    } else {
	(TVirtualMCApplication::Instance())->Stepping();
    }
} // end of mgdraw
} // end of extern "C"

<commit_msg>Introduce verbosity level.<commit_after>#include <Riostream.h>
#include "TVirtualMCApplication.h"
#include "TVirtualMCStack.h"
#include "TFluka.h"
// Fluka include
#include "Fdimpar.h"  //(DIMPAR) fluka include
#include "Fdblprc.h"  //(DBLPRC) fluka common
#include "Ftrackr.h"  //(TRACKR) fluka common

#ifndef WIN32
# define mgdraw mgdraw_
#else
# define mgdraw MGDRAW
#endif

extern "C" {
void mgdraw(Int_t& icode, Int_t& mreg)
{
    TFluka* fluka =  (TFluka*) gMC;
    Int_t verbosityLevel = fluka->GetVerbosityLevel();
//
//  Make sure that stack has currrent track Id
    Int_t trackId = TRACKR.ispusr[mkbmx2-1];
    TVirtualMCStack* cppstack = fluka->GetStack();
    cppstack->SetCurrentTrack(trackId);
//
//    
    Int_t oldreg = ((TFluka*) gMC)->GetMreg();
    if (oldreg != mreg) {
//
//  Boundary Crossing
//
	fluka->SetNewreg(mreg);
	if (oldreg == -1) fluka->SetMreg(mreg);
	if (verbosityLevel >= 3)
	    printf("Boundary Crossing %d %d \n", oldreg, mreg);
    } else {
	fluka->SetMreg(mreg);
	fluka->SetNewreg(mreg);
	if (verbosityLevel >= 3)
	    printf("Normal step %d %d \n", oldreg, mreg);
    }
    fluka->SetIcode(icode);
    if (verbosityLevel >= 3) {
	cout << endl << " !!! I am in mgdraw - calling Stepping()" << endl;
	cout << endl << " Track Id =" << trackId << endl;
    }
    
    fluka->FutoTest();

    if (oldreg != mreg) {
//
//  Double step for boundary crossing
//
	fluka->SetTrackIsExiting();
	(TVirtualMCApplication::Instance())->Stepping();
	fluka->SetMreg(mreg);
	fluka->SetTrackIsEntering();
	(TVirtualMCApplication::Instance())->Stepping();
	fluka->SetTrackIsInside();
    } else {
	(TVirtualMCApplication::Instance())->Stepping();
    }
} // end of mgdraw
} // end of extern "C"


{'fraction_non_alphanumeric': 0.17103326464527524, 'fraction_numerical': 0.004415660877244628, 'mean_word_length': 3.6484268125854995, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 44, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6297002', 'n_tokens_mistral': 1338, 'n_tokens_neox': 1302, 'n_words': 287}