Ticket #3189 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

LoadLog move raw file processing to LoadRaw

Reported by: Nick Draper Owned by: Jay Rainey
Priority: major Milestone: Release 3.0
Component: Framework Keywords: Student,Challenging
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description (last modified by Jay Rainey) (diff)

LoadLog should just load the log files

Change History

comment:1 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 29 to Iteration 30

"New" tickets moved at the code freeze of iteration 29

comment:2 Changed 9 years ago by Nick Draper

  • Status changed from new to assigned
  • Owner set to Anyone

comment:3 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 30 to Iteration 31

Bulk move of tickets to iteration 31 at the iteration 30 code freeze

comment:4 Changed 9 years ago by Nick Draper

  • Milestone changed from Iteration 32 to Iteration 33

Moved to iteration 33 at iteration 32 code freeze

comment:5 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.1 to Release 2.2

Moved at end of release 2.1

comment:6 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.2 to Release 2.3

Moved at the end of release 2.2

comment:7 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.3 to Release 2.4

Moved to milestone 2.4

comment:8 Changed 8 years ago by Nick Draper

  • Milestone changed from Release 2.4 to Release 2.5

Moved at the code freeze for release 2.4

comment:9 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:10 Changed 7 years ago by Nick Draper

  • Keywords Student added

comment:11 Changed 7 years ago by Martyn Gigg

  • Keywords Student,Challenging added; Student removed

comment:12 Changed 7 years ago by Martyn Gigg

  • Owner changed from Anyone to Jay Rainey

comment:13 Changed 7 years ago by Jay Rainey

  • Status changed from assigned to accepted

comment:14 Changed 7 years ago by Nick Draper

  • Status changed from accepted to assigned

comment:15 Changed 7 years ago by Jay Rainey

Refs #3189. Transferred relevant methods needed to searchForLogFiles.

Changeset: 2ef693c3ca30632629100750fdd4b29ff73ada14

comment:16 Changed 7 years ago by Jay Rainey

Checkpointing work. Refs #3189.

Changeset: aee208ba35ff709f379fe7c240355c63b4d75e3d

comment:17 Changed 7 years ago by Jay Rainey

Checkpointing work. Refs #3189.

Changeset: f81f59e33c8e08570f630e3cb38b71a3cbc071c3

comment:18 Changed 7 years ago by Jay Rainey

Checkpointing work. Refs #3189.

Changeset: c66a5152d7f197f86b6a761e3c68035c84345365

comment:19 Changed 7 years ago by Jay Rainey

Moved searching from loadLog to loadRawHelper. Refs #3189.

Changeset: 5af65b7951349d3729fdda67c7b525e28e78d68c

comment:20 Changed 7 years ago by Jay Rainey

Refactored loadLog. Refs #3189.

Changeset: 50de102814608013c0a4b281f8110bdac084e950

comment:21 Changed 7 years ago by Jay Rainey

Modified formatting of LoadLog. Refs #3189.

Changeset: dec330f5d30efa52f3b8d059fc5f41dde02056ba

comment:22 Changed 7 years ago by Jay Rainey

Modified loadLog tests, and commented loadLog.h. Refs #3189.

Changeset: 6e3c629efd9055546b11f6feddaeec0b95b6d511

comment:23 Changed 7 years ago by Jay Rainey

Updated LoadRaw3Test with related loadLog tests. Refs #3189.

Changeset: cc394e8380361c431f1b402feee0f89aeff57bba

comment:24 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:25 Changed 7 years ago by Jay Rainey

  • Status changed from new to inprogress

Added additional tests to loadRaw3Test. Refs #3189.

Changeset: 7199b24884700ea80d93be9296f25150f32a6ef4

comment:26 Changed 7 years ago by Jay Rainey

Load raw now passes tests. Refs #3189.

Changeset: e809ed9d9b2f78c36ee8d79b785d5a31dfad4ac4

comment:27 Changed 7 years ago by Jay Rainey

Refactored loadLog. Should only load files - no searching. Refs #3189.

Changeset: 0214ce0bfe41d0e99d7f543d9bb19e050b84791b

comment:28 Changed 7 years ago by Jay Rainey

Added additional tests to loadRaw3Test. Refs #3189.

Changeset: 7199b24884700ea80d93be9296f25150f32a6ef4

comment:29 Changed 7 years ago by Jay Rainey

Load raw now passes tests. Refs #3189.

Changeset: e809ed9d9b2f78c36ee8d79b785d5a31dfad4ac4

comment:30 Changed 7 years ago by Jay Rainey

