The processor class#
- class mkShapesRDF.processor.framework.processor.Processor(condorDir, eosDir, prodName, step, selTree=[], excTree=[], isLatino=True, inputFolder='', redirector='', maxFilesPerJob=1, limitFiles=-1, dryRun=0, MT=False)[source][source]#
Bases:
objectThe
Processorclass is used to create the folder structure for batch submission and the scripts to run the processing.Methods
addDeclareLines(step)Add the declare lines to the python script file
getFiles_cfg(sampleName)Utility function to get a dictionary to be passed to the proper function of
SearchFilesrun()Create the folder structure and the scripts to run the processing.
- __init__(condorDir, eosDir, prodName, step, selTree=[], excTree=[], isLatino=True, inputFolder='', redirector='', maxFilesPerJob=1, limitFiles=-1, dryRun=0, MT=False)[source][source]#
Initialize the processor object
- Parameters:
- condorDir
str Path to the directory to use for condor jobs
- eosDir
str Path to the directory to use for eos (output files)
- prodName
str Production name (must be in
Productions_cfg.py)- step
str Step name (must be in
Steps_cfg.py)- selTreelist of str
List of sample names to process (must be in the sample file associated to the production)
- excTreelist of str
List of sample names to exclude (must be in the sample file associated to the production)
- isLatinobool
If True, use the latino naming convention (e.g.
nanoLatino_DYJetsToLL_M-50__part*.root)- inputFolder
str, optional, default: “” Path to the input folder (where input files are searched, if empty, DAS is used)
- redirector
str, optional, default: “” Redirector to use (if empty, use direct access)
- maxFilesPerJob
int, optional, default: 1 Maximum number of files per job (If 20 files and maxFilesPerJob=10, 2 jobs will be created)
- limitFiles
int, optional, default: -1 Limit the number of input files to consider (if -1, all files are considered)
- dryRun
int, optional, default: 0 If 1, do not submit jobs, just create the folder structure and the scripts
- MTbool, optional, default:
False If True, use multi-threading in the runner (
ROOT.EnableImplicitMT()) Be careful since the events order is not preserved!
- condorDir
- getFiles_cfg(sampleName)[source][source]#
Utility function to get a dictionary to be passed to the proper function of
SearchFiles
- addDeclareLines(step)[source][source]#
Add the declare lines to the python script file
- Parameters:
- step
str the step name to consider. Must be in
Steps_cfg.py. If the step is a chain, the declare lines of the substeps are added recursively. The imports, the declaration and the module call are added to the python script file.
- step