outfile(inputRecord, "outfile", ParameterSet::In);
outfile.setConstraint(NewFileConstraint());
Motivation
Output file names are fairly common parameters, this consolidates the error
checking and "remove if it already exists" logic.
To Do
- We should probably make sure that the file is writable
Member Description
Currently the deleteIfExists argument has no affect
Copy constructor (copy semantics)
NewFileConstraint &operator=(const NewFileConstraint &other)
Assignment (copy semantics)
Destructor
virtual Bool valueOK(const String &value, String &error) const
Indicates whether the specified string is a valid new file,
invoking the choice GUI. If it returns False, an error
message is returned.
virtual ParameterConstraint<String> *clone() const
Set the constraint