Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build Containers

on:
push:
branches:
- main
- 'SL*'
tags:
- '*'

jobs:
ROOT5:
if: github.repository_owner == 'star-bnl'
runs-on: ubuntu-latest
steps:
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v4.8

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Rebuild up to base-stage
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/star-sw-root5-base:cache
file: docker/Dockerfile.root5
target: base-stage
push: true
tags: ghcr.io/${{ github.repository_owner }}/star-sw-root5-base:${{ steps.branch-name.outputs.current_branch }}_latest
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/star-sw-root5-base:cache,mode=max

- name: Build release container
if: steps.branch-name.outputs.is_tag == 'true'
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/star-sw-root5-base:cache
file: docker/Dockerfile.root5
target: build-stage
push: true
tags: ghcr.io/${{ github.repository_owner }}/star-sw-root5-build:${{ steps.branch-name.outputs.tag }}
46 changes: 41 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,56 @@
name: CI Build

on:
pull_request:
branches: main
on: [pull_request]

jobs:
ROOT5:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=10000000

- name: Build with Docker
uses: docker/build-push-action@v2
with:
cache-from: type=registry,ref=ghcr.io/star-bnl/star-sw-base-root5
cache-from: type=registry,ref=ghcr.io/star-bnl/star-sw-root5-base@sha256:4bed8a8b729fa9e6c8e92b2bdecd6b73869e67a07bfbde969936f921123d4c3e
push: false
tags: ghcr.io/star-bnl/star-sw-base-root5
tags: ghcr.io/star-bnl/star-sw-root5-build
file: docker/Dockerfile.root5
outputs: type=docker,dest=/tmp/star-sw-root5-build.tar

- name: Save built image for test jobs
uses: actions/upload-artifact@v2
with:
name: star-sw-root5-build
path: /tmp/star-sw-root5-build.tar

ROOT5_test_setup:
runs-on: ubuntu-latest
needs: ROOT5
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- run: echo "::set-output name=matrix::" $(cat tests/joblist_ci.json)
id: set-matrix

ROOT5_test:
runs-on: ubuntu-latest
needs: ROOT5_test_setup
strategy:
matrix:
test_id: ${{ fromJSON(needs.ROOT5_test_setup.outputs.matrix) }}
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: star-sw-root5-build
path: /tmp

- run: docker load --input /tmp/star-sw-root5-build.tar
- run: docker run --name star-test-data --volume /star ghcr.io/star-bnl/star-test-data:v2
- run: |
TEST_CMD=$(docker run --rm ghcr.io/star-bnl/star-sw-root5-build star-sw/tests/executest.py -c ${{ matrix.test_id }})
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-root5-build sh -c "$TEST_CMD"
4 changes: 4 additions & 0 deletions StRoot/StarClassLibrary/StHyperNuclei.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
StH4Lambda StH4Lambda::mH4Lambda;
StHe4Lambda StHe4Lambda::mHe4Lambda;
StHe5Lambda StHe5Lambda::mHe5Lambda;

StH4LambdaBar StH4LambdaBar::mH4LambdaBar;
StHe4LambdaBar StHe4LambdaBar::mHe4LambdaBar;
StHe5LambdaBar StHe5LambdaBar::mHe5LambdaBar;
87 changes: 84 additions & 3 deletions StRoot/StarClassLibrary/StHyperNuclei.hh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#include "StarPDGEncoding.hh"
#include "SystemOfUnits.h"


