Esempio n. 1
0
    def __LoadPeriodsFromAmi(self, Y):
        from ClusterSubmission.AMIDataBase import getAmiClient
        getAmiClient()

        import pyAMI.client
        import pyAMI.atlas.api as AtlasAPI

        if Y in self.GetYears(): return

        self.__Periods[Y] = []
        PeriodDict = AtlasAPI.list_dataperiods(getAmiClient(), 1, year=Y)

        for period_entry in PeriodDict:
            P = str(period_entry["period"])
            ### We do not need the Van-Der-Meer scan periods. They are not of any use for
            ### data analysis
            if P.find("VdM") != -1: continue
            period_storage = Period(year=Y, period=P, project=period_entry["projectName"])
            self.__Periods[Y] += [period_storage]

        ### Now load the runs from the total year
        RunDict = AtlasAPI.list_runs(getAmiClient(), data_periods=[], year=Y)
        for run in RunDict:
            if run["period"].find("VdM") != -1: continue
            ## Order them into the period holders
            R = int(run['runNumber'])
            storage = self.__FindPeriod(Y=Y, period=run["period"], project=run["projectName"])
            if storage: storage.addRun(R)

        for P in self.__Periods[Y]:
            P.finish()
        ### Sort the periods finally
        self.__Periods[Y] = sorted(self.__Periods[Y], key=lambda P: P.period())
        logging.info("Found %d runs in year %d" % (len(self.GetRunsFromPeriod(Y)), Y))
Esempio n. 2
0
def doData15():
    grl15 = '/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data15_13TeV/20160720/physics_25ns_20.7.xml'
    c1 = config1('data15_13TeV', 'MUON0', 'A', sTag='grp15_v01_', acceptTags=None, autoCreate=False, grl=None)
    c1.outScript = 'createIt_15v2.sh'

    periods = AtlasAPI.list_dataperiods(client, 2, 15)
    c1.project = 'data15_13TeV'
    c1.sTag='grp15_v02_'
    c1.acceptTags=['p2889']
    c1.grl = grl15

    pds =[p['period'] for p in periods if p['status']=='frozen']
#     print (pds)
#     sys.exit(0)

    for p in pds:
        for d in ['MUON0','MUON1','MUON2','MUON3']:
            c1.period = p
            c1.derivation = d
            makeContainer(c1)
Esempio n. 3
0
def do2016LaterPeriods():
    grl16 = '/cvmfs/atlas.cern.ch/repo/sw/database/GroupData/GoodRunsLists/data16_13TeV/20161101/physics_25ns_20.7_ignoreToroidStatus.xml'
    c1 = config1('data16_13TeV', 'MUON0', 'A', sTag='grp16_v01_', acceptTags=['p2769','p2689','p2667'], autoCreate=False, grl=grl16)
    c1.outScript = 'createIt_16Later2.sh'

    periods = AtlasAPI.list_dataperiods(client, 2, 16)

    c1.project = 'data16_13TeV'
    c1.sTag='grp16_v01_'
    c1.acceptTags=None
    c1.grl = grl16

#     pds =[p['period'] for p in periods if p['status']=='frozen']
#     print (pds)
#     sys.exit(0)
    pds = ['J', 'K', 'L']

    for p in pds:
        for d in ['MUON0','MUON1','MUON2','MUON3']:
            c1.period = p
            c1.derivation = d
            makeContainer(c1)