~durga/maus/rel709

« back to all changes in this revision

Viewing changes to src/common_py/geometry/GDMLtoCDB.py

  • Committer: Adam Dobbs
  • Date: 2014-12-11 13:26:05 UTC
  • mfrom: (659.1.96 release-candidate)
  • Revision ID: phuccj@gmail.com-20141211132605-6g6j2927elggi2q6
Tags: MAUS-v0.9.2
MAUS-v0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
            raise OSError('Path '+download_path+' does not exist')
252
252
        downloaded_file = self.geometry_cdb.get_gdml_for_run(long(run_num))
253
253
        self.download_beamline_for_run(run_num, download_path)
 
254
        # To be included with an update to the cdb application
 
255
        # self.download_coolingchannel_for_run(run_num, download_path)
254
256
        self.__write_zip_file(download_path, downloaded_file)
255
257
 
256
258
    def __write_zip_file(self, path_to_file, output_string): #pylint: disable = R0201, C0301
301
303
            fout.write(downloadedfile)
302
304
            fout.close()
303
305
 
 
306
  
 
307
    # def download_coolingchannel_for_run(self, run_id, downloadpath): 
 
308
    #                                  #pylint: disable = R0201, C0301
 
309
    #    """
 
310
    #    @Method download geometry for run 
 
311
 
 
312
    #    This method gets the geometry, for the given run number, from the 
 
313
    #    database then passes the string to the unpack method which unpacks it.
 
314
    #    
 
315
    #    @param  id The long ID run number for the desired geometry.
 
316
    #    @param  downloadedpath The path location where the files will be 
 
317
    #                           unpacked to.
 
318
    #    """
 
319
    #    if os.path.exists(downloadpath) == False:
 
320
    #        raise OSError('Path '+downloadpath+' does not exist')
 
321
    #    else:        
 
322
    #        coolingchannel_cdb = cdb.CoolingChannel()
 
323
    #        downloadedfile = \
 
324
    #                     coolingchannel_cdb.get_coolingchannel_for_run(run_id)
 
325
    #        path = downloadpath + '/CoolingChannelInfo.gdml'
 
326
    #        fout = open(path, 'w')
 
327
    #        fout.write(str(downloadedfile))
 
328
    #        fout.close()
 
329