Ticket #58 (closed: fixed)

Opened 13 years ago

Last modified 5 years ago

Workspace history

Reported by: Nick Draper Owned by: Dickon Champion
Priority: minor Milestone: Iteration 5
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description

Create a History set of objects for a workspace (I have a uml diagram for ideas on the objects required).

You will have to extend the workspace factory to require a parent workspace to be provided when creating a new workspace (the data loading algorithms should pass null). This can be used to take references to the same sample and instrument objects and duplicate the History.

The end of the Execute party of an algorithm should append details of the Algorithm being run (not child algorithms) to the History.

Change History

comment:1 Changed 13 years ago by Nick Draper

From duplicate #37 The history needs to contain several sections.

  1. An environment sections containing
    1. The version of Mantid
    2. The OS name and version
    3. The user name
  2. The algorithm History of a workspace (i.e. for every algorithm that has been run on this workspace of it's parents).
    1. The name and version of the algorithm
    2. The date and time applied
    3. The values of every alogirthm property
    4. How long the algorithm took to run

The majority of the History data filling can take place in the Workspace Factory. If we change the main factory method to take (string workspaceType, Workspace parentWorkspace, algorithm currentAlgorithm) then the workspace would have all of the info required to.

  1. Copy all of the History from the parentWorkspace to the new one
  2. Create a new algorithm History record from the current Algorithm

We may need to think later about how we handle branched histories. eg. WS1 = LoadRaw("file1") WS2 = LoadRaw("Vanadium2") WS3 = WS1/WS2 At this point WS3 would need to contain the history of both WS1 and WS2

comment:2 Changed 13 years ago by Nick Draper

  • Milestone changed from Iteration 3 to Iteration 4

comment:3 Changed 13 years ago by Nick Draper

  • Milestone changed from Iteration 4 to Iteration 5

comment:4 Changed 13 years ago by Nick Draper

  • Owner set to Dickon Champion

comment:5 Changed 13 years ago by Dickon Champion

(In [663]) AlgorithmParameter, AlgorithmHistory, EnvironmentHistory all added Algorithm::store changed to allow multiple out and multiple inout workspaces to be saved in the ADS, instead of breaking after a true result the loop continues.

history structure is built up according to the plan, with a history for one object containing all the constituent history processes on other workspaces

re #58

comment:6 Changed 13 years ago by Dickon Champion

(In [664]) WorkspaceHistory needs to be added to prevent all hell breaking loose!!!

re #58

comment:7 Changed 13 years ago by Dickon Champion

(In [674]) m_name has been removed from algorithm.h, instead a string is returned from the function my_algorithm.name(), this is a virtual function returning a const string which must be overloaded for all algorithms to compile. it is generally a one liner defined in the myalgorithm.h file

re #58

comment:8 Changed 13 years ago by Dickon Champion

(In [675]) on instructions from Matt deleting file (which is not used)

re #58

comment:9 Changed 13 years ago by Nick Draper

(In [676]) re #58 Fixed the test Algorithms.vcproj.CLRC.rrc79113.user Also reinserted the default implementations for name and version as windows was not happy with them being pure virtual.

comment:10 Changed 13 years ago by Dickon Champion

(In [682]) re #58

1)some doxygen additions 2)a change in Algorithm.h so that name() function is properly over-ridden 3)removal of redundant functions in WorkspaceHistory

comment:11 Changed 13 years ago by Dickon Champion

(In [682])

4) executionDate and executionDuration are also now time_t and a double respectively

comment:12 Changed 13 years ago by Dickon Champion

(In [685]) re #58

1) some doxygen additions 2) moving fillhistory() into execute() try loop in Algorithm.cpp so if it fails catch will be thrown and no attempt made to build history on failed algorithm execution

comment:13 Changed 13 years ago by Dickon Champion

(In [690]) re #58

1) Accessor functions defined, all in const some in non-const 2) relatively exhaustive test placed in DataObjects test space due to a requirement to have a fully instantiated DataObject, not just a base class

comment:14 Changed 13 years ago by Dickon Champion

(In [702]) re #58

1) created printSelf routines, which have been added into new tests for new objects 2) added DLLExport to printself() in some other objects in Geometry class as the function is defined out of the object

comment:15 Changed 13 years ago by Dickon Champion

(In [703]) re #58

added in a throw for an unknown direction, and removed unused variable

comment:16 Changed 13 years ago by Dickon Champion

(In [704]) re #58

try to fix linux build....

comment:17 Changed 13 years ago by Dickon Champion

(In [705]) re #58

try to fix linux build.... again

comment:18 Changed 13 years ago by Nick Draper

  • Status changed from new to closed
  • Resolution set to fixed

comment:19 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 906

Note: See TracTickets for help on using tickets.