Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: expand test matrix for macros with root6 env #606

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 6 additions & 4 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,17 @@ jobs:
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \
sh -c "set -e; MALLOC_CHECK_=3 $TEST_CMD 2>&1 | tee log; grep 'Run completed' log"

ROOT5_test_doEvents:
test_doEvents:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
test_id: [121, 122]
compiler: [gcc485, gcc11]
starenv: [root5, root6]
env:
STARENV: root5-${{ matrix.compiler }}
STARENV: ${{ matrix.starenv }}-${{ matrix.compiler }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
Expand All @@ -92,16 +93,17 @@ jobs:
docker run --volumes-from star-test-data ghcr.io/star-bnl/star-sw-${{ env.STARENV }} \
sh -c "set -e; $TEST_CMD 2>&1 | tee log; grep '<StIOMaker::Finish> IO:' log"

ROOT5_test_find_vertex:
test_find_vertex:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
test_id: [102, 121, 122]
compiler: [gcc485, gcc11]
starenv: [root5, root6]
env:
STARENV: root5-${{ matrix.compiler }}
STARENV: ${{ matrix.starenv }}-${{ matrix.compiler }}
steps:
- name: Download artifact
uses: actions/download-artifact@v3
Expand Down
101 changes: 60 additions & 41 deletions StRoot/macros/analysis/doEvents.C
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,54 @@
// for Grid Collector.
//
/////////////////////////////////////////////////////////////////////////////
#include "iostream.h"

class StChain;
#pragma cling load("StarRoot")
#pragma cling load("St_base")
#pragma cling load("StChain")
#pragma cling load("StUtilities")
#pragma cling load("StBFChain")

#pragma cling load("St_Tables")
#pragma cling load("StTreeMaker")
#pragma cling load("StIOMaker")
#pragma cling load("StarClassLibrary")
#pragma cling load("StTriggerDataMaker")
#pragma cling load("StBichsel")
#pragma cling load("StEvent")
#pragma cling load("StTpcDb")
#pragma cling load("StEventUtilities")
#pragma cling load("StEmcUtil")
#pragma cling load("StTofUtil")
#pragma cling load("StPmdUtil")
#pragma cling load("StPreEclMaker")
#pragma cling load("StStrangeMuDstMaker")
#pragma cling load("StMuDSTMaker")
#pragma cling load("StarMagField")
#pragma cling load("StMagF")
#pragma cling load("StAnalysisMaker")
#pragma cling load("StMuAnalysisMaker")

#pragma cling load("St_g2t")
#pragma cling load("geometry")
#pragma cling load("St_geant_Maker")
#pragma cling load("StTableUtilities")

#pragma cling load("StDbLib.so")
#pragma cling load("StDbBroker.so")
#pragma cling load("libStDb_Tables.so")
#pragma cling load("St_db_Maker.so")
#pragma cling load("StTpcDb")
#pragma cling load("StDetectorDbMaker")

#pragma cling load("libStMagF")
#pragma cling load("StDetectorDbMaker")
#pragma cling load("StTpcDb")
#pragma cling load("StEventMaker")

#pragma cling load("StGridCollector")

StChain *chain=0;
class St_db_Maker;
St_db_Maker *dbMk =0;
class StFileI;
StFileI *setFiles =0;
TString mainBranch;

Expand Down Expand Up @@ -177,7 +218,7 @@ void doEvents(Int_t startEvent, Int_t nEventsQQ, const char **fileList, const ch
mainBranch = line;
// printf("fileList[0] %s %s\n",line,mainBranch.Data());
mainBranch.ReplaceAll(".root","");
int idot = strrchr((char*)mainBranch,'.') - mainBranch.Data();
int idot = strrchr((char*)&mainBranch[0],'.') - mainBranch.Data();
mainBranch.Replace(0,idot+1,"");
mainBranch += "Branch";
}
Expand Down Expand Up @@ -249,36 +290,11 @@ void doEvents(Int_t startEvent, Int_t nEventsQQ, const char **fileList, const ch
IOMk->SetNotify("OpenFile" ,outMk);
}


// StEventDisplayMaker
if (eventDisplay) {

StEventDisplayMaker *displayMk = new StEventDisplayMaker();
displayMk->SetEventIdToRender(eventNumber2Display);
if (eventNumber2Display)
printf("\n\n\n Display the Event %d only\n", eventNumber2Display);
// Set the default to display all StEvent tracks
displayMk->AddName("StEvent(Primary Tracks)");
// displayMk->AddName("StEvent(Kink Tracks)");
// displayMk->AddName("StEvent(V0 Tracks)");
// displayMk->AddName("StEvent(Xi Tracks)");
// displayMk->AddName("StEvent(All Tracks)");
// Set the default StEvent events filter
displayMk->AddFilter(new StFilterDef("MainFilter"));
displayMk->AddFilter(new StMuDstFilterHelper("MuL3Filter",kFALSE));
displayMk->AddFilter(new StColorFilterHelper("Color schema",kFALSE));
// Check whether any Custom filter is present
if (!gSystem->Load("StCustomFilter")) {
displayMk->AddFilter(new StCustomFilter("Custom filter",kFALSE));
}

}

// Initialize chain
cout << "----------------------------------------------------------" << endl;
cout << " doEvents - Initializing and Printing chain information " << endl;
Int_t iInit = chain->Init();
if (iInit) chain->Fatal(iInit,"on init");
if (iInit) chain->Fatal((char*)&iInit,"on init");
chain->PrintInfo();
cout << "----------------------------------------------------------" << endl << endl;

Expand Down Expand Up @@ -306,6 +322,7 @@ void doEvents(Int_t startEvent, Int_t nEvents, const char *file, const char *qaf
//____________________________________________________________________________
void doEvents(Int_t nEvents, const char *file, const char *qaflag)
{
loadLibs("");
if (!qaflag) qaflag="";
cout << "Calling (1,nEvents,file,qaflag)" << endl;
doEvents(1,nEvents,file,qaflag);
Expand Down Expand Up @@ -337,6 +354,7 @@ void doEvents(Int_t nEvents, const char **fileList, const char *qaflag)
//____________________________________________________________________________
void loadLibs(const char *opt)
{
cout << "Loading libs" << endl;
// Dynamically link needed shared libs

if (!opt[0]) { //Default set
Expand Down Expand Up @@ -368,24 +386,25 @@ void loadLibs(const char *opt)
gSystem->Load("StMagF");
gSystem->Load("StAnalysisMaker");
gSystem->Load("StMuAnalysisMaker");
cout << " loading of shared libraries done" << endl;
return;
}
if (strstr(opt,"dbon")) {// DB stuff

gSystem->Load("St_g2t");
gSystem->Load("geometry");
gSystem->Load("St_geant_Maker");
gSystem->Load("StTableUtilities");

gSystem->Load("StDbLib.so");
gSystem->Load("StDbBroker.so");
gSystem->Load("libStDb_Tables.so");
gSystem->Load("St_db_Maker.so");
gSystem->Load("StTpcDb");
gSystem->Load("StDetectorDbMaker");
cout << " loading of shared libraries done" << endl;
return;
}
if (strstr(opt,"dbon")) {// DB stuff
}

if (strstr(opt,"disp")) {// EventDisplay stuff
gSystem->Load("St_g2t"); // is a part od St_Tables
gSystem->Load("geometry");
gSystem->Load("St_geant_Maker");
gSystem->Load("StTableUtilities");
gSystem->Load("StEventDisplayMaker");
}
}
//____________________________________________________________________________
Expand All @@ -397,7 +416,7 @@ int gcReadCommands(const char *file, TString& cmds)
FILE *inp = 0;
inp = fopen(file, "r");
if (!inp) { // File not found
printf("doEvents: ERROR. File Not Found // %s\n",req+1);
printf("doEvents: ERROR. File Not Found // %s\n",file);
return -1;
}

Expand Down
16 changes: 4 additions & 12 deletions StRoot/macros/analysis/find_vertex.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,10 @@
// new vertices are added after the old one.
//

//class StEmcDetector;
class StChain;
//class StEmcRawData;
//class EEfeeDataBlock;
//class Collection;
//class StSPtrVecTrackNodeIterator ;
//class StTriggerIdCollection;
class StMinuitVertexFinder;
class StGenericVertexFinder;
class StGenericVertexMaker;
class StEvent;
class StPrimaryVertex;
#include "StChain/StChain.h"
#include "StGenericVertexMaker/StGenericVertexMaker.h"
#include "StEvent/StEvent.h"
#include "StEvent/StPrimaryVertex.h"

StChain *chain=0;
TH1F *dca_z_h=0;
Expand Down
Loading