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
00010
00011
00012 class DDLogicalPart;
00013
00014 enum ddselection_type { ddunknown,
00015 ddanynode,
00016 ddanychild,
00017 ddanylogp,
00018 ddanyposp,
00019 ddchildlogp,
00020 ddchildposp
00021 };
00022
00023
00024
00025 struct DDPartSelRegExpLevel
00026 {
00027 DDPartSelRegExpLevel(const std::string & ns, const std::string & nm, int cpn, ddselection_type t, bool isRegex=false)
00028 : ns_(ns), nm_(nm), copyno_(cpn), selectionType_(t), isRegex_(isRegex) { }
00029 std::string ns_, nm_;
00030 int copyno_;
00031 ddselection_type selectionType_;
00032 bool isRegex_;
00033 };
00034
00035
00036 struct DDPartSelectionLevel
00037 {
00038 DDPartSelectionLevel(const DDLogicalPart &, int, ddselection_type);
00039 DDLogicalPart lp_;
00040 int copyno_;
00041 ddselection_type selectionType_;
00042 };
00043
00044
00045 class DDPartSelection : public std::vector<DDPartSelectionLevel>
00046 {
00047 public:
00048 DDPartSelection() : std::vector<DDPartSelectionLevel>() { }
00049 };
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
00064 std::ostream & operator<<(std::ostream &, const std::vector<DDPartSelection> &);
00065
00066 void DDTokenize2(const std::string & selectionString, std::vector<DDPartSelRegExpLevel> & result);
00067 void DDTokenize(const std::string & selectionString, std::vector<DDPartSelRegExpLevel> & result);
00068 std::ostream & operator<<(std::ostream &, const DDPartSelection &);
00069
00070 #endif