~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to bin/utilities/execute_MC.py

  • Committer: Christopher Hunt
  • Date: 2015-06-18 14:48:59 UTC
  • mfrom: (697.69.1 merge)
  • mto: (697.69.2 merge_hunt)
  • mto: This revision was merged to the branch mainline in revision 708.
  • Revision ID: christopher.hunt08@imperial.ac.uk-20150618144859-rki5ma1lv8722w41
Merged in latest trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
                        help='MC Serial number for configuration DB',\
94
94
                        default=0)
95
95
    parser.add_argument('--geometry-id', dest='geoid', \
96
 
                        help='The simulation geometry ID number',\
97
 
                        required=True)
 
96
                        help='The simulation geometry ID number') # ,\
 
97
                        # required=True)
98
98
    return parser
99
99
 
100
100
class DownloadError(Exception):
230
230
                    else:
231
231
                        mcs_service = cdb.MCSerialNumber()
232
232
                    print "    Found, accessing cards"
233
 
                    mc_cards = mcs_service.get_datacards(bi_number)['mc']
 
233
                    mc_cards = mcs_service.get_datacards(bi_number)['data']
234
234
                    if mc_cards == 'null':
235
235
                        raise DownloadError(
236
236
                            "No MC cards for batch iteration number "+str(bi_number))
264
264
        """
265
265
        print 'Getting geometry'
266
266
        download = [os.path.join(self.run_setup.maus_root_dir, 'bin', \
267
 
                                 'utilities', 'download_fit_geometry.py')]
 
267
                                 'utilities', 'download_geometry.py')]
268
268
        # check that there is a selection for the geometry in the datacards
269
269
        download += self.run_setup.get_download_parameters()
270
270
        proc = subprocess.Popen(download, stdout=self.logs.download_log, \
276
276
            test_path_out = os.path.join(self.run_setup.download_target, \
277
277
                                                       'ParentGeometryFile.dat')
278
278
            shutil.copy(test_path_in, test_path_out)
279
 
        elif proc.returncode != 0:
 
279
        if proc.returncode != 0:
280
280
            raise DownloadError("Failed to download geometry successfully")
281
281
 
282
282
 
479
479
                '-configuration_file','sim.cards'
480
480
                ]
481
481
        # otherwise, use the default download parameters.
 
482
        #                 '-cdb_download_url', 'http://preprodcdb.mice.rl.ac.uk/cdb/',
482
483
        else:
483
484
            params = [
484
485
                '-geometry_download_id', str(self.geometry_id),