Skip to content

Commit

Permalink
Add k4EDM4hep2LcioConv package
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jun 26, 2023
1 parent 125a5f2 commit c9e0cde
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
1 change: 1 addition & 0 deletions ilcsoft/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
from .lcgeo import lcgeo
from .podio import podio
from .edm4hep import edm4hep
from .k4edm4hep2lcioconv import k4edm4hep2lcioconv

from .aidaTT import aidaTT

Expand Down
62 changes: 62 additions & 0 deletions ilcsoft/k4edm4hep2lcioconv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env python3

from .baseilc import BaseILC
from .util import *


class k4edm4hep2lcioconv(BaseILC):
"""Build the k4EDM4hep2LcioConv package"""

def __init__(self, userInput):
BaseILC.__init__(self, userInput, "k4edm4hep2lcioconv", "k4edm4hep2lcioconv")

self.hasCMakeFindSupport = False # ?

self.download.supportedTypes = ["GitHub"]
self.download.gituser = "key4hep"
self.download.gitrepo = "k4EDM4hep2LcioConv"

self.reqmodules = ["edm4hep", "LCIO"]

def init(self):
"""initialize k4edm4hep2lcioconv"""
BaseILC.init(self)

def _run_abort(self, cmd, msg):
"""Run the passed command via os_system and abort on failure"""
if os_system(cmd + " 2>&1 | tee -a " + self.logfile) != 0:
self.abort(msg)

def compile(self):
"""Compile k4edm4hep2lcioconv"""
trymakedir(self.installPath + "/build")
os.chdir(self.installPath + "/build")

if self.rebuild:
tryunlink("CMakeCache.txt")

self._run_abort(
self.genCMakeCmd() + " -DCMAKE_INSTALL_PREFIX=../install",
"failed to configure!!",
)

if self.nightlyBuild:
for targetName in self.nightlyTargets:
self._run_abort(
". ../build_env.sh; make ${MAKEOPTS} " + targetName,
"failed to compile!!",
)
else:
self._run_abort(
". ../build_env.sh; make ${MAKEOPTS}", "failed to compile!!"
)
self._run_abort(
". ../build_env.sh; make ${MAKEOPTS} install", "failed to install!!"
)

def postCheckDeps(self):
BaseILC.postCheckDeps(self)

self.envpath["LD_LIBRARY_PATH"].append(self.installPath + "/install/lib")
self.envpath["LD_LIBRARY_PATH"].append(self.installPath + "/install/lib64")
self.envpath["PATH"].append(self.installPath + "/install/bin")
2 changes: 2 additions & 0 deletions releases/HEAD/release-ilcsoft.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ ilcsoft.install( edm4hep( edm4hep_version ))
ilcsoft.module("edm4hep").envcmake["BUILD_DDG4EDM4HEP"] = 'OFF'
ilcsoft.module("edm4hep").envcmake["USE_EXTERNAL_CATCH2"] = 'OFF'

ilcsoft.install( k4edm4hep2lcioconv( k4edm4hep2lcioconv_version ) )
ilcsoft.module("k4edm4hep2lcioconv").envcmake["USE_EXTERNAL_CATCH2"] = "OFF"

ilcsoft.install( aidaTT( aidaTT_version ))
ilcsoft.module("aidaTT").download.type="GitHub"
Expand Down
2 changes: 2 additions & 0 deletions releases/HEAD/release-versions-HEAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,6 @@

edm4hep_version = "HEAD"

k4edm4hep2lcioconv_version = "HEAD"

Physsim_version = "HEAD" # "v00-02"

0 comments on commit c9e0cde

Please sign in to comment.