Skip to content
Snippets Groups Projects
Commit 96f82110 authored by Volker Friese's avatar Volker Friese Committed by Florian Uhlig
Browse files

Correct CbmDaq to provide the proper MC event list. Prevent tree access modes...

Correct CbmDaq to provide the proper MC event list. Prevent tree access modes kRepeat and kRandom for the time being.
parent 8744e98d
No related branches found
No related tags found
1 merge request!647Correct CbmDaq to provide the proper MC event list. Prevent tree access modes...
Pipeline #15016 passed
...@@ -187,7 +187,7 @@ void CbmDaq::Exec(Option_t*) ...@@ -187,7 +187,7 @@ void CbmDaq::Exec(Option_t*)
// Event info // Event info
Int_t file = FairRunAna::Instance()->GetEventHeader()->GetInputFileId(); Int_t file = FairRunAna::Instance()->GetEventHeader()->GetInputFileId();
Int_t event = FairRootManager::Instance()->GetEntryNr(); Int_t event = FairRunAna::Instance()->GetEventHeader()->GetMCEntryNumber();
Double_t eventTime = FairRunAna::Instance()->GetEventHeader()->GetEventTime(); Double_t eventTime = FairRunAna::Instance()->GetEventHeader()->GetEventTime();
fEventList.Insert(event, file, eventTime); fEventList.Insert(event, file, eventTime);
......
...@@ -154,7 +154,7 @@ foreach(setup IN LISTS cbm_setup) ...@@ -154,7 +154,7 @@ foreach(setup IN LISTS cbm_setup)
# --- Detector response simulation, time-based, using run_digi.C # --- Detector response simulation, time-based, using run_digi.C
set(testname run_${sname}_digi_ts) set(testname run_${sname}_digi_ts)
set(eventrate 1.e7) set(eventrate 1.e7)
set(beamrate 1.e9) set(beamrate 1.e7)
set(tslength 1.e6) set(tslength 1.e6)
add_test(${testname} ${MACRO_DIR}/run_digi.sh add_test(${testname} ${MACRO_DIR}/run_digi.sh
\"data/${sname}_coll\" -1 \"data/${sname}_ts\"\ ${eventrate} ${tslength} \"data/${sname}_coll\" -1 \"data/${sname}_ts\"\ ${eventrate} ${tslength}
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
{"id": -1, {"id": -1,
"path": "test_beam", "path": "test_beam",
"rate": "1.e9", "rate": "1.e9",
"treeAccessMode": "random"} "treeAccessMode": "regular"}
], ],
"output": { "output": {
"path": "data/test_json", "path": "data/test_json",
......
...@@ -132,7 +132,7 @@ void run_digi(TString inputEvents = "", Int_t nEvents = -1, TString output = "", ...@@ -132,7 +132,7 @@ void run_digi(TString inputEvents = "", Int_t nEvents = -1, TString output = "",
run.AddInput(0, evntFile, eventRate); run.AddInput(0, evntFile, eventRate);
if (!eventMode) { if (!eventMode) {
if (!inputSignal.IsNull()) run.EmbedInput(1, signFile, 0); if (!inputSignal.IsNull()) run.EmbedInput(1, signFile, 0);
if (!inputBeam.IsNull()) run.AddInput(2, beamFile, beamRate, ECbmTreeAccess::kRandom); if (!inputBeam.IsNull()) run.AddInput(2, beamFile, beamRate);
} }
run.SetOutputFile(outFile, overwrite); run.SetOutputFile(outFile, overwrite);
run.SetMonitorFile(moniFile); run.SetMonitorFile(moniFile);
......
...@@ -77,6 +77,8 @@ CbmDigitization::~CbmDigitization() ...@@ -77,6 +77,8 @@ CbmDigitization::~CbmDigitization()
void CbmDigitization::AddInput(UInt_t inputId, TString fileName, Double_t eventRate, ECbmTreeAccess mode) void CbmDigitization::AddInput(UInt_t inputId, TString fileName, Double_t eventRate, ECbmTreeAccess mode)
{ {
if (gSystem->AccessPathName(fileName)) LOG(fatal) << fName << ": input file " << fileName << " does not exist!"; if (gSystem->AccessPathName(fileName)) LOG(fatal) << fName << ": input file " << fileName << " does not exist!";
if (mode != ECbmTreeAccess::kRegular)
LOG(fatal) << fName << ": access modes other than kRegular are not yet supported!";
TChain* chain = new TChain("cbmsim"); TChain* chain = new TChain("cbmsim");
chain->Add(fileName.Data()); chain->Add(fileName.Data());
fSource->AddInput(inputId, chain, eventRate, mode); fSource->AddInput(inputId, chain, eventRate, mode);
......
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