void SDLShell::ProcessCommandLine(int argc, char *argv[]) { if (argc == 0) return; // Command line processing int i, value; for (i = 1; i < argc; i++) { char *pos = strchr(argv[i], '='); if (pos != NULL) { *pos = '\0'; aCmdLineParams.push_back(CmdLineParameter(argv[i], pos + 1)); } else { aCmdLineParams.push_back(CmdLineParameter(argv[i], (char *)"")); } } for (i = 0; i < (int)aCmdLineParams.size(); i++) { if (Verbose(VerboseAll)) { printf("CmdLineParam(%d) = [%s,%s]\n", i, aCmdLineParams[i].sName.c_str(), aCmdLineParams[i].sValue.c_str()); } if (aCmdLineParams[i].sName.compare("width") == 0) { if ((value = atoi(aCmdLineParams[i].sValue.c_str())) > 0) ShellSet(SHELL_WIDTH, value); } else if (aCmdLineParams[i].sName.compare("height") == 0) { if ((value = atoi(aCmdLineParams[i].sValue.c_str())) > 0) ShellSet(SHELL_HEIGHT, value); } else if (aCmdLineParams[i].sName.compare("fullscreen") == 0) { if ((value = atoi(aCmdLineParams[i].sValue.c_str())) > 0) ShellSet(SHELL_FULLSCREEN, value); } else if (aCmdLineParams[i].sName.compare("resizable") == 0) { if ((value = atoi(aCmdLineParams[i].sValue.c_str())) > 0) ShellSet(SHELL_RESIZABLE, value); } else if (aCmdLineParams[i].sName.compare("vsync") == 0) { if ((value = atoi(aCmdLineParams[i].sValue.c_str())) > 0) ShellSet(SHELL_VSYNC, value); } else if (aCmdLineParams[i].sName.compare("verbose") == 0) { if ((value = atoi(aCmdLineParams[i].sValue.c_str())) >= 0) SetVerboseLevel((VerboseLevel)value); } } }
PhysicsList::PhysicsList() : G4VModularPhysicsList(), fEmPhysicsList(0), fDecayPhysicsList(0), fStepMaxProcess(0) { G4EmParameters::Instance()->SetVerbose(1); SetDefaultCutValue(1*mm); fStepMaxProcess = new StepMax(); // G4EmLivermorePhysics // G4EmPenelopePhysics // G4EmStandardPhysics_option4 fEmName = G4String("G4EmStandardPhysics_option4"); fEmPhysicsList = new G4EmStandardPhysics_option4(1); SetVerboseLevel(1); }
Physics::Physics( G4String runType, bool fB, bool sB ) : G4VUserPhysicsList() { if( runType == "Recon" ) Run_Type = runType; else Run_Type = "MonteCarlo"; fullBrem = fB; supBrem = sB; // Set the default cut value. defaultCutValue = 1.0 * mm; // Set the verbosity. SetVerboseLevel(0); }
void dt_RunDrawTest(const char* from, Int_t mode = 0, Int_t verboseLevel = 0) { // This launch a test a TTree::Draw. // The mode currently available are: // 0: Do not load the shared library // 1: Load the shared library before opening the file // 2: Load the shared library after opening the file // 3: Simple TChain test with shared library // 4: Simple Friend test with shared library // The verboseLeve currently available: // 0: As silent as possible, only report errors and overall speed results. // 1: Output 0 + label for the start of each phase // 2: Output 1 + more details on the different phase being done // 3: Output 2 + stop at the first and draw a canvas showing the differences SetVerboseLevel(verboseLevel); if (mode == 1) { if (!TClassTable::GetDict("Event")) { gSystem->Load("libEvent"); } gHasLibrary = kTRUE; } TFile *hfile = 0; TTree *tree = 0; if (mode <3) { hfile = new TFile(from); tree = (TTree*)hfile->Get("T"); } if (mode >= 2 && mode <= 4) { if (!TClassTable::GetDict("Event")) { gSystem->Load("libEvent"); } else { cerr << "Since libEvent.so has already been loaded, mode 2 can not be tested!"; cerr << endl; } gHasLibrary = kTRUE; } if (mode == 3) { // Test Chains. TChain * chain = new TChain("T"); chain->Add(from); chain->Add(from); tree = chain; } if (mode == 4) { // Test friends. tree = new TTree("T","Base of friendship"); tree->AddFriend("T",from); } if (gQuietLevel<2) cout << "Generating histograms from TTree::Draw" << endl; TDirectory* where = GenerateDrawHist(tree); if (gQuietLevel<2) cout << "Comparing histograms" << endl; if (Compare(where)>0) { cout << "DrawTest: Comparison failed" << endl; return; } DrawMarks(); cout << "DrawTest: Comparison was successfull" << endl; if (hfile) delete hfile; else delete tree; gROOT->GetList()->Delete(); }