31 const std::string &clsName,
const std::string &typName,
32 const std::string &pattern):
34 itsClass(0), itsType(typName), itsPattern(0), itsCount(0) {
37 std::cerr <<
"\n### Warning ### Unknown class name \""
38 << clsName <<
"\"; will select all classes.\n" <<
std::endl;
42 if(! pattern.empty()) {
Inform & endl(Inform &inf)
static Element * find(const std::string &name)
Find named Element.
bool isTreeMember(const Object *subTree) const
Test for tree membership.
Representation of a range within a beam line or sequence.
bool isActive() const
Test for active range.
virtual const std::string & getName() const
Get element name.
An abstract sequence of beam line components.
ElementBase * getElement() const
Get the element pointer.
A section of a beam line.
void setSelectionFlag(bool flag) const
Get selection flag.
const std::string getTypeName() const
Return the element's type name.
virtual void execute()
Execute the algorithm.
RangeRep itsRange
Working data for range.
virtual void handleElement(const FlaggedElmPtr &)
The operation to be done for elements.
int getCount() const
Return the count of selected elements.
virtual void execute()
Execute the selection.
const std::string itsType
const RegularExpression * itsPattern
bool match(const std::string &s) const
Match a string against the pattern.