CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DetectorDescription/Core/src/Specific.h

Go to the documentation of this file.
00001 #ifndef DDI_Specific_h
00002 #define DDI_Specific_h
00003 
00004 #include "DetectorDescription/Core/interface/DDPartSelection.h"
00005 #include "DetectorDescription/Core/interface/DDLogicalPart.h"
00006 #include "DetectorDescription/Core/interface/DDsvalues.h"
00007 #include "DetectorDescription/Core/interface/DDExpandedView.h"
00008 
00009 #include <iostream>
00010 #include <vector>
00011 #include <string>
00012 #include <utility>
00013 
00014 class DDPartSelection;
00015 class DDNodes;
00016 
00017 namespace DDI {
00018   
00019   class Specific
00020   {
00021   public:
00022     typedef std::vector<DDPartSelection> partsel_type;
00023     typedef std::vector<std::string> selectors_type;         
00024 
00025     Specific(const std::vector<std::string> & selections,
00026              const DDsvalues_type & specs,
00027               bool doRegex=true) ;
00028               
00029     Specific(const std::vector<DDPartSelection> & selections,
00030              const DDsvalues_type & specs);           
00031     
00032     ~Specific();// { } 
00033              
00034     const std::vector<DDPartSelection> & selection() const;
00035     
00036     void updateLogicalPart(std::vector<std::pair<DDLogicalPart, std::pair<DDPartSelection*,DDsvalues_type*> > >&) const;
00037     
00038     void tokenize();
00039     
00040     const DDsvalues_type & specifics() const { return specifics_; }
00041     
00043     bool nodes(DDNodes &) const { return false; }
00044     
00046     std::pair<bool,DDExpandedView> node() const;
00047     
00048     void stream(std::ostream &) const;    
00049   protected:
00050   void createPartSelections(const std::string & selString);
00051   void addSelectionLevel(std::vector<DDLogicalPart> & lpv, int copyno, ddselection_type st, 
00052                        std::vector<DDPartSelection> & selv);
00053     //std::vector<std::string> selection_;
00054     DDsvalues_type specifics_;
00055     partsel_type partSelections_;
00056     bool valid_;    
00057     bool doRegex_;
00058   };
00059 
00060 }
00061 
00062 #endif // DDI_Specific_h