#include #include #include "TString.h" using namespace std; // ------------------------------------------------------------------------ Bool_t ChooseYes(const char *question) { // function returns TRUE if the input string is = Y, y, yes, Yes, YES or return // returns FALSE in any other case cout << question << "[Y/n]:"; TString opt; cin >> opt; opt.ToLower(); return (opt=="y"||opt=="yes"); } // ---------------------------------------------------------------------------- void TestRead() { Double_t sigma; while(!ChooseYes("Is it right? ")) { cout << "Input sigma:"; cin >> sigma; cout << endl; } } // ------------------------------------------------------------------------------