Skip to content

Commit

Permalink
Merge pull request #201 from MadAnalysis/validation1.10
Browse files Browse the repository at this point in the history
Validation1.10
  • Loading branch information
jackaraz authored May 31, 2023
2 parents 2e7a06d + 86c9ff6 commit a6e6a5f
Show file tree
Hide file tree
Showing 411 changed files with 695 additions and 545 deletions.
2 changes: 1 addition & 1 deletion bin/ma5
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
20 changes: 13 additions & 7 deletions madanalysis/IOinterface/delphescard_checker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down Expand Up @@ -149,15 +149,17 @@ def extractContentCard(self):
self.Modules.append(MyModule)
if len(split)>=3 and split[0] in ['set','add'] and split[1].endswith('InputArray'):
if len(self.Modules)==0:
logging.getLogger("MA5").warning('Problem with Delphes card: InputArray before module definition @ line '+str(counter))
logging.getLogger("MA5").warning('Problem with Delphes card: InputArray '\
+'before module definition @ line '+str(counter))
else:
self.Modules[-1].inputs.append(split[2])
if len(split)==4:
self.Modules[-1].outputs.append(split[3])

if len(split)>=3 and split[0]=='set' and split[1].endswith('OutputArray'):
if len(self.Modules)==0:
logging.getLogger("MA5").warning('Problem with Delphes card OutputArray before module definition @ line '+str(counter))
logging.getLogger("MA5").warning('Problem with Delphes card OutputArray '\
+'before module definition @ line '+str(counter))
else:
self.Modules[-1].outputs.append(split[2])
if len(split)>=3 and split[0]=='set' and split[1]=='PileUpFile' and module=='PileUpMerger':
Expand All @@ -169,7 +171,8 @@ def extractContentCard(self):

def decodeContentCard(self):
# check that modules are declared
logging.getLogger("MA5").debug("- Check that the modules to execute are declared (#modules="+str(len(self.ModuleExecutionPaths))+")...")
logging.getLogger("MA5").debug("- Check that the modules to execute are declared (#modules="+\
str(len(self.ModuleExecutionPaths))+")...")
test = True
for i in self.ModuleExecutionPaths:
ok=False
Expand All @@ -194,7 +197,8 @@ def decodeContentCard(self):
for input in module.inputs:
words=input.split('/')
if len(words)!=2:
logging.getLogger("MA5").warning("Problem with Delphes card: the module "+module.name+" has a bad syntax for the input collection: "+input)
logging.getLogger("MA5").warning("Problem with Delphes card: the module "+module.name+\
" has a bad syntax for the input collection: "+input)
test=False
else:
theModule=words[0]
Expand All @@ -208,7 +212,8 @@ def decodeContentCard(self):
ok=True
break
if not ok and theModule!='Delphes':
logging.getLogger("MA5").warning("Problem with Delphes card: the module "+module.name+" has unknown InputArray module called: "+theModule)
logging.getLogger("MA5").warning("Problem with Delphes card: the module "+module.name+\
" has unknown InputArray module called: "+theModule)
test=False
elif theModule!='Delphes':
ok=False
Expand All @@ -217,7 +222,8 @@ def decodeContentCard(self):
ok=True
break
if not ok:
logging.getLogger("MA5").warning("Problem with Delphes card: the module "+module.name+" has unknown InputArray label called: "+theCollection)
logging.getLogger("MA5").warning("Problem with Delphes card: the module "+module.name+\
" has unknown InputArray label called: "+theCollection)
test=False


Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/folder_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/histo_matplotlib_producer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/histo_root_producer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/html_report_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/html_style_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/job_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
8 changes: 5 additions & 3 deletions madanalysis/IOinterface/job_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down Expand Up @@ -304,7 +304,8 @@ def CreateDelphesCard(self):
elif self.main.fastsim.package=="delphesMA5tune":
input = open(self.main.archi_info.ma5dir+"/tools/SampleAnalyzer/Interfaces/delphesMA5tune/"+cardname,'r')
except:
logging.getLogger('MA5').error("impossible to find "+self.main.archi_info.ma5dir+"/tools/SampleAnalyzer/Interfaces/delphes/"+cardname)
logging.getLogger('MA5').error("impossible to find "+self.main.archi_info.ma5dir+\
"/tools/SampleAnalyzer/Interfaces/delphes/"+cardname)
return False
if "../../../.." in cardname:
cardname=cardname.split('/')[-1]
Expand Down Expand Up @@ -755,7 +756,8 @@ def WriteMakefiles(self,option=""):
ProductPath='./'

# Write makefile
MakefileWriter.Makefile(filename,title,ProductName,ProductPath,isLibrary,cppfiles,hfiles,options,self.main.archi_info,toRemove,moreIncludes=['./'])
MakefileWriter.Makefile(filename,title,ProductName,ProductPath,isLibrary,cppfiles,hfiles,\
options,self.main.archi_info,toRemove,moreIncludes=['./'])