Refactored loadLog. Should only load files - no searching. Refs #3189.

Changeset: 0214ce0bfe41d0e99d7f543d9bb19e050b84791b

comment:31 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:32 Changed 7 years ago by Jay Rainey

Further refactored LoadLog. Refs #3189

Changeset: 7f1330067d1e22eded39c6f16b540ab7ad52080e

comment:33 Changed 7 years ago by Jay Rainey

Fixed exception handling errors. Refs #3189

Changeset: 206b997b75b7761f563a2139b0e32c4f168697c3

comment:34 Changed 7 years ago by Jay Rainey

Now correctly removes extension after right most period. Refs #3189

Changeset: e73e8fa85883ed706d7ee3b18f6a204ab2ebd645

comment:35 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed
  • Description modified (diff)

comment:36 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:37 Changed 7 years ago by Jay Rainey

  • Description modified (diff)

comment:38 Changed 7 years ago by Jay Rainey

The problem was that lots of searching functionality occurred inside the loadLog class. This has been refactored, and moved to loadRawHelper class. Functionality remains the same, and should be tested as such:

  • Load a .raw file into the workspace that has a relevant log file (such as OFFSPEC00004622.raw).
  • Verify that the log data has successfully loaded into the workspace by right clicking a workspace, and Sample logs... You can verify that the data is loaded correctly by looking at the files on your machine, and seeing that each has loaded as expected.
  • Under Algorithms execute the LoadLog method, and add a log file to the current work space. Verify that it has loaded as expected. Also, run the LoadRaw method, adding the data to the workspace. Verify the log data was also added correctly, then try adding new log data as mentioned above.

comment:39 Changed 7 years ago by Martyn Gigg

  • Milestone changed from Release 2.6 to Release 3.0

comment:40 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Everything seems to function as expected.

There are, however, some code improvements that I think can be made. All minor but worth doing now:

  • In LoadLog.cpp, remove the extensions *.raw,*.s, *.add from LoadLog::init
  • In LoadRawHelper.h, remove "bool LoadSNSText();" from the header as it is not used.
  • In LoadRawHelper.h, change getLogfilenamesfromADS to getLogFilenamesfromADS, so that it follows the camelCase naming convention
  • In LoadRawHelper.h, extractLogName should take the argument by const reference, i.e extractLogName(const std::string & path) (you'll need to change the .cpp too)
  • In LoadLog.h, extractLogName should take the vector by const reference, i.e extractLogName(const std::vector<std::string> & logName)
  • In LoadRawHelper.cpp, remove any mention of SNS. They don't do raw files
  • In LoadRawHelper.{h,cpp}, remove the m_filename member variable then make getLogFilenamesfromADS & adsExists() take a filename argument rather than using m_filename. This is more consistent with the rest of the class. Also remove all references to m_filename in searchForLogFiles

comment:41 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

comment:42 Changed 7 years ago by Jay Rainey

Fixed minor inconsistencies. Refs #3189.

Changeset: 22f7e04d3715b1d43a2aaa0aa29a6223844195bf

comment:43 Changed 7 years ago by Jay Rainey

Prevent unreferenced local variable warning in windows. Refs #3189.

Changeset: 3f3b05c0ae504ff36cf64c44cd750d7693989a0a

comment:44 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed

In order to test this, follow the instructions above & perform a code review.

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:45 Changed 7 years ago by Russell Taylor

  • Status changed from verify to reopened
  • Resolution fixed deleted

Please fix this GCC compiler warning and then re-close:

LoadRawHelper.cpp:1181: warning: unused parameter ‘pathToFile’

comment:46 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

Suppressed unused parameter GCC warning. Refs #3189.

Changeset: 44a3380b2466b0ec8c75aa9b3bfce76c13c43bff

comment:47 Changed 7 years ago by Jay Rainey

Remove accidently added comment. Refs #3189

Changeset: 00101ffbb986e61fda60194d1bf2029f80c98d02

comment:48 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed

In order to test this, see above, ensure Martyn's suggestions have been introduced, and Russell's ​reply to ensure GCC compiler warning has been dealt with.

comment:49 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:50 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

One more minor thing:

  • The LoadLog extensions are still not quite right. It should be .log & .txt

comment:51 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

Replaced add extension with log. Refs #3189.

Changeset: 441846c976e649f84a1b802e2972430e79559bec

comment:52 Changed 7 years ago by Jay Rainey

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:53 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:54 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/3189_refactor_loadLog_processing_to_loadRawHelper'

comment:55 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4036

Note: See TracTickets for help on using tickets.