00001 #include <FWCore/Framework/interface/EDAnalyzer.h> 00002 #include <FWCore/Framework/interface/Event.h> 00003 #include <FWCore/Framework/interface/EventSetup.h> 00004 #include <FWCore/ParameterSet/interface/ParameterSet.h> 00005 #include <DetectorDescription/Core/interface/DDMaterial.h> 00006 #include <DetectorDescription/Core/interface/DDSolid.h> 00007 #include <DetectorDescription/Core/interface/DDTransform.h> 00008 #include <DetectorDescription/Core/interface/DDsvalues.h> 00009 #include <DetectorDescription/Core/interface/DDLogicalPart.h> 00010 00011 #include <ostream> 00012 #include <set> 00013 00014 class DDPartSelection; 00015 00017 struct ddsvaluesCmp { 00018 bool operator() ( const DDsvalues_type& sv1, const DDsvalues_type& sv2 ); 00019 }; 00020 00021 class OutputDDToDDL : public edm::EDAnalyzer { 00022 00023 public: 00024 explicit OutputDDToDDL( const edm::ParameterSet& iConfig ); 00025 ~OutputDDToDDL(); 00026 virtual void beginRun( const edm::Run&, edm::EventSetup const& ); 00027 virtual void analyze( const edm::Event&, const edm::EventSetup& ){} 00028 virtual void endJob() {}; 00029 00030 private: 00031 void addToMatStore( const DDMaterial& mat, std::set<DDMaterial> & matStore ); 00032 void addToSolStore( const DDSolid& sol, std::set<DDSolid> & solStore, std::set<DDRotation>& rotStore ); 00033 void addToSpecStore( const DDLogicalPart& lp, std::map<DDsvalues_type, std::set<DDPartSelection*>, ddsvaluesCmp > & specStore ); 00034 00035 int rotNumSeed_; 00036 std::string fname_; 00037 std::ostream* xos_; 00038 int specNameCount_; 00039 00040 }; 00041