gem/oq-engine — pull request #844 by larsbutler (2012-08-22 16:28:08+00:00)
Title: More event-based calc fixes

After discussing things with Dr. Monelli (while working on GMF serialization/export), we discovered a handful of issues in the event-based calculator.

The changes here include:
- Better sample files for the `event_based_hazard` demo (the previous files wouldn't generate any ruptures)
- Some fixes to subtle generator bugs in the task code
- Better transaction handling for GMF db record creation (with the `BulkInserter`, there was a case where the record were never saved properly)
- GMF sets: Previously, the code was assuming only 1 gmf collection and 1 gmf set per logic tree sample; this is not correct. Instead there should be 1 gmf collection and N gmf sets per logic tree sample, where N is the number of stochastic events per sample (the parameter `ses_per_logic_tree_path`).