View | Details | Raw Unified | Return to problem 2463 | Differences between
and this patch

Collapse All | Expand All

(-)a/source/digits_hits/detector/src/G4SDManager.cc (-3 / +3 lines)
Lines 71-77 void G4SDManager::AddNewDetector(G4VSensitiveDetector* aSD) Link Here
71
{
71
{
72
  G4int numberOfCollections = aSD->GetNumberOfCollections();
72
  G4int numberOfCollections = aSD->GetNumberOfCollections();
73
  G4String pathName         = aSD->GetPathName();
73
  G4String pathName         = aSD->GetPathName();
74
  if(pathName[0] != '/')
74
  if(pathName.at(0) != '/')
75
    pathName.insert(0, "/");
75
    pathName.insert(0, "/");
76
  if(pathName.back() != '/')
76
  if(pathName.back() != '/')
77
    pathName += "/";
77
    pathName += "/";
Lines 125-131 void G4SDManager::TerminateCurrentEvent(G4HCofThisEvent* HCE) Link Here
125
void G4SDManager::Activate(G4String dName, G4bool activeFlag)
125
void G4SDManager::Activate(G4String dName, G4bool activeFlag)
126
{
126
{
127
  G4String pathName = dName;
127
  G4String pathName = dName;
128
  if(pathName[0] != '/')
128
  if(pathName.at(0) != '/')
129
    pathName.insert(0, "/");
129
    pathName.insert(0, "/");
130
  treeTop->Activate(pathName, activeFlag);
130
  treeTop->Activate(pathName, activeFlag);
131
}
131
}
Lines 134-140 G4VSensitiveDetector* G4SDManager::FindSensitiveDetector(G4String dName, Link Here
134
                                                         G4bool warning)
134
                                                         G4bool warning)
135
{
135
{
136
  G4String pathName = dName;
136
  G4String pathName = dName;
137
  if(pathName[0] != '/')
137
  if(pathName.at(0) != '/')
138
    pathName.insert(0, "/");
138
    pathName.insert(0, "/");
139
  return treeTop->FindSensitiveDetector(pathName, warning);
139
  return treeTop->FindSensitiveDetector(pathName, warning);
140
}
140
}
(-)a/source/digits_hits/detector/src/G4VSensitiveDetector.cc (-1 / +1 lines)
Lines 47-53 G4VSensitiveDetector::G4VSensitiveDetector(G4String name) Link Here
47
    SensitiveDetectorName.erase(0, sLast + 1);
47
    SensitiveDetectorName.erase(0, sLast + 1);
48
    thePathName = name;
48
    thePathName = name;
49
    thePathName.erase(sLast + 1);
49
    thePathName.erase(sLast + 1);
50
    if(thePathName[0] != '/')
50
    if(thePathName.at(0) != '/')
51
      thePathName.insert(0, "/");
51
      thePathName.insert(0, "/");
52
  }
52
  }
53
  fullPathName = thePathName + SensitiveDetectorName;
53
  fullPathName = thePathName + SensitiveDetectorName;
(-)a/source/intercoms/src/G4UIbridge.cc (-1 / +1 lines)
Lines 35-41 G4UIbridge::G4UIbridge(G4UImanager* localUI, G4String dir) Link Here
35
  : localUImanager(localUI)
35
  : localUImanager(localUI)
36
{
36
{
37
  // make sure dirName starts and ends with '/'
37
  // make sure dirName starts and ends with '/'
38
  if(dir[0] == '/')
38
  if(dir.at(0) == '/')
39
  {
39
  {
40
    dirName = dir;
40
    dirName = dir;
41
  }
41
  }
(-)a/source/intercoms/src/G4UIcommand.cc (-7 / +7 lines)
Lines 165-174 G4int G4UIcommand::DoIt(G4String parameterList) Link Here
165
        correctParameters.append(" ");
165
        correctParameters.append(" ");
166
      }
166
      }
167
      aToken = parameterToken();
167
      aToken = parameterToken();
168
      if(aToken.length() > 0 && aToken[0] == '"')
168
      if(aToken.length() > 0 && aToken.at(0) == '"')
