CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/DetectorDescription/Core/src/DDExpandedNode.cc

Go to the documentation of this file.
00001 #include "DetectorDescription/Core/interface/DDExpandedNode.h"
00002 #include "DetectorDescription/Core/interface/DDPosData.h"
00003 
00004 DDExpandedNode::DDExpandedNode(const DDLogicalPart & lp, 
00005                                DDPosData * pd, 
00006                                const DDTranslation & t, 
00007                                const DDRotationMatrix & r,
00008                                int siblingno)
00009  : logp_(lp), posd_(pd), trans_(t), rot_(r), siblingno_(siblingno)
00010 { }
00011 
00012 
00013 DDExpandedNode::~DDExpandedNode()
00014 { }   
00015    
00016 
00017 bool DDExpandedNode::operator==(const DDExpandedNode & n) const {
00018   return ( (logp_==n.logp_) && 
00019            (posd_->copyno_ == n.posd_->copyno_) ); 
00020   
00021 }                                        
00022 
00023      
00024 int DDExpandedNode::copyno() const 
00025 { 
00026   return posd_->copyno_; 
00027 }
00028 
00029 #include <ostream>
00030 
00031 std::ostream & operator<<(std::ostream & os, const DDExpandedNode & n)
00032 {
00033   os << n.logicalPart().name() 
00034      << '[' << n.copyno() << ']';
00035      //<< ',' << n.siblingno()  << ']';
00036   return os;
00037 }
00038 
00039 
00040 std::ostream & operator<<(std::ostream & os, const DDGeoHistory & h)
00041 {
00042    DDGeoHistory::const_iterator it = h.begin();
00043    for (; it != h.end(); ++it) {
00044      os << '/' << *it;
00045    }
00046    return os;
00047 }
00048