columnflow.tasks.reduction#

Tasks related to reducing events for use on further tasks.

Classes:

ReduceEvents(*args, **kwargs)

ReduceEventsWrapper(*args, **kwargs)

MergeReductionStats(*args, **kwargs)

MergeReductionStatsWrapper(*args, **kwargs)

MergeReducedEventsUser(*args, **kwargs)

MergeReducedEvents(*args, **kwargs)

MergeReducedEventsWrapper(*args, **kwargs)

class ReduceEvents(*args, **kwargs)[source]#

Bases: SelectorStepsMixin, CalibratorsMixin, ChunkedIOMixin, DatasetTask, LocalWorkflow, RemoteWorkflow

Methods:

workflow_requires()

Hook to add workflow requirements.

requires()

The Tasks that this Task depends on.

output()

The output that this Task produces.

run()

The task run method, to be overridden in a subclass.

workflow_requires()[source]#

Hook to add workflow requirements. This method is expected to return a dictionary. When this method is called from a branch task, an exception is raised.

requires()[source]#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

output()[source]#

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

run()[source]#

The task run method, to be overridden in a subclass.

See Task.run

class ReduceEventsWrapper(*args, **kwargs)#

Bases: AnalysisTask, WrapperTask

Methods:

requires()

The Tasks that this Task depends on.

requires()#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

class MergeReductionStats(*args, **kwargs)[source]#

Bases: SelectorStepsMixin, CalibratorsMixin, DatasetTask

Methods:

requires()

The Tasks that this Task depends on.

output()

The output that this Task produces.

run()

The task run method, to be overridden in a subclass.

requires()[source]#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

output()[source]#

The output that this Task produces.

The output of the Task determines if the Task needs to be run–the task is considered finished iff the outputs all exist. Subclasses should override this method to return a single Target or a list of Target instances.

Implementation note

If running multiple workers, the output must be a resource that is accessible by all workers, such as a DFS or database. Otherwise, workers might compute the same output since they don’t see the work done by other workers.

See Task.output

run()[source]#

The task run method, to be overridden in a subclass.

See Task.run

class MergeReductionStatsWrapper(*args, **kwargs)#

Bases: AnalysisTask, WrapperTask

Methods:

requires()

The Tasks that this Task depends on.

requires()#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires

class MergeReducedEventsUser(*args, **kwargs)[source]#

Bases: DatasetTask

Attributes:

file_merging

Needed by DatasetTask to define the default branch map.

property file_merging#

Needed by DatasetTask to define the default branch map.

class MergeReducedEvents(*args, **kwargs)[source]#

Bases: SelectorStepsMixin, CalibratorsMixin, MergeReducedEventsUser, ForestMerge, RemoteWorkflow

Methods:

create_branch_map()

Define the branch map for when this task is used as a workflow.

create_branch_map()[source]#

Define the branch map for when this task is used as a workflow. By default, use the merging information provided by file_merging_factor to return a dictionary which maps branches to one or more input file indices. E.g. 1 -> [3, 4, 5] would mean that branch 1 is simultaneously handling input file indices 3, 4 and 5.

class MergeReducedEventsWrapper(*args, **kwargs)#

Bases: AnalysisTask, WrapperTask

Methods:

requires()

The Tasks that this Task depends on.

requires()#

The Tasks that this Task depends on.

A Task will only run if all of the Tasks that it requires are completed. If your Task does not require any other Tasks, then you don’t need to override this method. Otherwise, a subclass can override this method to return a single Task, a list of Task instances, or a dict whose values are Task instances.

See Task.requires