Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:56

0001 #include "DetectorDescription/Core/interface/DDExpandedNode.h"
0002 
0003 #include <cassert>
0004 #include <ostream>
0005 
0006 #include "DetectorDescription/Core/interface/DDBase.h"
0007 #include "DetectorDescription/Core/interface/DDName.h"
0008 #include "DetectorDescription/Core/interface/DDPosData.h"
0009 
0010 DDExpandedNode::DDExpandedNode(
0011     const DDLogicalPart& lp, const DDPosData* pd, const DDTranslation& t, const DDRotationMatrix& r, int siblingno)
0012     : logp_(lp), posd_(pd), trans_(t), rot_(r), siblingno_(siblingno) {}
0013 
0014 DDExpandedNode::~DDExpandedNode() {}
0015 
0016 bool DDExpandedNode::operator==(const DDExpandedNode& n) const {
0017   return ((logp_ == n.logp_) && (posd_->copyno() == n.posd_->copyno()));
0018 }
0019 
0020 int DDExpandedNode::copyno() const {
0021   assert(posd_);
0022   return posd_->copyno();
0023 }
0024 
0025 std::ostream& operator<<(std::ostream& os, const DDExpandedNode& n) {
0026   os << n.logicalPart().name() << '[' << n.copyno() << ']';
0027   return os;
0028 }
0029 
0030 std::ostream& operator<<(std::ostream& os, const DDGeoHistory& h) {
0031   for (const auto& it : h) {
0032     os << '/' << it;
0033   }
0034   return os;
0035 }