48 "The \"SELECT\" sub-command selects the positions to be affected "
49 "by subsequent error sub-commands.") {
52 "Name of the lattice to be affected by selections",
56 "If true, all elements are selected");
59 "If true, all selections are cleared");
62 "Range to be considered for selection (default: full range)");
65 "Name of class to be selected (default: all classes)");
68 "The type name of elements to be selected (default: all types)");
71 "Regular expression for matching names (default: all names)");
97 select(*line->fetchLine());
98 }
else if (
Table* table =
dynamic_cast<Table*
>(obj)) {
102 "You cannot do a \"SELECT\" on \"" +
name +
103 "\", it is neither a line nor a table.");
107 "Object \"" +
name +
"\" not found.");
139 }
else if (count == 1) {
142 *
gmsg <<
level2 <<
'\n' << count <<
" elements";
Inform & endl(Inform &inf)
Inform & level2(Inform &inf)
const T * find(const T table[], const std::string &name)
Look up name.
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
Attribute makeRange(const std::string &name, const std::string &help)
Create a range attribute.
bool getBool(const Attribute &attr)
Return logical value.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
RangeRep getRange(const Attribute &attr)
Get range value.
The base class for all OPAL actions.
The base class for all OPAL beam lines and sequences.
The base class for all OPAL objects.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
std::vector< Attribute > itsAttr
The object attributes.
static OpalData * getInstance()
The base class for all OPAL tables.
virtual void execute()
Execute the command.
void select(const Beamline &)
virtual Select * clone(const std::string &name)
Make clone.
Select()
Exemplar constructor.
virtual void execute()
Apply the algorithm to the top-level beamline.
Set/reset all selection flags in a beam line built from FlaggedElmPtr.
An abstract sequence of beam line components.
int getCount() const
Return the count of selected elements.
virtual void execute()
Execute the selection.
The base class for all OPAL exceptions.