# Setup
from madanalysis.build.setup_writer import SetupWriter
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/latex_report_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
2 changes: 1 addition & 1 deletion madanalysis/IOinterface/layout_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down
56 changes: 37 additions & 19 deletions madanalysis/IOinterface/library_writer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
################################################################################
#
# Copyright (C) 2012-2022 Jack Araz, Eric Conte & Benjamin Fuks
# Copyright (C) 2012-2023 Jack Araz, Eric Conte & Benjamin Fuks
# The MadAnalysis development team, email: <[email protected]>
#
# This file is part of MadAnalysis 5.
Expand Down Expand Up @@ -169,14 +169,16 @@ def WriteMakefileForInterfaces(self,package):
options.has_commons=True
options.has_fastjet_ma5lib=True
# options.has_fastjet_lib=True
toRemove.extend(['compilation_fastjet.log','linking_fastjet.log','cleanup_fastjet.log','mrproper_fastjet.log','../Bin/TestFastjet.log'])
toRemove.extend(['compilation_fastjet.log','linking_fastjet.log','cleanup_fastjet.log',\
'mrproper_fastjet.log','../Bin/TestFastjet.log'])
elif package=='configuration':
toRemove.extend(['compilation.log','linking.log','cleanup.log','mrproper.log'])
elif package=='commons':
toRemove.extend(['compilation.log','linking.log','cleanup.log','mrproper.log'])
elif package=='test_commons':
options.has_commons = True
toRemove.extend(['compilation_commons.log','linking_commons.log','cleanup_commons.log','mrproper_commons.log','../Bin/TestCommons.log'])
toRemove.extend(['compilation_commons.log','linking_commons.log','cleanup_commons.log',\
'mrproper_commons.log','../Bin/TestCommons.log'])
elif package=='zlib':
options.has_commons = True
options.has_zlib_inc = True
Expand All @@ -186,22 +188,25 @@ def WriteMakefileForInterfaces(self,package):
options.has_commons = True
options.has_zlib_ma5lib = True
# options.has_zlib_lib = True
toRemove.extend(['compilation_zlib.log','linking_zlib.log','cleanup_zlib.log','mrproper_zlib.log','../Bin/TestZlib.log'])
toRemove.extend(['compilation_zlib.log','linking_zlib.log','cleanup_zlib.log',\
'mrproper_zlib.log','../Bin/TestZlib.log'])
elif package=='delphes':
options.has_commons = True
options.has_delphes_inc = True
options.has_delphes_lib = True
options.has_root = True
options.has_root_inc = True
options.has_root_lib = True
toRemove.extend(['compilation_delphes.log','linking_delphes.log','cleanup_delphes.log','mrproper_delphes.log'])
toRemove.extend(['compilation_delphes.log','linking_delphes.log',\
'cleanup_delphes.log','mrproper_delphes.log'])
elif package=='test_delphes':
options.has_commons = True
options.has_delphes_ma5lib = True
# options.has_delphes_lib = True
options.has_root_inc = True
options.has_root_lib = True
toRemove.extend(['compilation_delphes.log','linking_delphes.log','cleanup_delphes.log','mrproper_delphes.log','../Bin/TestDelphes.log'])
toRemove.extend(['compilation_delphes.log','linking_delphes.log','cleanup_delphes.log',\
'mrproper_delphes.log','../Bin/TestDelphes.log'])
elif package=='root':
options.has_commons = True
options.has_root = True
Expand All @@ -224,22 +229,25 @@ def WriteMakefileForInterfaces(self,package):
options.has_root_ma5lib = True
options.has_root_inc = True
options.has_root_lib = True
toRemove.extend(['compilation_root.log','linking_root.log','cleanup_root.log','mrproper_root.log','../Bin/TestRoot.log'])
toRemove.extend(['compilation_root.log','linking_root.log',\
'cleanup_root.log','mrproper_root.log','../Bin/TestRoot.log'])
elif package=='delphesMA5tune':
options.has_commons = True
options.has_delphesMA5tune_lib = True
options.has_delphesMA5tune_inc = True
options.has_root = True
options.has_root_inc = True
options.has_root_lib = True
toRemove.extend(['compilation_delphesMA5tune.log','linking_delphesMA5tune.log','cleanup_delphesMA5tune.log','mrproper_delphesMA5tune.log'])
toRemove.extend(['compilation_delphesMA5tune.log','linking_delphesMA5tune.log',\
'cleanup_delphesMA5tune.log','mrproper_delphesMA5tune.log'])
elif package=='test_delphesMA5tune':
options.has_commons = True
options.has_delphesMA5tune_ma5lib = True
options.has_root_inc = True
options.has_root_lib = True
# options.has_delphesMA5tune_lib = True
toRemove.extend(['compilation_delphesMA5tune.log','linking_delphesMA5tune.log','cleanup_delphesMA5tune.log','mrproper_delphesMA5tune.log','../Bin/TestDelphesMA5tune.log'])
toRemove.extend(['compilation_delphesMA5tune.log','linking_delphesMA5tune.log',\
'cleanup_delphesMA5tune.log','mrproper_delphesMA5tune.log','../Bin/TestDelphesMA5tune.log'])
elif package=='process':
options.has_commons=True
options.has_fastjet_ma5lib = self.main.archi_info.has_fastjet
Expand Down Expand Up @@ -268,7 +276,8 @@ def WriteMakefileForInterfaces(self,package):
# options.has_delphes_tag = self.main.archi_info.has_delphes
# options.has_delphesMA5tune_tag = self.main.archi_info.has_delphesMA5tune
# options.has_zlib_tag = self.main.archi_info.has_zlib
toRemove.extend(['compilation_process.log','linking_process.log','cleanup_process.log','mrproper_process.log','../Bin/TestSampleAnalyzer.log'])
toRemove.extend(['compilation_process.log','linking_process.log','cleanup_process.log',\
'mrproper_process.log','../Bin/TestSampleAnalyzer.log'])

