[Gate-users] gjs condor bug

Alex Vergara Gil alexvergaragil at gmail.com
Tue Jan 13 15:26:39 CET 2015


Hello

I found a bug in the file GateMacfileParser.cc of the jobsplitter:
it expect a space between "/gate/actor/addActor DoseActor" and the
name of the macro; in
the remaining macros the TAB character is ok but not here, so there is
something wrong with the GateMacfileParser.cc of the jobsplitter

A possible solution can be

void GateMacfileParser::SearchForActors(G4int splitNumber,ofstream&
output, ofstream& splitfile)
if (macline.contains("/gate/actor/addActor"))
  {
    G4int pos = macline.find_first_of(" ");
++ if (pos<=0) pos = macline.find_first_of("\t");
    G4String tmp = macline.substr(pos+1);
    pos = tmp.find_first_of(" ");
++ if (pos<=0) pos = tmp.find_first_of("\t");
    G4String actorType = tmp.substr(0,pos);
    G4String actorName = tmp.substr(pos+1);
    listOfActorType.push_back(actorType);
    listOfActorName.push_back(actorName);
  }

but in this way it expect two spaces or two tabs, actually it may
happen there can be combined spaces and tabs so a better solution is
needed but in this way at least it handles tabs

Regards

Alex


More information about the Gate-users mailing list