File indexing completed on 2024-04-06 12:05:24
0001 #ifndef DDI_Specific_h
0002 #define DDI_Specific_h
0003
0004 #include <iostream>
0005 #include <string>
0006 #include <utility>
0007 #include <vector>
0008
0009 #include "DetectorDescription/Core/interface/DDExpandedView.h"
0010 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
0011 #include "DetectorDescription/Core/interface/DDPartSelection.h"
0012 #include "DetectorDescription/Core/interface/DDsvalues.h"
0013
0014 class DDExpandedView;
0015 class DDLogicalPart;
0016 class DDPartSelection;
0017
0018 namespace DDI {
0019
0020 class Specific {
0021 public:
0022 Specific(const std::vector<std::string> &selections, const DDsvalues_type &specs, bool doRegex = true);
0023
0024 Specific(const std::vector<DDPartSelection> &selections, const DDsvalues_type &specs);
0025
0026 const std::vector<DDPartSelection> &selection() const;
0027
0028 void updateLogicalPart(
0029 std::vector<std::pair<DDLogicalPart, std::pair<const DDPartSelection *, const DDsvalues_type *> > > &) const;
0030
0031 void tokenize();
0032
0033 const DDsvalues_type &specifics() const { return specifics_; }
0034
0035
0036 std::pair<bool, DDExpandedView> node() const;
0037
0038 void stream(std::ostream &) const;
0039
0040 protected:
0041 void createPartSelections(const std::string &selString);
0042 void addSelectionLevel(std::vector<DDLogicalPart> &lpv,
0043 int copyno,
0044 ddselection_type st,
0045 std::vector<DDPartSelection> &selv);
0046 DDsvalues_type specifics_;
0047 std::vector<DDPartSelection> partSelections_;
0048 bool valid_;
0049 bool doRegex_;
0050 };
0051 }
0052
0053 #endif