Skip to content

Commit

Permalink
Also components have to restore their cache:
Browse files Browse the repository at this point in the history
Otherwise problems in time dependent alignment of large structures only,
i.e. without simultaneous DetUnit alignment.
  • Loading branch information
Gero Flucke committed Dec 11, 2012
1 parent 8687059 commit 70f4139
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Alignment/CommonAlignment/interface/Alignable.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class SurfaceDeformation;
* Any Alignable object can be moved and rotated.
* Also an alignment uncertainty can be set.
*
* $Date: 2011/05/23 20:53:16 $
* $Revision: 1.35 $
* $Date: 2011/09/19 11:42:35 $
* $Revision: 1.36 $
* (last update by $Author: mussgill $)
*/

Expand Down Expand Up @@ -198,7 +198,7 @@ class Alignable
/// cache the current position, rotation and other parameters (e.g. surface deformations)
virtual void cacheTransformation();

/// restore the previously cached transformation
/// restore the previously cached transformation, also for possible components
virtual void restoreCachedTransformation();

/// Return survey info
Expand Down
13 changes: 11 additions & 2 deletions Alignment/CommonAlignment/src/Alignable.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** \file Alignable.cc
*
* $Date: 2010/10/29 12:20:22 $
* $Revision: 1.21 $
* $Date: 2011/05/23 20:53:18 $
* $Revision: 1.22 $
* (last update by $Author: mussgill $)
*/

Expand Down Expand Up @@ -250,9 +250,18 @@ void Alignable::cacheTransformation()

void Alignable::restoreCachedTransformation()
{
// first treat itself
theSurface = theCachedSurface;
theDisplacement = theCachedDisplacement;
theRotation = theCachedRotation;

// now treat components (a clean design would move that to AlignableComposite...)
const Alignables comps(this->components());

for (auto it = comps.begin(); it != comps.end(); ++it) {
(*it)->restoreCachedTransformation();
}

}

//__________________________________________________________________________________________________
Expand Down

0 comments on commit 70f4139

Please sign in to comment.