# file pattern
if package in ['commons','process','configuration']:
Expand Down Expand Up @@ -338,7 +347,8 @@ def WriteMakefileForInterfaces(self,package):
ProductPath='../Lib/'

# write makefile
MakefileWriter.Makefile(filename,title,ProductName,ProductPath,isLibrary,cppfiles,hfiles,options,self.main.archi_info,toRemove)
MakefileWriter.Makefile(filename,title,ProductName,ProductPath,isLibrary,cppfiles,hfiles,\
options,self.main.archi_info,toRemove)

return True

Expand All @@ -353,15 +363,17 @@ def Compile(self,ncores,package,folder):
# log file name
if package in ['process','commons','test','configuration']:
logfile = folder+'/compilation.log'
elif package in ['test_process','test_commons','test_zlib','test_fastjet','test_root','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_fastjet',\
'test_root','test_delphes','test_delphesMA5tune']:
logfile = folder+'/compilation_'+package[5:]+'.log'
else:
logfile = folder+'/compilation_'+package+'.log'

# makefile
if package in ['process','commons','test','configuration']:
makefile = 'Makefile'
elif package in ['test_process','test_commons','test_zlib','test_fastjet','test_root','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_fastjet',\
'test_root','test_delphes','test_delphesMA5tune']:
makefile = 'Makefile_'+package[5:]
else:
makefile = 'Makefile_'+package
Expand All @@ -388,15 +400,17 @@ def Link(self,package,folder):
# log file name
if package in ['process','commons','test','configuration']:
logfile = folder+'/linking.log'
elif package in ['test_process','test_commons','test_zlib','test_fastjet','test_root','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_fastjet',\
'test_root','test_delphes','test_delphesMA5tune']:
logfile = folder+'/linking_'+package[5:]+'.log'
else:
logfile = folder+'/linking_'+package+'.log'

# makefile
if package in ['process','commons','test','configuration']:
makefile = 'Makefile'
elif package in ['test_process','test_commons','test_zlib','test_fastjet','test_root','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_fastjet',\
'test_root','test_delphes','test_delphesMA5tune']:
makefile = 'Makefile_'+package[5:]
else:
makefile = 'Makefile_'+package
Expand All @@ -420,15 +434,17 @@ def Clean(self,package,folder):
# log file name
if package in ['process','commons','configuration','test']:
logfile = folder+'/cleanup.log'
elif package in ['test_process','test_commons','test_zlib','test_fastjet','test_root','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_fastjet',\
'test_root','test_delphes','test_delphesMA5tune']:
logfile = folder+'/cleanup_'+package[5:]+'.log'
else:
logfile = folder+'/cleanup_'+package+'.log'

# makefile
if package in ['process','commons','test','configuration']:
makefile = 'Makefile'
elif package in ['test_process','test_commons','test_zlib','test_fastjet','test_root','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_fastjet',\
'test_root','test_delphes','test_delphesMA5tune']:
makefile = 'Makefile_'+package[5:]
else:
makefile = 'Makefile_'+package
Expand All @@ -452,7 +468,8 @@ def MrProper(self,package,folder):
# log file name
if package in ['process','commons','configuration']:
logfile = folder+'/mrproper.log'
elif package in ['test_process','test_commons','test_zlib','test_root','test_fastjet','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_root','test_fastjet',\
'test_delphes','test_delphesMA5tune']:
logfile = folder+'/mrproper_'+package[5:]+'.log'
else:
logfile = folder+'/mrproper_'+package+'.log'
Expand All @@ -462,7 +479,8 @@ def MrProper(self,package,folder):
# makefile
if package in ['process','commons','test','configuration']:
makefile = 'Makefile'
elif package in ['test_process','test_commons','test_zlib','test_root','test_fastjet','test_delphes','test_delphesMA5tune']:
elif package in ['test_process','test_commons','test_zlib','test_root','test_fastjet',\
'test_delphes','test_delphesMA5tune']:
makefile = 'Makefile_'+package[5:]
else:
makefile = 'Makefile_'+package
Expand Down
Loading

0 comments on commit a6e6a5f

Please sign in to comment.