Skip to content

Commit

Permalink
Merge pull request #28286 from smuzaffar/py3-alignment
Browse files Browse the repository at this point in the history
[PY3] unit test fixed for Aligenmnet
  • Loading branch information
cmsbuild committed Oct 30, 2019
2 parents 9d4413e + 219b287 commit 88f1911
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
13 changes: 8 additions & 5 deletions Alignment/CommonAlignment/scripts/tkal_create_file_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
import bisect
import random
import signal
import cPickle
if sys.version_info[0]>2:
import _pickle as cPickle
else:
import cPickle
import difflib
import argparse
import functools
Expand Down Expand Up @@ -363,14 +366,14 @@ def _request_dataset_information(self):
for d in self._datasets: print_msg("\t"+d)
print_msg("This may take a while...")

result = pool.map_async(get_events_per_dataset, self._datasets).get(sys.maxsize)
result = pool.map_async(get_events_per_dataset, self._datasets).get(3600)
self._events_in_dataset = sum(result)

result = pool.map_async(get_max_run, self._datasets).get(sys.maxsize)
result = pool.map_async(get_max_run, self._datasets).get(3600)
self._max_run = max(result)

result = sum(pool.map_async(get_file_info, self._datasets).get(sys.maxint), [])
files = pool.map_async(_make_file_info, result).get(sys.maxint)
result = sum(pool.map_async(get_file_info, self._datasets).get(3600), [])
files = pool.map_async(_make_file_info, result).get(3600)
self._file_info = sorted(fileinfo for fileinfo in files)

self.rereco = any(len(fileinfo.runs)>1 for fileinfo in self._file_info)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# parseParameter will override the config values.
##

import ConfigParser
import configparser as ConfigParser
import logging
import os

Expand Down
7 changes: 5 additions & 2 deletions Alignment/MillePedeAlignmentAlgorithm/scripts/mps_alisetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
import os
import re
import sys
import cPickle
if sys.version_info[0]>2:
import _pickle as cPickle
else:
import cPickle
import argparse
import itertools
import subprocess
import collections
import ConfigParser
import configparser as ConfigParser
import Alignment.MillePedeAlignmentAlgorithm.mpslib.tools as mps_tools
import Alignment.MillePedeAlignmentAlgorithm.mpslib.Mpslibclass as mpslib
import Alignment.MillePedeAlignmentAlgorithm.mpsvalidate.iniparser as mpsv_iniparser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
print("=======================================")
print()
import subprocess
execfile(subprocess.check_output(["which", "tkal_create_file_lists.py"]).rstrip())
exec(open(subprocess.check_output(["which", "tkal_create_file_lists.py"], universal_newlines=True).rstrip()).read())
5 changes: 4 additions & 1 deletion Alignment/MillePedeAlignmentAlgorithm/scripts/mps_fire.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
import sys
import glob
import shutil
import cPickle
if sys.version_info[0]>2:
import _pickle as cPickle
else:
import cPickle
import subprocess
import re
import argparse
Expand Down

0 comments on commit 88f1911

Please sign in to comment.