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: object

The Processor class 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 SearchFiles

run()

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:
condorDirstr

Path to the directory to use for condor jobs

eosDirstr

Path to the directory to use for eos (output files)

prodNamestr

Production name (must be in Productions_cfg.py)

stepstr

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)

inputFolderstr, optional, default: “”

Path to the input folder (where input files are searched, if empty, DAS is used)

redirectorstr, optional, default: “”

Redirector to use (if empty, use direct access)

maxFilesPerJobint, optional, default: 1

Maximum number of files per job (If 20 files and maxFilesPerJob=10, 2 jobs will be created)

limitFilesint, optional, default: -1

Limit the number of input files to consider (if -1, all files are considered)

dryRunint, 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!

getFiles_cfg(sampleName)[source][source]#

Utility function to get a dictionary to be passed to the proper function of SearchFiles

Parameters:
sampleNamestr

Sample name (must be in the sample file associated to the production)

Returns:
dict

Dictionary to be passed to the proper function of SearchFiles

addDeclareLines(step)[source][source]#

Add the declare lines to the python script file

Parameters:
stepstr

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.

run()[source][source]#

Create the folder structure and the scripts to run the processing. Submit if dryRun==0