169
      {
169
      {
170
        while(aToken.back() != '"' ||
170
        while(aToken.back() != '"' ||
171
              (aToken.length() == 1 && aToken[0] == '"'))
171
              (aToken.length() == 1 && aToken.at(0) == '"'))
172
        {
172
        {
173
          G4String additionalToken = parameterToken();
173
          G4String additionalToken = parameterToken();
174
          if(additionalToken.empty())
174
          if(additionalToken.empty())
Lines 215-221 G4int G4UIcommand::DoIt(G4String parameterList) Link Here
215
            for(G4int ii = 0; ii < i_thParameter; ++ii)
215
            for(G4int ii = 0; ii < i_thParameter; ++ii)
216
            {
216
            {
217
              parVal = cvSt();
217
              parVal = cvSt();
218
              if(parVal[0] == '"')
218
              if(parVal.at(0) == '"')
219
              {
219
              {
220
                while(parVal.back() != '"')
220
                while(parVal.back() != '"')
221
                {
221
                {
Lines 230-236 G4int G4UIcommand::DoIt(G4String parameterList) Link Here
230
              }
230
              }
231
            }
231
            }
232
            G4String aCVToken = cvSt();
232
            G4String aCVToken = cvSt();
233
            if(aCVToken[0] == '"')
233
            if(aCVToken.at(0) == '"')
234
            {
234
            {
235
              while(aCVToken.back() != '"')
235
              while(aCVToken.back() != '"')
236
              {
236
              {
Lines 1593-1599 G4int G4UIcommand::G4UIpGetc() Link Here
1593
{  // emulation of getc()
1593
{  // emulation of getc()
1594
  G4int length = rangeString.length();
1594
  G4int length = rangeString.length();
1595
  if(bp < length)
1595
  if(bp < length)
1596
    return rangeString[bp++];
1596
    return rangeString.at(bp++);
1597
  else
1597
  else
1598
    return EOF;
1598
    return EOF;
1599
}
1599
}
Lines 1603-1616 G4int G4UIcommand::G4UIpUngetc(G4int c) Link Here
1603
{  // emulation of ungetc()
1603
{  // emulation of ungetc()
1604
  if(c < 0)
1604
  if(c < 0)
1605
    return -1;
1605
    return -1;
1606
  if(bp > 0 && c == rangeString[bp - 1])
1606
  if(bp > 0 && c == rangeString.at(bp - 1))
1607
  {
1607
  {
1608
    --bp;
1608
    --bp;
1609
  }
1609
  }
1610
  else
1610
  else
1611
  {
1611
  {
1612
    G4cerr << "G4UIpUngetc() failed." << G4endl;
1612
    G4cerr << "G4UIpUngetc() failed." << G4endl;
1613
    G4cerr << "bp=" << bp << " c=" << c << " pR(bp-1)=" << rangeString[bp - 1]
1613
    G4cerr << "bp=" << bp << " c=" << c << " pR(bp-1)=" << rangeString.at(bp - 1)
1614
           << G4endl;
1614
           << G4endl;
1615
    paramERR = 1;
1615
    paramERR = 1;
1616
    return -1;
1616
    return -1;
(-)a/source/intercoms/src/G4UIcommandTree.cc (-2 / +2 lines)
Lines 516-522 G4String G4UIcommandTree::CreateFileName(const char* pName) Link Here
516
  G4int idxs;
516
  G4int idxs;
517
  while((idxs = fn.find("/")) != G4int(std::string::npos))
517
  while((idxs = fn.find("/")) != G4int(std::string::npos))
518
  {
518
  {
519
    fn[idxs] = '_';
519
    fn.at(idxs) = '_';
520
  }
520
  }
521
  fn += ".html";
521
  fn += ".html";
522
  return fn;
522
  return fn;
Lines 529-535 G4String G4UIcommandTree::ModStr(const char* strS) Link Here
529
  G4String str = strS;
529
  G4String str = strS;
530
  for(G4int i = 0; i < G4int(str.length()); ++i)
530
  for(G4int i = 0; i < G4int(str.length()); ++i)
531
  {
531
  {
532
    char c = str[i];
532
      char c = str.at(i);
533
    switch(c)
533
    switch(c)
534
    {
534
    {
535
      case '<':
535
      case '<':
(-)a/source/intercoms/src/G4UIcontrolMessenger.cc (-2 / +2 lines)
Lines 592-598 void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue) Link Here
592
      c1 += " ";
592
      c1 += " ";
593
      c1 += ca;
593
      c1 += ca;
594
    }
594
    }
595
    if(c1[0] == '"')
595
    if(c1[(size_t)0] == '"')
596
    {
596
    {
597
      G4String strippedValue;
597
      G4String strippedValue;
598
      if(c1.back() == '"')
598
      if(c1.back() == '"')
Lines 715-721 void G4UIcontrolMessenger::SetNewValue(G4UIcommand* command, G4String newValue) Link Here
715
      c1 += " ";
715
      c1 += " ";
716
      c1 += ca;
716
      c1 += ca;
717
    }
717
    }
718
    if(c1[0] == '"')
718
    if(c1[(size_t)0] == '"')
719
    {
719
    {
720
      G4String strippedValue;
720
      G4String strippedValue;
721
      if(c1.back() == '"')
721
      if(c1.back() == '"')
(-)a/source/intercoms/src/G4UImanager.cc (-2 / +2 lines)
Lines 377-383 void G4UImanager::ForeachS(const char* valueList) Link Here
377
  }
377
  }
378
378
379
  G4String aliasValue = c1;
379
  G4String aliasValue = c1;
380
  if(aliasValue[0] == '"')
380
  if(aliasValue.at(0) == '"')
381
  {
381
  {
382
    G4String strippedValue;
382
    G4String strippedValue;
383
    if(aliasValue.back() == '"')
383
    if(aliasValue.back() == '"')
Lines 737-743 void G4UImanager::SetAlias(const char* aliasLine) Link Here
737
  G4int i             = aLine.find(" ");
737
  G4int i             = aLine.find(" ");
738
  G4String aliasName  = aLine.substr(0, i);
738
  G4String aliasName  = aLine.substr(0, i);
739
  G4String aliasValue = aLine.substr(i + 1, aLine.length() - (i + 1));
739
  G4String aliasValue = aLine.substr(i + 1, aLine.length() - (i + 1));
740
  if(aliasValue[0] == '"')
740
  if(aliasValue.at(0) == '"')
741
  {
741
  {
742
    G4String strippedValue;
742
    G4String strippedValue;
743
    if(aliasValue.back() == '"')
743
    if(aliasValue.back() == '"')
(-)a/source/intercoms/src/G4UIparameter.cc (-3 / +3 lines)
Lines 1057-1063 G4int G4UIparameter::G4UIpGetc() Link Here
1057
{  // emulation of getc()
1057
{  // emulation of getc()
1058
  G4int length = parameterRange.length();
1058
  G4int length = parameterRange.length();
1059
  if(bp < length)
1059
  if(bp < length)
1060
    return parameterRange[bp++];
1060
    return parameterRange.at(bp++);
1061
  else
1061
  else
1062
    return EOF;
1062
    return EOF;
1063
}
1063
}
Lines 1067-1073 G4int G4UIparameter::G4UIpUngetc(G4int c) Link Here
1067
{  // emulation of ungetc()
1067
{  // emulation of ungetc()
1068
  if(c < 0)
1068
  if(c < 0)
1069
    return -1;
1069
    return -1;
1070
  if(bp > 0 && c == parameterRange[bp - 1])
1070
  if(bp > 0 && c == parameterRange.at(bp - 1))
1071
  {
1071
  {
1072
    --bp;
1072
    --bp;
1073
  }
1073
  }
Lines 1075-1081 G4int G4UIparameter::G4UIpUngetc(G4int c) Link Here
1075
  {
1075
  {
1076
    G4cerr << "G4UIpUngetc() failed." << G4endl;
1076
    G4cerr << "G4UIpUngetc() failed." << G4endl;
1077
    G4cerr << "bp=" << bp << " c=" << c
1077
    G4cerr << "bp=" << bp << " c=" << c
1078
           << " pR(bp-1)=" << parameterRange[bp - 1] << G4endl;
1078
           << " pR(bp-1)=" << parameterRange.at(bp - 1) << G4endl;
1079
    paramERR = 1;
1079
    paramERR = 1;
1080
    return -1;
1080
    return -1;
1081
  }
1081
  }
(-)a/source/interfaces/basic/src/G4UIArrayString.cc (-1 / +1 lines)
Lines 68-74 G4UIArrayString::G4UIArrayString(const G4String& stream) Link Here
68
      stringArray[i]= astream.substr(indx, jc-indx);
68
      stringArray[i]= astream.substr(indx, jc-indx);
69
    }
69
    }
70
    for(G4int j=1; jc+j< G4int(astream.length()); j++ ) { // skip continuing spaces
70
    for(G4int j=1; jc+j< G4int(astream.length()); j++ ) { // skip continuing spaces
71
      if(astream[jc+j]==' ') jc++;
71
      if(astream.at(jc+j)==' ') jc++;
72
      else break;
72
      else break;
73
    }
73
    }
74
    indx= jc+1;
74
    indx= jc+1;
(-)a/source/interfaces/basic/src/G4UIExecutive.cc (-1 / +1 lines)
Lines 219-225 void G4UIExecutive::SelectSessionByFile(const G4String& appname) Link Here
219
    if( fsession.eof()) break;
219
    if( fsession.eof()) break;
220
    fsession.getline(linebuf, BUFSIZE);
220
    fsession.getline(linebuf, BUFSIZE);
221
    G4String aline = G4StrUtil::strip_copy(linebuf);
221
    G4String aline = G4StrUtil::strip_copy(linebuf);
222
    if ( aline[0] == '#' ) continue;
222
    if ( aline.at(0) == '#' ) continue;
223
    if ( aline == "" ) continue;
223
    if ( aline == "" ) continue;
224
    if ( iline == 1 )
224
    if ( iline == 1 )
225
      default_session = aline;
225
      default_session = aline;
(-)a/source/interfaces/basic/src/G4UIQt.cc (-2 / +2 lines)
Lines 2392-2401 void G4UIQt::AddButton ( Link Here
2392
       cmd.substr(0,3) != "cd " &&
2392
       cmd.substr(0,3) != "cd " &&
2393
       cmd != "help" &&
2393
       cmd != "help" &&
2394
       cmd.substr(0,5) != "help " &&
2394
       cmd.substr(0,5) != "help " &&
2395
       cmd[0] != '?' &&
2395
       cmd.at(0) != '?' &&
2396
       cmd != "hist" &&
2396
       cmd != "hist" &&
2397
       cmd != "history" &&
2397
       cmd != "history" &&
2398
       cmd[0] != '!' &&
2398
       cmd.at(0) != '!' &&
2399
       cmd != "exit" &&
2399
       cmd != "exit" &&
2400
       cmd != "cont" &&
2400
       cmd != "cont" &&
2401
       cmd != "continue"){
2401
       cmd != "continue"){
(-)a/source/interfaces/basic/src/G4UIterminal.cc (-3 / +3 lines)
Lines 219-225 G4String G4UIterminal::GetCommand(const char* msg) Link Here
219
  if( nC.length() == 0 ) {
219
  if( nC.length() == 0 ) {
220
    newCommand= nullString;
220
    newCommand= nullString;
221
221
222
  } else if( nC[0] == '#' ) {  
222
  } else if( nC.at(0) == '#' ) {
223
    G4cout << nC << G4endl;
223
    G4cout << nC << G4endl;
224
    newCommand= nullString;
224
    newCommand= nullString;
225
225
Lines 249-255 G4String G4UIterminal::GetCommand(const char* msg) Link Here
249
    TerminalHelp(nC);
249
    TerminalHelp(nC);
250
    newCommand= nullString;
250
    newCommand= nullString;
251
251
252
  } else if(nC[0] == '?') {   // "show current value of a parameter"
252
  } else if(nC.at(0) == '?') {   // "show current value of a parameter"
253
    ShowCurrent(nC);
253
    ShowCurrent(nC);
254
    newCommand= nullString;
254
    newCommand= nullString;
255
255
Lines 260-266 G4String G4UIterminal::GetCommand(const char* msg) Link Here
260
    }
260
    }
261
    newCommand= nullString;
261
    newCommand= nullString;
262
262
263
  } else if(nC[0] == '!') {   // "!"
263
  } else if(nC.at(0) == '!') {   // "!"
264
    G4String ss= nC.substr(1, nC.length()-1);
264
    G4String ss= nC.substr(1, nC.length()-1);
265
    G4int vl;
265
    G4int vl;
266
    const char* tt= ss;
266
    const char* tt= ss;
(-)a/source/interfaces/basic/src/G4VUIshell.cc (-4 / +4 lines)
Lines 89-105 void G4VUIshell::MakePrompt(const char* msg) Link Here
89
	i++;
89
	i++;
90
        break;
90
        break;
91
      default:
91
      default:
92
	promptString += promptSetting[i];
92
	promptString += promptSetting.at(i);
93
        break;
93
        break;
94
      }           
94
      }           
95
    } else {
95
    } else {
96
      promptString += promptSetting[i];
96
      promptString += promptSetting.at(i);
97
    }
97
    }
98
  }
98
  }
99
99
100
  // append last chaacter
100
  // append last chaacter
101
  if(i == G4int(promptSetting.length())-1) 
101
  if(i == G4int(promptSetting.length())-1) 
102
    promptString += promptSetting[i];
102
    promptString += promptSetting.at(i);
103
}
103
}
104
104
105
105
Lines 173-179 G4String G4VUIshell::GetAbsCommandDirPath(const G4String& apath) const Link Here
173
        }
173
        }
174
      } else if(bpath.substr(indx,jslash-indx) == "."){  // nothing to do
174
      } else if(bpath.substr(indx,jslash-indx) == "."){  // nothing to do
175
      } else { // add
175
      } else { // add
176
        if( !(jslash==indx && bpath[indx]=='/') ) // truncate "////"
176
          if (!(jslash == indx && bpath.at(indx) == '/')) // truncate "////"
177
          absPath+= bpath.substr(indx, jslash-indx+1);
177
          absPath+= bpath.substr(indx, jslash-indx+1);
178
          // better to be check directory existence. (it costs!)
178
          // better to be check directory existence. (it costs!)
179
      }
179
      }
(-)a/source/interfaces/common/src/G4InteractorMessenger.cc (-1 / +1 lines)
Lines 217-223 G4bool GetValues ( Link Here
217
      return false;
217
      return false;
218
    }
218
    }
219
    G4String token = tok;
219
    G4String token = tok;
220
    if( token[0]=='"' ) {
220
    if( token.at(0)=='"' ) {
221
      while( token.back() != '"' ) {
221
      while( token.back() != '"' ) {
222
	tok = strtok(NULL," ");
222
	tok = strtok(NULL," ");
223
	if( (tok==NULL) || (*tok=='\0')) {
223
	if( (tok==NULL) || (*tok=='\0')) {
(-)a/source/interfaces/common/src/G4VBasicShell.cc (-5 / +5 lines)
Lines 47-53 G4VBasicShell::~G4VBasicShell() Link Here
47
G4String G4VBasicShell::ModifyToFullPathCommand(const char* aCommandLine) const
47
G4String G4VBasicShell::ModifyToFullPathCommand(const char* aCommandLine) const
48
{
48
{
49
  G4String rawCommandLine = aCommandLine;
49
  G4String rawCommandLine = aCommandLine;
50
  if(rawCommandLine.empty()||rawCommandLine[0]=='\0') return rawCommandLine;
50
  if(rawCommandLine.empty()||rawCommandLine.at(0)=='\0') return rawCommandLine;
51
  G4String commandLine = G4StrUtil::strip_copy(rawCommandLine);
51
  G4String commandLine = G4StrUtil::strip_copy(rawCommandLine);
52
  G4String commandString;
52
  G4String commandString;
53
  G4String parameterString;
53
  G4String parameterString;
Lines 128-134 G4String G4VBasicShell::ModifyPath(const G4String& tempPath) const Link Here
128
  G4String newPath = "";
128
  G4String newPath = "";
129
129
130
  // temporal full path
130
  // temporal full path
131
  if( tempPath[0] == '/') newPath = tempPath;
131
  if( tempPath.at(0) == '/') newPath = tempPath;
132
  else newPath = currentDirectory + tempPath;
132
  else newPath = currentDirectory + tempPath;
133
133
134
  // body of path...
134
  // body of path...
Lines 240-246 void G4VBasicShell::ApplyShellCommand (const G4String& a_string, Link Here
240
240
241
  G4String command = G4StrUtil::lstrip_copy(a_string);
241
  G4String command = G4StrUtil::lstrip_copy(a_string);
242
242
243
  if( command[0] == '#' ) {
243
  if( command.at(0) == '#' ) {
244
244
245
    G4cout << command << G4endl;
245
    G4cout << command << G4endl;
246
246
Lines 261-267 void G4VBasicShell::ApplyShellCommand (const G4String& a_string, Link Here
261
261
262
    TerminalHelp( command );
262
    TerminalHelp( command );
263
263
264
  } else if( command[0] == '?' ) {
264
  } else if( command.at(0) == '?' ) {
265
265
266
    ShowCurrent( command );
266
    ShowCurrent( command );
267
267
Lines 272-278 void G4VBasicShell::ApplyShellCommand (const G4String& a_string, Link Here
272
      G4cout << i << ": " << UI->GetPreviousCommand(i) << G4endl;
272
      G4cout << i << ": " << UI->GetPreviousCommand(i) << G4endl;
273
    }
273
    }
274
274
275
  } else if( command[0] == '!' ) {
275
  } else if( command.at(0) == '!' ) {
276
276
277
    G4String ss = command.substr(1,command.length()-1);
277
    G4String ss = command.substr(1,command.length()-1);
278
    G4int vl;
278
    G4int vl;
(-)a/source/materials/src/G4MicroElecMaterialStructure.cc (-2 / +2 lines)
Lines 102-108 void G4MicroElecMaterialStructure::ReadMaterialFile() Link Here
102
{
102
{
103
  char *path = std::getenv("G4LEDATA");
103
  char *path = std::getenv("G4LEDATA");
104
  
104
  
105
  if (materialName[0] == 'G' && materialName[1] == '4') {
105
  if (materialName.at(0) == 'G' && materialName.at(1) == '4') {
106
    //in the case the NIST database is used
106
    //in the case the NIST database is used
107
    materialName.erase(0, 1);
107
    materialName.erase(0, 1);
108
    materialName.erase(0, 1);
108
    materialName.erase(0, 1);
Lines 133-139 void G4MicroElecMaterialStructure::ReadMaterialFile() Link Here
133
	getline(fichier, filler);
133
	getline(fichier, filler);
134
	std::stringstream line(filler);
134
	std::stringstream line(filler);
135
	
135
	
136
	if (filler[0] == '#' || filler.empty()) {continue;}
136
	if (filler.at(0) == '#' || filler.empty()) {continue;}
137
	
137
	
138
	line >> varLength;
138
	line >> varLength;
139
	line >> nameParameter;
139
	line >> nameParameter;
(-)a/source/processes/hadronic/models/cascade/cascade/include/G4CascadeParamMessenger.icc (-1 / +1 lines)
Lines 41-47 T* G4CascadeParamMessenger::CreateCommand(const G4String& cmd, Link Here
41
41
42
  // If input name begins with '/', treat as absolute path
42
  // If input name begins with '/', treat as absolute path
43
  G4String path;
43
  G4String path;
44
  if (cmd[0] != '/' && cmdDir) path = cmdDir->GetCommandPath();
44
  if (cmd.at(0) != '/' && cmdDir) path = cmdDir->GetCommandPath();
45
  path += cmd;
45
  path += cmd;
46
46
47
  T* theCmd = new T(path.c_str(), this);        // <T> must be G4UIcommand!
47
  T* theCmd = new T(path.c_str(), this);        // <T> must be G4UIcommand!
(-)a/source/processes/hadronic/models/cascade/cascade/src/G4CascadeParamMessenger.cc (-1 / +1 lines)
Lines 136-142 void G4CascadeParamMessenger::CreateDirectory(const char* path, Link Here
136
136
137
  // Directory path must be absolute, prepend "/" if ncessary
137
  // Directory path must be absolute, prepend "/" if ncessary
138
  G4String fullPath = path;
138
  G4String fullPath = path;
139
  if (fullPath[0] != '/') fullPath.insert(0, "/");
139
  if (fullPath.at(0) != '/') fullPath.insert(0, "/");
140
  if (fullPath.back() != '/') fullPath.append("/");
140
  if (fullPath.back() != '/') fullPath.append("/");
141
141
142
  // See if input path has already been registered
142
  // See if input path has already been registered
(-)a/source/visualization/management/src/G4VisCommandsScene.cc (-1 / +1 lines)
Lines 630-636 void G4VisCommandSceneNotifyHandlers::SetNewValue (G4UIcommand*, Link Here
630
  std::istringstream is (newValue);
630
  std::istringstream is (newValue);
631
  is >> sceneName >> refresh_flush;
631
  is >> sceneName >> refresh_flush;
632
  G4bool flush = false;
632
  G4bool flush = false;
633
  if (refresh_flush[0] == 'f') flush = true;
633
  if (refresh_flush.at(0) == 'f') flush = true;
634
634
635
  const G4SceneList& sceneList = fpVisManager -> GetSceneList ();
635
  const G4SceneList& sceneList = fpVisManager -> GetSceneList ();
636
  G4SceneHandlerList& sceneHandlerList =
636
  G4SceneHandlerList& sceneHandlerList =
(-)a/source/visualization/management/src/G4VisCommandsSceneAdd.cc (-18 / +18 lines)
Lines 434-442 void G4VisCommandSceneAddDate::SetNewValue (G4UIcommand*, G4String newValue) Link Here
434
  is.getline(remainder, NREMAINDER);
434
  is.getline(remainder, NREMAINDER);
435
  dateString += remainder;
435
  dateString += remainder;
436
  G4Text::Layout layout = G4Text::right;
436
  G4Text::Layout layout = G4Text::right;
437
  if (layoutString[0] == 'l') layout = G4Text::left;
437
  if (layoutString.at(0) == 'l') layout = G4Text::left;
438
  else if (layoutString[0] == 'c') layout = G4Text::centre;
438
  else if (layoutString.at(0) == 'c') layout = G4Text::centre;
439
  else if (layoutString[0] == 'r') layout = G4Text::right;
439
  else if (layoutString.at(0) == 'r') layout = G4Text::right;
440
440
441
  Date* date = new Date(fpVisManager, size, x, y, layout, dateString);
441
  Date* date = new Date(fpVisManager, size, x, y, layout, dateString);
442
  G4VModel* model =
442
  G4VModel* model =
Lines 676-684 void G4VisCommandSceneAddEventID::SetNewValue (G4UIcommand*, G4String newValue) Link Here
676
  is >> size >> x >> y >> layoutString;
676
  is >> size >> x >> y >> layoutString;
677
677
678
  G4Text::Layout layout = G4Text::right;
678
  G4Text::Layout layout = G4Text::right;
679
  if (layoutString[0] == 'l') layout = G4Text::left;
679
  if (layoutString.at(0) == 'l') layout = G4Text::left;
680
  else if (layoutString[0] == 'c') layout = G4Text::centre;
680
  else if (layoutString.at(0) == 'c') layout = G4Text::centre;
681
  else if (layoutString[0] == 'r') layout = G4Text::right;
681
  else if (layoutString.at(0) == 'r') layout = G4Text::right;
682
682
683
  // For End of Event (only for reviewing kept events one by one)
683
  // For End of Event (only for reviewing kept events one by one)
684
  EventID* eoeEventID
684
  EventID* eoeEventID
Lines 1656-1668 void G4VisCommandSceneAddLogo::SetNewValue (G4UIcommand*, G4String newValue) { Link Here
1656
    else if (vp.z() > vp.x() && vp.z() > vp.y()) logoDirection = Z;
1656
    else if (vp.z() > vp.x() && vp.z() > vp.y()) logoDirection = Z;
1657
    else if (vp.z() < vp.x() && vp.z() < vp.y()) logoDirection = minusZ;
1657
    else if (vp.z() < vp.x() && vp.z() < vp.y()) logoDirection = minusZ;
1658
  }
1658
  }
1659
  else if (direction[0] == 'x') logoDirection = X;
1659
  else if (direction.at(0) == 'x') logoDirection = X;
1660
  else if (direction[0] == 'y') logoDirection = Y;
1660
  else if (direction.at(0) == 'y') logoDirection = Y;
1661
  else if (direction[0] == 'z') logoDirection = Z;
1661
  else if (direction.at(0) == 'z') logoDirection = Z;
1662
  else if (direction[0] == '-') {
1662
  else if (direction.at(0) == '-') {
1663
    if (direction[1] == 'x') logoDirection = minusX;
1663
    if (direction.at(0) == 'x') logoDirection = minusX;
1664
    else if (direction[1] == 'y') logoDirection = minusY;
1664
    else if (direction.at(0) == 'y') logoDirection = minusY;
1665
    else if (direction[1] == 'z') logoDirection = minusZ;
1665
    else if (direction.at(0) == 'z') logoDirection = minusZ;
1666
  } else {
1666
  } else {
1667
    if (verbosity >= G4VisManager::errors) {
1667
    if (verbosity >= G4VisManager::errors) {
1668
      G4cerr <<	"ERROR: Unrecogniseed direction: \""
1668
      G4cerr <<	"ERROR: Unrecogniseed direction: \""
Lines 1975-1983 void G4VisCommandSceneAddLogo2D::SetNewValue (G4UIcommand*, G4String newValue) Link Here
1975
  std::istringstream is(newValue);
1975
  std::istringstream is(newValue);
1976
  is >> size >> x >> y >> layoutString;
1976
  is >> size >> x >> y >> layoutString;
1977
  G4Text::Layout layout = G4Text::right;
1977
  G4Text::Layout layout = G4Text::right;
1978
  if (layoutString[0] == 'l') layout = G4Text::left;
1978
  if (layoutString.at(0) == 'l') layout = G4Text::left;
1979
  else if (layoutString[0] == 'c') layout = G4Text::centre;
1979
  else if (layoutString.at(0) == 'c') layout = G4Text::centre;
1980
  else if (layoutString[0] == 'r') layout = G4Text::right;
1980
  else if (layoutString.at(0) == 'r') layout = G4Text::right;
1981
1981
1982
  Logo2D* logo2D = new Logo2D(fpVisManager, size, x, y, layout);
1982
  Logo2D* logo2D = new Logo2D(fpVisManager, size, x, y, layout);
1983
  G4VModel* model =
1983
  G4VModel* model =
Lines 2265-2272 void G4VisCommandSceneAddScale::SetNewValue (G4UIcommand*, G4String newValue) { Link Here
2265
  xmid *= unit; ymid *= unit; zmid *= unit;
2265
  xmid *= unit; ymid *= unit; zmid *= unit;
2266
2266
2267
  Scale::Direction scaleDirection (Scale::x);
2267
  Scale::Direction scaleDirection (Scale::x);
2268
  if (direction[0] == 'y') scaleDirection = Scale::y;
2268
  if (direction.at(0) == 'y') scaleDirection = Scale::y;
2269
  if (direction[0] == 'z') scaleDirection = Scale::z;
2269
  if (direction.at(0) == 'z') scaleDirection = Scale::z;
2270
2270
2271
  G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
2271
  G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
2272
  if (!pViewer) {
2272
  if (!pViewer) {
(-)a/source/visualization/management/src/G4VisManager.cc (-7 / +7 lines)
Lines 2411-2423 G4VisManager::Verbosity Link Here
2411
G4VisManager::GetVerbosityValue(const G4String& verbosityString) {
2411
G4VisManager::GetVerbosityValue(const G4String& verbosityString) {
2412
  G4String ss = G4StrUtil::to_lower_copy(verbosityString); 
2412
  G4String ss = G4StrUtil::to_lower_copy(verbosityString); 
2413
  Verbosity verbosity;
2413
  Verbosity verbosity;
2414
  if      (ss[0] == 'q') verbosity = quiet;
2414
  if      (ss.at(0) == 'q') verbosity = quiet;
2415
  else if (ss[0] == 's') verbosity = startup;
2415
  else if (ss.at(0) == 's') verbosity = startup;
2416
  else if (ss[0] == 'e') verbosity = errors;
2416
  else if (ss.at(0) == 'e') verbosity = errors;
2417
  else if (ss[0] == 'w') verbosity = warnings;
2417
  else if (ss.at(0) == 'w') verbosity = warnings;
2418
  else if (ss[0] == 'c') verbosity = confirmations;
2418
  else if (ss.at(0) == 'c') verbosity = confirmations;
2419
  else if (ss[0] == 'p') verbosity = parameters;
2419
  else if (ss.at(0) == 'p') verbosity = parameters;
2420
  else if (ss[0] == 'a') verbosity = all;
2420
  else if (ss.at(0) == 'a') verbosity = all;
2421
  else {
2421
  else {
2422
    G4int intVerbosity;
2422
    G4int intVerbosity;
2423
    std::istringstream is(ss);
2423
    std::istringstream is(ss);

Return to problem 2463