Skip to content
Snippets Groups Projects
Commit 03ab7ae1 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Florian Uhlig
Browse files

Add support for DigiEvent out in mCBM macro + CI test

parent de2aa477
No related branches found
No related tags found
1 merge request!1009[mCBM] support for digievent in offline task based chain + CI
......@@ -32,6 +32,7 @@ Bool_t mcbm_event(std::string infile,
UInt_t uRunId,
uint32_t uTriggerSet = 3,
std::int32_t nTimeslices = -1,
bool bDigiEvtsOutput = false,
std::string sOutDir = "data/")
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
......@@ -341,11 +342,13 @@ Bool_t mcbm_event(std::string infile,
// ----- Output filename ----------------------------------------------
std::string filename = Form("%d%s.event.root", uRunId, (bTrigSet ? Form("_%u", uTriggerSet) : ""));
std::string suffix = ".event.root";
if (bDigiEvtsOutput) suffix = ".digievents.root";
std::string filename = Form("%d%s", uRunId, (bTrigSet ? Form("_%u", uTriggerSet) : "")) + suffix;
std::string outfilename = sOutDir + "/" + filename;
std::cout << "-I- " << myName << ": Output file will be " << outfilename << std::endl;
std::string histosfilename = sOutDir + "/" + filename;
histosfilename.replace(histosfilename.find(".event.root"), 11, ".hist.root");
histosfilename.replace(histosfilename.find(suffix), suffix.size(), ".hist.root");
std::cout << "-I- " << myName << ": Histos file will be " << histosfilename << std::endl;
// ------------------------------------------------------------------------
......@@ -441,6 +444,9 @@ Bool_t mcbm_event(std::string infile,
// Use standard MUCH digis
evBuildRaw->ChangeMuchBeamtimeDigiFlag();
// Enable DigiEvent output if requested
if (bDigiEvtsOutput) evBuildRaw->SetDigiEventOutput();
evBuildRaw->SetOutFilename(histosfilename);
// evBuildRaw->SetOutputBranchPersistent("CbmEvent", kFALSE);
evBuildRaw->SetWriteHistosToFairSink(kFALSE);
......
......@@ -402,7 +402,7 @@ If(DEFINED ENV{RAW_DATA_PATH} )
### Raw data analysis tests: event building and reconstruction => need calibration files!!
Set(testname mcbm_event_2022_${RUN})
Set(fixture_event_${RUN} fixture_done_${testname})
Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/mcbm2022/mcbm_event.sh \"${CBMROOT_BINARY_DIR}/macro/run/data/${RUN}_first20Ts.digi.root\" ${RUN})
Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/mcbm2022/mcbm_event.sh \"${CBMROOT_BINARY_DIR}/macro/run/data/${RUN}_first20Ts.digi.root\" ${RUN} 4 -1 false \"${CBMROOT_BINARY_DIR}/macro/run/data/\")
Set_Tests_Properties(${testname} PROPERTIES
TIMEOUT ${RAW_DATA_CHECK_TO}
FAIL_REGULAR_EXPRESSION "segmentation violation"
......@@ -411,6 +411,18 @@ If(DEFINED ENV{RAW_DATA_PATH} )
FIXTURES_SETUP ${fixture_event_${RUN}}
)
### Raw data analysis tests: event building and reconstruction => need calibration files!!
Set(testname mcbm_digievent_2022_${RUN})
Set(fixture_digievent_${RUN} fixture_done_${testname})
Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/beamtime/mcbm2022/mcbm_event.sh \"${CBMROOT_BINARY_DIR}/macro/run/data/${RUN}_first20Ts.digi.root\" ${RUN} 4 -1 true \"${CBMROOT_BINARY_DIR}/macro/run/data/\")
Set_Tests_Properties(${testname} PROPERTIES
TIMEOUT ${RAW_DATA_CHECK_TO}
FAIL_REGULAR_EXPRESSION "segmentation violation"
PASS_REGULAR_EXPRESSION "Macro finished successfully"
FIXTURES_REQUIRED ${fixture_event_${RUN}}
FIXTURES_SETUP ${fixture_digievent_${RUN}}
)
### Raw analysis tests: (event building and) reconstruction => need calibration files!!
Set(testname mcbm_reco_2022_${RUN})
Set(fixture_reco_${RUN} fixture_done_${testname})
......@@ -423,7 +435,7 @@ If(DEFINED ENV{RAW_DATA_PATH} )
TIMEOUT ${RAW_DATA_RECO_TO}
FAIL_REGULAR_EXPRESSION "segmentation violation"
PASS_REGULAR_EXPRESSION "Macro finished successfully"
FIXTURES_REQUIRED "${fixture_geo_${RUN}};${fixture_event_${RUN}}"
FIXTURES_REQUIRED "${fixture_geo_${RUN}};${fixture_digievent_${RUN}}"
FIXTURES_SETUP ${fixture_reco_${RUN}}
RESOURCE_LOCK mcbmRecoAllCoresBug
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment