Skip to content

Commit

Permalink
update fw
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Jun 11, 2018
1 parent aa408fb commit 8023a85
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions atcmsedm/fw.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import pickle

import alphatwirl
from alphatwirl.misc.deprecation import _deprecated_class_method_option

from .yes_no import query_yes_no
from . import cmsedm
Expand All @@ -30,7 +31,7 @@ class AtCMSEDM(object):
Args:
quiet (bool): don't show progress bars if True
parallel_mode (str): 'multiprocessing', 'subprocess', 'htcondor'
htcondor_job_desc_extra (list): lines to be added to HTCondor job description
dispatcher_options (dict): options to dispatcher
process (int): the number of processes for the 'multiprocessing' mode
user_modules (list of str): names of python modules to be copied for the 'subprocess' mode
max_events_per_dataset (int): maximum number of events per data set
Expand All @@ -41,10 +42,12 @@ class AtCMSEDM(object):
profile_out_path (bool): path to store the result of the profile. stdout if None
"""
@_deprecated_class_method_option('htcondor_job_desc_extra', msg='use dispatcher_options instead')
def __init__(self,
quiet=False,
parallel_mode='multiprocessing',
htcondor_job_desc_extra=[ ],
dispatcher_options=dict(),
process=4,
user_modules=set(),
max_events_per_dataset=-1,
Expand All @@ -57,11 +60,12 @@ def __init__(self,
user_modules = set(user_modules)
user_modules.add('atcmsedm')
self.parallel = alphatwirl.parallel.build_parallel(
parallel_mode=parallel_mode,
quiet=quiet,
processes=process,
user_modules=user_modules,
htcondor_job_desc_extra=htcondor_job_desc_extra
parallel_mode=parallel_mode,
quiet=quiet,
processes=process,
user_modules=user_modules,
## htcondor_job_desc_extra=htcondor_job_desc_extra,
dispatcher_options=dispatcher_options
)
self.max_events_per_dataset = max_events_per_dataset
self.max_events_per_process = max_events_per_process
Expand Down Expand Up @@ -102,7 +106,7 @@ def _configure(self, datasets, reader_collector_pairs):
maxFiles=self.max_files_per_dataset,
maxFilesPerRun=self.max_files_per_process
)
eventReader = alphatwirl.loop.EventsInDatasetReader(
eventReader = alphatwirl.loop.EventDatasetReader(
eventLoopRunner=eventLoopRunner,
reader=reader_top,
collector=collector_top,
Expand Down

0 comments on commit 8023a85

Please sign in to comment.