Commit cd801da7 authored by Dominik Smith's avatar Dominik Smith
Browse files

Added QA tasks to macro/run/CMakeLists.txt.

parent 79ba0b9f
......@@ -5,6 +5,7 @@ GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_digi_json_config.C
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_tra_beam.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_digi.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_reco.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/run/run_qa.C)
# ============================================================================
......@@ -223,6 +224,22 @@ foreach(setup IN LISTS cbm_setup)
RESOURCE_LOCK collParDb_${setup}
)
# --- Test run_qa
# --- Run QA tasks with Event-by-event reconstruction from time-based simulation
# --- Real raw event builder
set(testname run_${sname}_qa)
add_test(${testname} ${MACRODIR}/run_qa.sh
\"data/${sname}_coll\" \"data/${sname}_ts\" \"data/${sname}_ts_eb_real\"
\"data/${sname}_coll\" \"data/${sname}_qa\" \"${setup}\" -1
\"data/${sname}_sign\" \"data/${sname}_beam\" )
set_tests_properties(${testname} PROPERTIES
TIMEOUT ${timeOutTime}
PASS_REGULAR_EXPRESSION "Macro finished successfully"
FIXTURES_REQUIRED "fixt_tra_${setup}_coll;fixt_digi_ts_${setup};fixt_reco_ts_${setup}_eb_real"
FIXTURES_SETUP fixt_${setup}_qa
RESOURCE_LOCK collParDb_${setup}
)
# --- Test run_reco_ts_tb
# --- Time-based reconstruction from time-based simulation
set(testname run_${sname}_reco_ts_tb)
......
......@@ -37,7 +37,10 @@
#include <TStopwatch.h>
#endif
void run_qa(TString dataset = "data/sis100_muon_jpsi_test", TString setup = "sis100_muon_jpsi", Int_t nEvents = -1)
void run_qa(TString dataTra = "data/sis100_muon_jpsi_test", TString dataRaw = "data/sis100_muon_jpsi_test",
TString dataReco = "data/sis100_muon_jpsi_test", TString dataPar = "data/sis100_muon_jpsi_test",
TString dataSink = "data/sis100_muon_jpsi_test", TString setup = "sis100_muon_jpsi", Int_t nEvents = -1,
TString dataTra2 = "", TString dataTra3 = "")
{
// ========================================================================
......@@ -54,11 +57,13 @@ void run_qa(TString dataset = "data/sis100_muon_jpsi_test", TString setup = "sis
// ------------------------------------------------------------------------
// ----- In- and output file names ------------------------------------
TString rawFile = dataset + ".raw.root";
TString traFile = dataset + ".tra.root";
TString parFile = dataset + ".par.root";
TString recFile = dataset + ".reco.root";
TString sinkFile = dataset + ".qa.root";
TString traFile = dataTra + ".tra.root";
TString tra2File = dataTra2 + ".tra.root";
TString tra3File = dataTra3 + ".tra.root";
TString rawFile = dataRaw + ".raw.root";
TString parFile = dataPar + ".par.root";
TString recFile = dataReco + ".reco.root";
TString sinkFile = dataSink + ".qa.root";
// ------------------------------------------------------------------------
// ----- Load the geometry setup -------------------------------------
......@@ -126,6 +131,8 @@ void run_qa(TString dataset = "data/sis100_muon_jpsi_test", TString setup = "sis
FairFileSource* inputSource = new FairFileSource(rawFile);
inputSource->AddFriend(traFile);
inputSource->AddFriend(recFile);
if (!dataTra2.IsNull()) inputSource->AddFriend(tra2File);
if (!dataTra3.IsNull()) inputSource->AddFriend(tra3File);
FairRunAna* run = new FairRunAna();
run->SetSource(inputSource);
......@@ -142,6 +149,9 @@ void run_qa(TString dataset = "data/sis100_muon_jpsi_test", TString setup = "sis
// ----- MCDataManager -----------------------------------
CbmMCDataManager* mcManager = new CbmMCDataManager("MCDataManager", 0);
mcManager->AddFile(traFile);
if (!dataTra2.IsNull()) mcManager->AddFile(tra2File);
if (!dataTra3.IsNull()) mcManager->AddFile(tra3File);
run->AddTask(mcManager);
// ------------------------------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment