47 "The \"SELECT\" sub-command selects the positions to be affected "
48 "by subsequent error sub-commands.") {
51 "Name of the lattice to be affected by selections",
55 "If true, all elements are selected");
58 "If true, all selections are cleared");
61 "Range to be considered for selection (default: full range)");
64 "Name of class to be selected (default: all classes)");
67 "The type name of elements to be selected (default: all types)");
70 "Regular expression for matching names (default: all names)");
86 return new Select(name,
this);
96 select(*line->fetchLine());
97 }
else if (
Table* table =
dynamic_cast<Table*
>(obj)) {
101 "You cannot do a \"SELECT\" on \"" + name +
102 "\", it is neither a line nor a table.");
106 "Object \"" + name +
"\" not found.");
117 *
gmsg << level2 <<
"\nAll elements selected.\n" << endl;
124 *
gmsg << level2 <<
"\nAll elements de-selected.\n" << endl;
137 *
gmsg << level2 <<
"No elements";
138 }
else if (count == 1) {
139 *
gmsg << level2 <<
"\n1 element";
141 *
gmsg << level2 <<
'\n' << count <<
" elements";
143 *
gmsg << level2 <<
" selected.\n" << endl;
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.
Action(int size, const char *name, const char *help)
Constructor for exemplars.
The base class for all OPAL beam lines and sequences.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
Object(int size, const char *name, const char *help)
Constructor for exemplars.
std::vector< Attribute > itsAttr
The object attributes.
static OpalData * getInstance()
The base class for all OPAL tables.
virtual void execute()
Apply the algorithm to the top-level beamline.
Set/reset all selection flags in a beam line built from FlaggedElmPtr.
virtual void execute()
Execute the command.
void select(const Beamline &)
virtual Select * clone(const std::string &name)
Make clone.
Select()
Exemplar constructor.
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.