class StH4Lambda : public StIon {
class StH4Lambda : public StIon {
public:
static StH4Lambda* instance() {
return &mH4Lambda;
Expand Down Expand Up @@ -85,7 +84,89 @@ private:
StHe5Lambda(const string &aName="He5Lambda",
double mass =4.83978 *GeV,
double width=0.0*MeV, /* TODO */
double charge=+3 *eplus,
double charge=+2 *eplus,
int iSpin=0,
int iParity=0,
int iConjugation=0,
int iIsospin=0,
int iIsospinZ=0,
int gParity=0,
const string & pType="hypernucleus",
int lepton=0,
int baryon=4,
int encoding=hid(2,4,1),
bool stable=false,
double lifetime=2.632e-10) : StIon(aName,mass,width,charge,iSpin,iParity,iConjugation,iIsospin,iIsospinZ,gParity,pType,lepton,baryon,encoding,stable,lifetime)
{ /* nada */ }
};

class StH4LambdaBar : public StIon {
public:
static StH4LambdaBar* instance() {
return &mH4LambdaBar;
};

private:
static StH4LambdaBar mH4LambdaBar;

StH4LambdaBar(const string &aName="H4LambdaBar",
double mass =3.92727 *GeV,
double width=0.0*MeV, /* TODO */
double charge=-1 *eplus,
int iSpin=0,
int iParity=0,
int iConjugation=0,
int iIsospin=0,
int iIsospinZ=0,
int gParity=0,
const string & pType="hypernucleus",
int lepton=0,
int baryon=4,
int encoding=hid(1,3,1),
bool stable=false,
double lifetime=2.632e-10) : StIon(aName,mass,width,charge,iSpin,iParity,iConjugation,iIsospin,iIsospinZ,gParity,pType,lepton,baryon,encoding,stable,lifetime)
{ /* nada */ }
};
class StHe4LambdaBar : public StIon {
public:
static StHe4LambdaBar* instance() {
return &mHe4LambdaBar;
};

private:
static StHe4LambdaBar mHe4LambdaBar;

StHe4LambdaBar(const string &aName="He4LambdaBar",
double mass =3.92168 *GeV,
double width=0.0*MeV, /* TODO */
double charge=-2 *eplus,
int iSpin=0,
int iParity=0,
int iConjugation=0,
int iIsospin=0,
int iIsospinZ=0,
int gParity=0,
const string & pType="hypernucleus",
int lepton=0,
int baryon=4,
int encoding=hid(2,3,1),
bool stable=false,
double lifetime=2.632e-10) : StIon(aName,mass,width,charge,iSpin,iParity,iConjugation,iIsospin,iIsospinZ,gParity,pType,lepton,baryon,encoding,stable,lifetime)
{ /* nada */ }
};
class StHe5LambdaBar : public StIon {
public:
static StHe5LambdaBar* instance() {
return &mHe5LambdaBar;
};

private:
static StHe5LambdaBar mHe5LambdaBar;

StHe5LambdaBar(const string &aName="He5LambdaBar",
double mass =4.83978 *GeV,
double width=0.0*MeV, /* TODO */
double charge=-2 *eplus,
int iSpin=0,
int iParity=0,
int iConjugation=0,
Expand Down
5 changes: 4 additions & 1 deletion StRoot/StarClassLibrary/StParticleTable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,13 @@ StParticleTable::StParticleTable()
Geant2Pdg( 63053, kHyperTriton, H3(Lambda) --> quasi 2 body);
Geant2Pdg( 63054, kAntiHyperTriton, AntiH3(Lambda) --> quasi 2 body);

Geant2Pdg( 61055, hid(1,3,1), H4(Lambda) --> He4 proton piminus );
Geant2Pdg( 61055, hid(1,3,1), H4(Lambda) --> He4 piminus );
Geant2Pdg( 61057, hid(2,3,1), He4(Lambda) --> He3 proton piminus );
Geant2Pdg( 61059, hid(2,4,1), He5(Lambda) --> He4 proton piminus );

Geant2Pdg( 61056, -hid(1,3,1), H4(Lambda)Bar --> He4Bar piplus );


///@}

///@addtogroup EXOTICS
Expand Down
7 changes: 4 additions & 3 deletions StRoot/macros/.rootrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Gui.Style: windows
Gui.Backend: qt
Gui.Factory: qtgui
Rint.Logon: $(STAR)/StRoot/macros/rootlogon.C
Rint.Logoff: $(STAR)/StRoot/macros/rootlogoff.C
Unix.*.Root.MacroPath: .:$(STAR)/StRoot/macros:$(ROOTSYS)/macros
Unix.*.Root.DynamicPath: .:$(STAR_LIB):$(ROOTSYS)/lib
11 changes: 11 additions & 0 deletions StRoot/macros/rootlogoff.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
if (TClassTable::GetDict("StMaker"))
{
StMaker* mk = StMaker::GetChain();
if (mk) {
mk->Finish();
}
}

std::cout << "\nThis is the end of STAR ROOT -- Goodbye\n" << std::endl;
}
34 changes: 34 additions & 0 deletions StRoot/macros/rootlogon.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
gSystem->Load("libStarClassLibrary");
gSystem->Load("libGeom");
gSystem->Load("libTable");
gSystem->Load("libPhysics");
gSystem->Load("libEG");
gSystem->Load("libStarRoot");

if (gSystem->GetLibraries("*libTable*"))
{
gInterpreter->ProcessLine("typedef TCL StCL;");
gInterpreter->ProcessLine("typedef TDataSet St_DataSet ;");
gInterpreter->ProcessLine("typedef TDataSetIter St_DataSetIter;");
gInterpreter->ProcessLine("typedef TFileSet St_FileSet;");
gInterpreter->ProcessLine("typedef TVolume St_Node;");
gInterpreter->ProcessLine("typedef TVolumePosition St_NodePosition;");
gInterpreter->ProcessLine("typedef TVolumeView St_NodeView;");
gInterpreter->ProcessLine("typedef TVolumeViewIter St_NodeViewIter;");
gInterpreter->ProcessLine("typedef TObjectSet St_ObjectSet;");
gInterpreter->ProcessLine("typedef TPoints3D St_Points3D;");
gInterpreter->ProcessLine("typedef TPointsArray3D St_PointsArray3D;");
gInterpreter->ProcessLine("typedef TPolyLineShape St_PolyLineShape;");
gInterpreter->ProcessLine("typedef TTable St_Table;");
gInterpreter->ProcessLine("typedef TTable3Points St_Table3Points;");
gInterpreter->ProcessLine("typedef TTableIter St_TableIter;");
gInterpreter->ProcessLine("typedef TTablePoints St_TablePoints;");
gInterpreter->ProcessLine("typedef TTableSorter St_TableSorter;");
gInterpreter->ProcessLine("typedef TTableDescriptor St_tableDescriptor;");
}

std::cout << " *** Start at Date : " << TDatime().AsString() << std::endl;

gSystem->AddIncludePath(" -I. -I./.$STAR_HOST_SYS/include -I./StRoot -I$STAR/.$STAR_HOST_SYS/include -I$STAR/StRoot -I/usr/include/mysql");
}
Loading