Download presentation
Presentation is loading. Please wait.
Published byAlan Lee Modified over 9 years ago
1
CERN Summer Students 2011 : Project presentation CERN – PH/SFT – 05/09/2011
2
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesIntroduction Project Presentation CERN – PH/SFT group Summer Students 2011 Presentation outline Introduction Axis painting The TGaxis class Issues and requirements about TGaxis Very difficult to maintain Some display bugs Critical class : heavily used New design of TGaxis Philosophy Structure of painting functions Data members and options New functionalities Perspectives What has been done ? To-do list Conclusion
3
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesIntroduction Project Presentation CERN – PH/SFT group Summer Students 2011 Axis in ROOT Axis definition and data : TAxis class Axis painting : TGaxis class TGaxis is used to paint axis in every plot/histogram with ROOT Example of axis paint with TGaxis Example of an histogram in ROOT
4
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesIntroduction Project Presentation CERN – PH/SFT group Summer Students 2011 The TGaxis class Performance is a critical issue Inherited from TLine (axis body, tickmarks) & TAttText (title, labels) Several components : body, title, tickmarks, labels, grid Many options Axis type : linear, logarithmic, alphanumeric, time axis.... Directions : horizontal, vertical, perpendicular or vertical tickmarks... Painting options : ticks on both sides, no labels, labels format... Flags : optimize limits...
5
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesIssues and requirements Project Presentation CERN – PH/SFT group Summer Students 2011 Issues But... translated from FORTRAN and then modified to add some options and to correct some odd behaviors All in one single function : PaintAxis (~1600 lines) Very complex structure and options management Consequences : hard to maintain and to add new features
6
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesIssues and requirements Project Presentation CERN – PH/SFT group Summer Students 2011 What does PaintAxis look like ? A small part of the current PaintAxis conditions flowchart
7
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesIssues and requirements Project Presentation CERN – PH/SFT group Summer Students 2011 Goals and requirements Rewrite a clean and easier-to-maintain structure for TGaxis Strict backward compatibility with the original class (Paints exactly the same result for the same options) No performances lost (speed, memory usage) Main ideas of the new structure : Separate the axis computation from the axis painting One painting function per axis type Easy management of options
8
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesThe new design Project Presentation CERN – PH/SFT group Summer Students 2011 Structure of the new TGaxis
9
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectivesThe new design Project Presentation CERN – PH/SFT group Summer Students 2011 Painting the axis label tickmark position along the axis [0-1] given by the tick list distance from the axis (ONC) offset length of the tickmark (ONC) angle of the tickmark (cos, sin) axis label tickmark position along the axis [0-1] given by the tick list distance from the axis (ONC) offset length of the tickmark (ONC) angle of the tickmark (cos, sin) axis rotation All is now computed in OrthoNormal Coordinates 0 1 1 01 1 Problem of tickmarks rotation because of the ROOT NDC coordinates
10
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectives Project Presentation CERN – PH/SFT group Summer Students 2011 Done and to-do list
11
Vincent Reverdy – Supervisor : Olivier Couet – 05/09/2011 IntroductionIssues and requirementsThe new designPerspectives Project Presentation CERN – PH/SFT group Summer Students 2011 Conclusion and perspectives Work done New structure design Data members reorganization to create a flexible class PaintAxis rewrite (unfolding the conditions flowchart was by far the more difficult task) Bypass the ROOT NDC coordinates to avoid tickmarks rendering problems Status Linear and logarithmic axis almost completed Alphanumeric and time axis are being implemented No problem to complete the rewriting by an extra week of work Many thanks to Olivier Couet and to all the Summer Students Team ! Improvements New options easy to implement with the static data members Clean new function organisation for enhanced maintainability
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.