Exemplo n.º 1
0
 def _createDBSFile(self, blockName, dbsFile={}):
     run = GlobalParams.getRunNumberForBlock(blockName)
     defaultDBSFile = {
         'Checksum':
         "123456",
         'NumberOfEvents':
         GlobalParams.numOfEventsPerFile(),
         'FileSize':
         GlobalParams.sizeOfFile(),
         'ParentList': [],
         # assign run and lumi numbers in appropriate range: note run numbers
         #  for successive blocks may overlap if numOfRunsPerFile() > 1
         'LumiList': [
             {
                 'RunNumber':
                 int(
                     round((1. * lumi *
                            (GlobalParams.numOfRunsPerFile() - 1) /
                            GlobalParams.numOfLumisPerBlock()) + run)
                 ),  #random.randint(run, run + GlobalParams.numOfRunsPerFile() -1),
                 'LumiSectionNumber':
                 run * (GlobalParams.numOfLumisPerBlock()) + lumi - 1
             } for lumi in range(GlobalParams.numOfLumisPerBlock())
         ]
     }
     defaultDBSFile.update(dbsFile)
     return defaultDBSFile
Exemplo n.º 2
0
 def _createDBSFile(self, blockName, dbsFile = {}):
     run =  GlobalParams.getRunNumberForBlock(blockName)
     defaultDBSFile = {'Checksum': "123456",
                       'NumberOfEvents': GlobalParams.numOfEventsPerFile(),
                       'FileSize': GlobalParams.sizeOfFile(),
                       'ParentList': [],
                       # assign run and lumi numbers in appropriate range: note run numbers
                       #  for successive blocks may overlap if numOfRunsPerFile() > 1
                       'LumiList': [{'RunNumber': int(round((1. * lumi * (GlobalParams.numOfRunsPerFile() - 1) / GlobalParams.numOfLumisPerBlock()) + run)),     #random.randint(run, run + GlobalParams.numOfRunsPerFile() -1),
                                     'LumiSectionNumber': run*(GlobalParams.numOfLumisPerBlock()) + lumi -1}
                                    for lumi in range(GlobalParams.numOfLumisPerBlock())]
                       }
     defaultDBSFile.update(dbsFile)
     return defaultDBSFile
Exemplo n.º 3
0
    def _createDBSFile(self, blockName, dbsFile = {}):
        run =  GlobalParams.getRunNumberForBlock(blockName)
        defaultDBSFile = {'Checksum': "123456",
                          'NumberOfEvents': GlobalParams.numOfEventsPerFile(),
                          'FileSize': GlobalParams.sizeOfFile(),
                          'ParentList': [],
                         }
        lumiList = []

        for run in xrange(1, GlobalParams.numOfRunsPerFile() + 1):
            lumiList.append(
                {run:[run*(GlobalParams.numOfLumisPerBlock()) + lumi -1
                        for lumi in range(GlobalParams.numOfLumisPerBlock())]
                })

        defaultDBSFile.update({'LumiList':lumiList})
        defaultDBSFile.update(dbsFile)

        return defaultDBSFile
Exemplo n.º 4
0
    def _createDBSFile(self, blockName, dbsFile={}):
        run = GlobalParams.getRunNumberForBlock(blockName)
        defaultDBSFile = {
            'Checksum': "123456",
            'NumberOfEvents': GlobalParams.numOfEventsPerFile(),
            'FileSize': GlobalParams.sizeOfFile(),
            'ParentList': [],
        }
        lumiList = []

        for run in xrange(1, GlobalParams.numOfRunsPerFile() + 1):
            lumiList.append({
                run: [
                    run * (GlobalParams.numOfLumisPerBlock()) + lumi - 1
                    for lumi in range(GlobalParams.numOfLumisPerBlock())
                ]
            })

        defaultDBSFile.update({'LumiList': lumiList})
        defaultDBSFile.update(dbsFile)

        return defaultDBSFile