Go to the documentation of this file.00001 #ifndef DDPartSelection_h
00002 #define DDPartSelection_h
00003
00004 #include <vector>
00005 #include <string>
00006 #include <iostream>
00007 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00008
00009 class DDLogicalPart;
00010
00011 enum ddselection_type { ddunknown,
00012 ddanynode,
00013 ddanychild,
00014 ddanylogp,
00015 ddanyposp,
00016 ddchildlogp,
00017 ddchildposp
00018 };
00019
00020 struct DDPartSelRegExpLevel
00021 {
00022 DDPartSelRegExpLevel(const std::string & ns, const std::string & nm, int cpn, ddselection_type t, bool isRegex=false)
00023 : ns_(ns), nm_(nm), copyno_(cpn), selectionType_(t), isRegex_(isRegex) { }
00024 std::string ns_, nm_;
00025 int copyno_;
00026 ddselection_type selectionType_;
00027 bool isRegex_;
00028 };
00029
00030 struct DDPartSelectionLevel
00031 {
00032 DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type);
00033 DDLogicalPart lp_;
00034 int copyno_;
00035 ddselection_type selectionType_;
00036 };
00037
00038 class DDPartSelection : public std::vector<DDPartSelectionLevel>
00039 {
00040 public:
00041 DDPartSelection() : std::vector<DDPartSelectionLevel>() { }
00042 };
00043
00044 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
00045 std::ostream & operator<<(std::ostream &, const std::vector<DDPartSelection> &);
00046
00047 void DDTokenize2(const std::string & selectionString, std::vector<DDPartSelRegExpLevel> & result);
00048 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
00049
00050 #endif