// From it two derived concrete representation of alignment object class
// (AliAlignObjAngles, AliAlignObjMatrix) are derived in separate files.
//-----------------------------------------------------------------
+
+#include <TClass.h>
#include <TGeoManager.h>
#include <TGeoPhysicalNode.h>
#include <TMath.h>
path = pne->GetTitle();
node = gGeoManager->MakeAlignablePN(pne);
}else{
- AliWarning(Form("The symbolic volume name %s does not correspond to a physical entry. Using it as a volume path!",symname));
+ AliDebug(1,Form("The symbolic volume name %s does not correspond to a physical entry. Using it as a volume path!",symname));
path=symname;
if (!gGeoManager->CheckPath(path)) {
- AliError(Form("Volume path %s not valid!",path));
+ AliDebug(1,Form("Volume path %s not valid!",path));
return kFALSE;
}
if (gGeoManager->GetListOfPhysicalNodes()->FindObject(path)) {
return kFALSE;
}
- TString pathStr = path;
- TObjArray *pathArr = pathStr.Tokenize('/');
- TIter iter(pathArr);
- TString nodeStr = "";
m.Clear();
- TObjString *str = NULL;
- while((str = (TObjString*) iter.Next())){
- nodeStr.Append("/");
- nodeStr.Append(str->String());
+ TIter next(gGeoManager->GetListOfPhysicalNodes());
+ gGeoManager->cd(path);
+
+ while(gGeoManager->GetLevel()){
+
+ TGeoPhysicalNode *physNode = NULL;
+ next.Reset();
+ TGeoNode *node = gGeoManager->GetCurrentNode();
+ while ((physNode=(TGeoPhysicalNode*)next()))
+ if (physNode->GetNode() == node) break;
TGeoMatrix *lm = NULL;
- if (TGeoPhysicalNode *physNode = (TGeoPhysicalNode *)gGeoManager->GetListOfPhysicalNodes()->FindObject(nodeStr.Data())) {
+ if (physNode) {
lm = physNode->GetOriginalMatrix();
- if (!lm) lm = physNode->GetNode()->GetMatrix();
- }
- else {
- gGeoManager->cd(nodeStr.Data());
- TGeoNode *node = gGeoManager->GetCurrentNode();
+ if (!lm) lm = node->GetMatrix();
+ } else
lm = node->GetMatrix();
- }
- m.Multiply(lm);
- }
- delete pathArr;
+ m.MultiplyLeft(lm);
+
+ gGeoManager->CdUp();
+ }
return kTRUE;
}
/********************* HMPID layer ***********************/
{
TString str = "/HMPID/Chamber";
- TString symname;
for (modnum=0; modnum < 7; modnum++) {
symname = str;