Skip to content

Commit

Permalink
Revert "Modify hadd paths to be inside home directory"
Browse files Browse the repository at this point in the history
This reverts commit 39c85de.
  • Loading branch information
saganatt committed Jan 24, 2024
1 parent bae6148 commit 411dff0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions machine_learning_hep/analysis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## along with this program. if not, see <https://www.gnu.org/licenses/>. ##
#############################################################################

from os.path import join, expanduser
from os.path import join

from machine_learning_hep.utilities import mergerootfiles, get_timestamp_string
from machine_learning_hep.logger import get_logger
Expand All @@ -34,7 +34,7 @@ def multi_preparenorm(database, case, typean, doperiodbyperiod):
"correctionsweights.root")

listempty = []
tmp_merged = expanduser(f"~/tmp/hadd/{case}_{typean}/norm_analyzer/{get_timestamp_string()}/")
tmp_merged = f"/data/tmp/hadd/{case}_{typean}/norm_analyzer/{get_timestamp_string()}/"
useperiod = database["analysis"][typean]["useperiod"]

for indexp in range(len(resultsdata)):
Expand Down
11 changes: 5 additions & 6 deletions machine_learning_hep/multiprocesser.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,16 @@ def multi_histomass(self):
for indexp, _ in enumerate(self.process_listsample):
if self.p_useperiod[indexp] == 1:
self.process_listsample[indexp].process_histomass()
tmp_merged = os.path.expanduser(f"~/tmp/hadd/{self.case}_{self.typean}/mass/"
f"{get_timestamp_string()}/")
tmp_merged = f"/data/tmp/hadd/{self.case}_{self.typean}/mass/{get_timestamp_string()}/"
self.logger.debug('merging all')
mergerootfiles(self.lper_filemass, self.filemass_mergedall, tmp_merged)

def multi_efficiency(self):
for indexp, _ in enumerate(self.process_listsample):
if self.p_useperiod[indexp] == 1:
self.process_listsample[indexp].process_efficiency()
tmp_merged = os.path.expanduser(f"~/tmp/hadd/{self.case}_{self.typean}/efficiency/"
f"{get_timestamp_string()}/")
tmp_merged = \
f"/data/tmp/hadd/{self.case}_{self.typean}/efficiency/{get_timestamp_string()}/"
mergerootfiles(self.lper_fileeff, self.fileeff_mergedall, tmp_merged)

def multi_response(self):
Expand All @@ -224,8 +223,8 @@ def multi_response(self):
resp_exists = True
self.process_listsample[indexp].process_response()
if resp_exists:
tmp_merged = os.path.expanduser(f"~/tmp/hadd/{self.case}_{self.typean}/response/"
f"{get_timestamp_string()}/")
tmp_merged = \
f"/data/tmp/hadd/{self.case}_{self.typean}/response/{get_timestamp_string()}/"
mergerootfiles(self.lper_fileresp, self.fileresp_mergedall, tmp_merged)

def multi_scancuts(self):
Expand Down
7 changes: 3 additions & 4 deletions machine_learning_hep/processer.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,8 @@ def process_histomass(self):
create_folder_struc(self.d_results, self.l_path)
arguments = [(i,) for i in range(len(self.l_root))]
self.parallelizer(self.process_histomass_single, arguments, self.p_chunksizeunp) # pylint: disable=no-member
tmp_merged = os.path.expanduser(f"~/tmp/hadd/{self.case}_{self.typean}/"
f"mass_{self.period}/{get_timestamp_string()}/")
tmp_merged = \
f"/tmp/hadd/{self.case}_{self.typean}/mass_{self.period}/{get_timestamp_string()}/"
mergerootfiles(self.l_histomass, self.n_filemass, tmp_merged)

def process_efficiency(self):
Expand All @@ -674,6 +674,5 @@ def process_efficiency(self):
create_folder_struc(self.d_results, self.l_path)
arguments = [(i,) for i in range(len(self.l_root))]
self.parallelizer(self.process_efficiency_single, arguments, self.p_chunksizeunp) # pylint: disable=no-member
tmp_merged = os.path.expanduser(f"~/tmp/hadd/{self.case}_{self.typean}/"
f"histoeff_{self.period}/{get_timestamp_string()}/")
tmp_merged = f"/tmp/hadd/{self.case}_{self.typean}/histoeff_{self.period}/{get_timestamp_string()}/" # pylint: disable=line-too-long
mergerootfiles(self.l_histoeff, self.n_fileeff, tmp_merged)

0 comments on commit 411dff0

Please sign in to comment.