From f0ebc9192f6635c02403b74819203a8d54d77931 Mon Sep 17 00:00:00 2001 From: Ian-Woo Kim Date: Thu, 28 Feb 2013 11:48:10 -0500 Subject: [PATCH] take MGRunSetup for combineX --- lib/HEP/Automation/EventChain/Main.hs | 2 +- .../Automation/EventChain/Process/Generator.hs | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/HEP/Automation/EventChain/Main.hs b/lib/HEP/Automation/EventChain/Main.hs index 0099a4a..2bec812 100644 --- a/lib/HEP/Automation/EventChain/Main.hs +++ b/lib/HEP/Automation/EventChain/Main.hs @@ -120,7 +120,7 @@ evchainGen mdl path (basename,procname) pset pmap cross mgrs = do Right builder -> do let builder' = ((C8.unpack bstr)++) . builder (dir,file,wsetup) <- - combineX mdl path (basename,procname) pset (mgrs_numevent mgrs) + combineX mdl path (basename,procname) pset mgrs b <- doesDirectoryExist dir when (not b) (createDirectory dir) (LC8.writeFile (dirfile) . GZ.compress . LC8.pack . builder') [] diff --git a/lib/HEP/Automation/EventChain/Process/Generator.hs b/lib/HEP/Automation/EventChain/Process/Generator.hs index 7665d3b..3385037 100644 --- a/lib/HEP/Automation/EventChain/Process/Generator.hs +++ b/lib/HEP/Automation/EventChain/Process/Generator.hs @@ -151,14 +151,14 @@ getWorkSetupCombined :: model -- -> (FilePath,FilePath,FilePath) -> ScriptSetup -> ModelParam model - -> String -- ^ process name - -> String -- ^ directory name - -> Int + -> (String,String) -- ^ (directory name, process name) + -> MGRunSetup + -- -> Int -> WorkSetup model -getWorkSetupCombined mdl ssetup pset str wname n = +getWorkSetupCombined mdl ssetup pset (wname,str) mgrs = WS ssetup (processSetupCombined mdl str wname) - (runSetupPart pset n) + (mGRunSetup2RunSetup pset mgrs) -- (runSetupPart pset n) (WebDAVRemoteDir "") {- WS <$> getScriptSetup dir_sb dir_mg5 dir_mc @@ -278,13 +278,13 @@ combineX :: (Model model) => -> ScriptSetup -> (String,String) -- ^ (base madgraph dir name, resultant process name) -> ModelParam model -- ^ model parameters - -> Int + -> MGRunSetup -> IO (FilePath,FilePath,WorkSetup model) -combineX mdl ssetup (basename,procname) pset n = do +combineX mdl ssetup (basename,procname) pset mgrs = do let nwname = basename print nwname let wsetup = getWorkSetupCombined - mdl ssetup pset procname basename n + mdl ssetup pset (basename,procname) mgrs r <- flip runReaderT wsetup . runErrorT $ do WS _ psetup rsetup _ <- ask let taskname = makeRunName psetup rsetup