def add_log(self):
     print 'add log'
     r = dictCreater.dictCreater('config/')
     self.ignored_runs = r.get_ignored_runs()
     self.ignored_testbeams = r.get_ignored_testbeams()
     listed = r.get_combined_list()
     for key in listed:
         if key in self.runList:
             self.runList[key].update(listed[key])
             print '\n', key, self.runList[key]
             if self.runList[key]['keys']:
                 self.runList[key]['keys'] = []
         else:
             print 'no key ', key
    def create_tables(self):
        print 'Create Tables: '
        if self.update_crosstalk_factors:
            print ' * update correction factors'
            correctionFactor.update_crosstalk_factors(self.config.get('Results', 'inputDir'))

        print ' * read dictionaries'
        mapper = dictCreater.dictCreater(self.config_dir)
        self.map = mapper.get_combined_list()

        print ' * get file list'
        result_reader = ResultReader.ResultReader(self.config,self.map)
        self.results = result_reader.GetResults()
        #raw_input(self.results)
        self.set_csv_mapping()
예제 #3
0
    def create_tables(self):
        if self.update_crosstalk_factors:
            print 'update correction factors'
            correctionFactor.update_crosstalk_factors(self.config.get('Results', 'inputDir'))

        print 'read dictionaries'
        mapper = dictCreater.dictCreater(self.config_dir)
        self.map = mapper.get_combined_list()

        print 'get file list'
        # get list of files wich starts with 'results'
        file_list = utilities.list_files(self.config.get('Results', 'inputDir'), 'results')
        if self.verbosity:
            print 'staring list', file_list
        self.file_list = [i for i in file_list if i.endswith('.res') and '_new' in i]
        # print 'updated file list ', self.file_list
        self.results = self.read_result_config()
        self.set_csv_mapping()
    def __init__(self,config_dir,pickle_file = None):
        self.config_dir = config_dir
        self.config_file_name = config_dir + '/creation.ini'
        self.config = ConfigParser.ConfigParser()
        self.config.read(self.config_file_name)
        self.update_crosstalk_factors = True

        print ' * read dictionaries'
        mapper = dictCreater.dictCreater(self.config_dir)
        self.beam_infos = mapper.get_combined_list()
        self.result_reader = ResultReader.ResultReader(self.config,self.beam_infos)
        self.results = self.result_reader.GetResults()
        try:
            pickle_file = open('results.pkl', 'wb')
            print pickle_file,self.results
            pickle.dump(self.results, pickle_file)
            pickle_file = open('beam_infos.pkl', 'wb')
            pickle.dump(self.beam_infos, pickle_file)
        except Exception as e:
            print e
        self.ignore_runs = [19008,19010]
        self.radiations=radiations.radiations()