Skip to content
Snippets Groups Projects
Commit 2e7dcbb3 authored by Volker Friese's avatar Volker Friese Committed by David Emschermann
Browse files

Moved new class CbmReco to reco/tasks to prevent building on systems without C++17.

parent dfab995d
No related branches found
No related tags found
1 merge request!768Execution of reconstruction from timeslice with steering class and minimal run macro. Refs #2275.
......@@ -9,7 +9,6 @@ Set(LIBRARY_NAME CbmRecoSteer)
# ----- Compilation sources ----------------------------
set(SRCS
CbmReco.cxx
CbmRecoUnpack.cxx
CbmSourceTsArchive.cxx
)
......
......@@ -9,8 +9,6 @@
#pragma link off all functions;
// --- Classes
#pragma link C++ class CbmReco + ;
#pragma link C++ class CbmRecoConfig + ;
#pragma link C++ class CbmRecoUnpack + ;
#pragma link C++ class CbmSourceTsArchive + ;
......
......@@ -7,18 +7,19 @@
Set(LIBRARY_NAME CbmRecoTasks)
# ---------------------------------------------------------
# ----- Compilation sources ----------------------------
set(SRCS
CbmReco.cxx
CbmSourceTs.cxx
CbmTaskBuildEvents.cxx
CbmTaskMakeRecoEvents.cxx
CbmTaskTriggerDigi.cxx
CbmTaskUnpack.cxx
CbmSourceTs.cxx
)
# ---------------------------------------------------------
# ---- Include directories -------------------------------
set(INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
......
......@@ -20,6 +20,7 @@
using std::cout;
using std::endl;
using std::make_unique;
using std::string;
......@@ -66,11 +67,8 @@ int32_t CbmReco::Run()
TStopwatch timer;
timer.Start();
// TODO: I cannot yet use unique pointers for the objects to be passed to FairRunline.
// Ownership, however, is passed to FairRunOnline, which takes care of deleting the objects.
// --- Input source
auto source = new CbmSourceTs(fSourceNames);
auto source = make_unique<CbmSourceTs>(fSourceNames);
if (source) LOG(info) << "Reco: Using sources " << ListSources();
else {
LOG(error) << "Reco: Could not open sources " << ListSources() << "; aborting.";
......@@ -78,7 +76,7 @@ int32_t CbmReco::Run()
}
// --- Output file
auto sink = new FairRootFileSink(fOutputFileName.Data());
auto sink = make_unique<FairRootFileSink>(fOutputFileName.Data());
if (sink) LOG(info) << "Reco: Using output file " << fOutputFileName.Data();
else {
LOG(error) << "Reco: Could not open output " << fOutputFileName.Data() << "; aborting.";
......@@ -86,31 +84,31 @@ int32_t CbmReco::Run()
}
// --- Event header
auto header = new CbmTsEventHeader();
auto header = make_unique<CbmTsEventHeader>();
// --- Unpacking
auto unpack = new CbmTaskUnpack();
auto unpack = make_unique<CbmTaskUnpack>();
unpack->SetOutputBranchPersistent("DigiTimeslice.", fConfig.fStoreTimeslice);
// --- Digi trigger
auto trigger = new CbmTaskTriggerDigi();
auto trigger = make_unique<CbmTaskTriggerDigi>();
trigger->AddSystem(fConfig.fTriggerDet);
trigger->SetAlgoParams(fConfig.fTriggerWin, fConfig.fTriggerThreshold, fConfig.fTriggerDeadTime);
trigger->SetOutputBranchPersistent("Trigger", fConfig.fStoreTrigger);
// --- Event building
auto evtBuild = new CbmTaskBuildEvents();
auto evtBuild = make_unique<CbmTaskBuildEvents>();
for (auto& entry : fConfig.fEvtbuildWindows)
evtBuild->SetEventWindow(entry.first, entry.second.first, entry.second.second);
evtBuild->SetOutputBranchPersistent("DigiEvent", fConfig.fStoreEvents);
// --- Run configuration
FairRunOnline run(source);
run.SetSink(sink);
run.SetEventHeader(header);
run.AddTask(unpack);
run.AddTask(trigger);
run.AddTask(evtBuild);
FairRunOnline run(source.release());
run.SetSink(sink.release());
run.SetEventHeader(header.release());
run.AddTask(unpack.release());
run.AddTask(trigger.release());
run.AddTask(evtBuild.release());
// --- Initialise and start run
timer.Stop();
......
File moved
......@@ -11,10 +11,13 @@
#pragma link off all functions;
// --- Classes
#pragma link C++ class CbmReco + ;
#pragma link C++ class CbmRecoConfig + ;
#pragma link C++ class CbmSourceTs + ;
#pragma link C++ class CbmTaskBuildEvents + ;
#pragma link C++ class CbmTaskMakeRecoEvents + ;
#pragma link C++ class CbmTaskTriggerDigi + ;
#pragma link C++ class CbmTaskUnpack + ;
#pragma link C++ class CbmSourceTs + ;
#endif /* __CINT__ */
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