if (len(userNIter)>0): print (" <RunIterator> #Iterations = ",Iterations) if userLBselection: print (" <RunIterator> LB range = ",userLBrangeFirst, " --> ", userLBrangeLast) ########################################################## # Datasets to use ########################################################## from InDetAlignExample.NewInDet_SetupData import setupData DataToRun = [] for i_sample in range(len(inputList)): print (" ") print (" ==== configuring sample #",i_sample) Data1 = setupData(eventType[i_sample]) #Need To be changed this one myDataType = "Data_15" + eventType[i_sample] #Data1.setDataType("MinBias_Data_15") # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setDataType(myDataType) # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now # number of CPUS to be used in each iteration to process this data type thisNCpus = int(nCpus[0]) if (len(nCpus) >= i_sample+1): thisNCpus = int(nCpus[i_sample]) Data1.setCPUs([thisNCpus,thisNCpus,thisNCpus,thisNCpus,thisNCpus,thisNCpus,thisNCpus,thisNCpus,thisNCpus,thisNCpus]) # number of events to be processed thisNEvents = int(nEventsMax[0]) if (len(nEventsMax) >= i_sample+1): thisNEvents = int(nEventsMax[i_sample])
for run in runlist: # # Delete the lines below if you dont have the # %s_IDTracks.txt file for each run ############### try: f = open("%s_IDTracks.txt"%(run),'r') except: continue numberCPUs = len(f.readlines())/filesPerCPU if numberCPUs == 0: numberCPUs = 1 f.close() ############### Data1.append(setupData('%s'%(run))) # line to replace Data1[counter].setDataType("IDTracks") Data1[counter].setRuns([run]) # line to replace Data1[counter].setCPUs([numberCPUs,numberCPUs]) # line to replace Data1[counter].setEvents([-1,-1]) Data1[counter].CreateFileList() Data1[counter].setGlobalTag("COMCOND-BLKPA-006-10") Data1[counter].setDetDescrVersion("ATLAS-GEO-20-19-01") DataToRun.append(Data1[counter]) counter += 1 print len(DataToRun), counter AlignmentMethod = "GX2" inputAlignmentPoolFile = "" doDetailedSplitting = False
# extra AtlasSetup options ASetupOptions = "single" # OutputLevel (DEBUG, INFO, VERBOSE) OutputLevel = 'DEBUG' ########################################################## # Datasets to use ########################################################## from InDetAlignExample.NewInDet_SetupData import setupData DataToRun = [] Data1 = setupData( '2010Test' ) # Name for the dataset, the output subpaths will have this name #Data1.setDataType("MC10_Singlemuons") # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setDataType( "IDTracks" ) # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setRuns([159224]) # Run number, you can provide a list of runs Data1.setCPUs([300, 250, 250, 300, 150, 150]) # Number of CPUs per iteration to process this data Data1.setEvents([-1, -1, -1, -1, 3000000, 3000000]) # Number of total events to process #Data1.setLimitFiles(20) # Limit the number of files to use (useful when runing in local a subset of data) Data1.CreateFileList() # Creates the file list ## Data1.setCustomFileList("filelist") # Use your own filelist, WARNING: comment the CreateFileList line Data1.setGlobalTag( "COMCOND-BLKPA-006-10"
inputList=config.inputList inputDir =config.inputDir eventType=config.eventType ConstantsFile=config.inputConstantsFile nEventsMax=config.nEvents preIBLgeometry=config.preIBLgeometry isData=config.isData ########################################################## # Datasets to use ########################################################## from InDetAlignExample.NewInDet_SetupData import setupData DataToRun = [] Data1 = setupData(eventType) #Need To be changed this one Data1.setDataType("Zmumu") # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now #Data1.setRuns([201280]) # Run number, you can provide a list of runs Data1.setCPUs([1,1,1]) # Number of CPUs per iteration to process this data #Data1.setEvents([5000,5000,5000]) # Number of total events to process Data1.setEvents([nEventsMax,nEventsMax,nEventsMax]) Data1.setLimitFiles(1) # Limit the number of files to use (useful when runing in local a subset of data) #Data1.CreateFileList() # Creates the file list Data1.setByteStream(False) Data1.setCustomFileList(inputList) # Use custom Global Tag, if not given it will use the data default one (that is empty ;) ) if eventType == "collisions": Data1.setGlobalTag("OFLCOND-MC12-IBL-20-30-25")
def HandleRunOptions(): import sys from InDetAlignExample.NewInDet_SetupData import setupData # ===================================================================== # Default values # ===================================================================== Def_RunNumber = 162882 User_RunNumber = 0 RunNumber = Def_RunNumber Def_ColEvents = 100 User_ColEvents = 0 Col_Events = Def_ColEvents Def_ColCPUs = 1 User_ColCPUs = 0 Col_CPUs = Def_ColCPUs argNum = 1 argMax = len(sys.argv) - 1 argCurr = -1 # jut to make that first time it points to 0 #print (' >>> user input has %s arguments' % argMax) for arg in sys.argv: argCurr += 1 #print (".. %s .." % arg) if arg in ("-h", "--help"): print(' >>> This is the help message of RunIterator.py') print(' NAME') print(' RunIterator.py') print(' ') print(' SYNOPSIS') print(' python RunIterator.py [-r RunNumber] [-e ColEvents]') print(' ') print(' OPTIONS') print( ' The following options are recognized by RunIterator.py') print(' -r RunNumber') print( ' The user specifies the run number. Default run number is %d ' % Def_RunNumber) print(' ') print(' -e ColEvents') print( ' The user specifies the number of events for the collision data (default: %d)' % Def_ColEvents) print(' ') print(' -q ColCPUs') print( ' The user specifies the number of cpus to be used for the collision data (default: %d)' % Def_ColCPUs) print(' ') print(' 22/September/2010') sys.exit() elif arg in ("-r", "--run"): # print (' >>> The user wants to provide his run number... lets see. This argument is the %s argument ' % argCurr ) User_RunNumber = int(sys.argv[argCurr + 1]) if User_RunNumber > 0: RunNumber = User_RunNumber # print ('>>> User run number = %s' % RunNumber) elif arg in ("-e", "--events"): # print (' >>> The user wants to provide the number of events ... lets see. This argument is the %s argument ' % argCurr ) User_ColEvents = int(sys.argv[argCurr + 1]) if User_ColEvents > 0: Col_Events = User_ColEvents # print ('>>> User events (collision data) = %s' % Col_Events) elif arg in ("-q", "--cpus"): # print (' >>> The user wants to provide the number of cpus ... lets see. This argument is the %s argument ' % argCurr ) User_ColCPUs = int(sys.argv[argCurr + 1]) if User_ColCPUs > 0: Col_CPUs = User_ColCPUs # print ('>>> User cpus (collision data) = %s' % Col_CPUs) elif arg in ("-rtt", "-RTT"): RTTConfig = True if 'rtt' in os.environ['USER']: RTTConfig = True print('>>> RunIterator >>> List of values:') if not RTTConfig: print(' RunNumber = %d' % RunNumber) if RTTConfig: print(' Detected RTT!! ') print(' # Events (col) = %d' % Col_Events) print(' # CPUS (col) = %d' % Col_CPUs) print('>>> End of input options processing <<<') if RTTConfig: Data1 = setupData('Collision') Data1.setDataType('MC10_Singlemuons') Col_CPUs = 1 Col_Events = 10000 Data1.setGlobalTag("OFLCOND-DR-BS7T-ANom-11") else: Data1 = setupData('IDTracks') Data1.setDataType("IDTracks") Data1.setRuns([RunNumber]) Data1.setCPUs([Col_CPUs, Col_CPUs]) Data1.setEvents([Col_Events, Col_Events]) Data1.CreateFileList() return Data1
CMTDIR = HOME + "/athena/cmthome/" # extra AtlasSetup options ASetupOptions = "single" # OutputLevel (DEBUG, INFO, VERBOSE) OutputLevel = 'DEBUG' ########################################################## # Datasets to use ########################################################## from InDetAlignExample.NewInDet_SetupData import setupData DataToRun = [] Data1 = setupData('Blocal') #Data1.setDataType("MC10_Singlemuons") # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setDataType( "IDTracks" ) # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setRuns([ 204763, 204769, 204772, 204795, 204796, 204853, 204910, 204932, 204954, 204955, 204976, 205010, 205012, 205016, 205017, 205055, 205071, 205112, 205113 ]) # Run number, you can provide a list of runs Data1.setCPUs([250, 250, 250, 250, 250, 250]) # Number of CPUs per iteration to process this data Data1.setEvents([10000000, 7500000, 7500000, 7500000, 6250000, 7500000]) # Number of total events to process #Data1.setLimitFiles(20) # Limit the number of files to use (useful when runing in local a subset of data) Data1.CreateFileList() # Creates the file list
OutputPath = '/afs/cern.ch/user/l/lacuesta/w0/users/lacuesta/EoPMaps_LargePeriod/' CMTDIR = HOME + "/athena/cmthome/" # extra AtlasSetup options ASetupOptions = "single" # OutputLevel (DEBUG, INFO, VERBOSE) OutputLevel = 'DEBUG' ########################################################## # Datasets to use ########################################################## from InDetAlignExample.NewInDet_SetupData import setupData DataToRun = [] Data1 = setupData( 'Egamma') # Name for the dataset, the output subpaths will have this name #Data1.setDataType("MC10_Singlemuons") # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setDataType( "Egamma" ) # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now Data1.setRecoTags([ "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f405_m986", "f406_m992", "f406_m992", "f406_m992", "f406_m992" ]) Data1.setRuns([ 189598, 189600, 189602, 189610, 189639, 189655, 189660, 189692, 189693, 189719, 189751, 189774, 189781, 189813, 189822, 189836, 189845, 189875 ]) # Run number, you can provide a list of runs Data1.setCPUs([200]) # Number of CPUs per iteration to process this data
print " <RunIterator> nCpus = ", nCpus print " <RunIterator> nEventsMax = ", nEventsMax print " <RunIterator> inputList2 = ", inputList2 print " <RunIterator> ConstantsFile = ", ConstantsFile print " <RunIterator> inputErrorScalingTag = ", inputErrorScalingTag print " <RunIterator> userPtMin = ", userPtMin, " MeV" ########################################################## # Datasets to use ########################################################## from InDetAlignExample.NewInDet_SetupData import setupData DataToRun = [] #################### test to run BON and BOFF data Data1 = setupData(eventType) #Need To be changed this one Data1.setDataType( "IDCosmics" ) # Type of data: IDTracks, MinBias, IDCosmics or MC09_Multimuons by now #Data1.setRuns([201280]) # Run number, you can provide a list of runs Data1.setCPUs([ nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus, nCpus ]) # Number of CPUs per iteration to process this data #Data1.setEvents([5000,5000,5000]) # Number of total events to process Data1.setEvents([ nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax, nEventsMax ])