#include "DetectorDescription/Core/interface/DDalgoPosPart.h"
#include "DetectorDescription/Core/interface/DDPosPart.h"
#include "DetectorDescription/Core/interface/DDLogicalPart.h"
#include "DetectorDescription/Core/interface/DDAlgo.h"
#include "DetectorDescription/Base/interface/DDException.h"
#include "DetectorDescription/ExprAlgo/interface/AlgoPos.h"
Go to the source code of this file.
Functions | |
void | DDalgoPosPart (const DDLogicalPart &self, const DDLogicalPart &parent, DDAlgo &algo) |
void | DDalgoPosPart (const DDName &self, const DDName &parent, DDAlgo &algo) |
void DDalgoPosPart | ( | const DDLogicalPart & | self, | |
const DDLogicalPart & | parent, | |||
DDAlgo & | algo | |||
) |
algorithmic positioning
Definition at line 25 of file DDalgoPosPart.cc.
References DDanonymousRot(), DDBase< N, C >::ddname(), DDpos(), e, DDAlgo::go(), SurfaceOrientation::inner, DDAlgo::label(), DDName::name(), DDBase< N, C >::name(), DDAlgo::next(), DDName::ns(), DDBase< N, C >::rep(), DDAlgo::rotation(), and DDAlgo::translation().
Referenced by DDalgoPosPart(), and DDLAlgoPosPart::processElement().
00029 { 00030 static int cnt_=0; 00031 ++cnt_; 00032 if (algo.rep().numRegistered() == 0) { 00033 std::string e; 00034 e = "DDalgoPosPart: algorithmic positioning\n"; 00035 e += "\t[" + algo.name().ns() 00036 + ":" 00037 + algo.name().name() 00038 + "] is not defined!\n"; 00039 throw DDException(e); 00040 00041 // if (!algo) { 00042 // std::string e; 00043 // e = "DDalgoPosPart: algorithmic positioning\n"; 00044 // e += "\t[" + algo.ns() + ":" + algo.name() + "] is not defined!\n"; 00045 // throw DDException(e); 00046 } 00047 00048 //LogDebug ("AlgoPos") << "AlgoPos, algo=" << std::endl << algo << std::endl; 00049 int inner=0; 00050 do { 00051 //FIXME: DDalgoPosPart: better solution for rotation matrices!!! 00052 //FIXME: find out about unit-rotations! 00053 /* 00054 ++inner; 00055 char buf_ns [20]; 00056 char buf_nm [20]; 00057 sprintf(buf_ns,"%d",cnt_) ; sprintf(buf_nm,"%d",inner); 00058 std::string ns(buf_ns) ; std::string nm(buf_nm); 00059 */ 00060 ++inner; 00061 DDRotationMatrix * rmp = new DDRotationMatrix(algo.rotation()); 00062 DDRotation anonymRot = DDanonymousRot(rmp); 00063 DDpos(self.ddname(), parent.ddname(), 00064 algo.label(), algo.translation(), anonymRot); 00065 algo.next(); 00066 } 00067 while(algo.go()); 00068 }
deprecated, use the alternatve DDalgoPosPart
Definition at line 14 of file DDalgoPosPart.cc.
References DDalgoPosPart().
00018 { 00019 DDalgoPosPart(DDLogicalPart(self), 00020 DDLogicalPart(parent), 00021 algo); 00022 }