Commit 01536fc6 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Automatically store all ROOT objects in finalise()

parent 67727394
Pipeline #561325 failed with stages
in 4 minutes and 27 seconds
......@@ -657,6 +657,9 @@ void ModuleManager::finaliseAll() {
// Finalise the module
module->finalise();
// Store all ROOT objects:
module->getROOTDirectory()->Write();
// Remove the pointer to the ROOT directory after finalizing
module->set_ROOT_directory(nullptr);
......
......@@ -292,14 +292,3 @@ StatusCode EventLoaderCLICpix2::run(Clipboard* clipboard) {
// Return value telling analysis to keep running
return Success;
}
void EventLoaderCLICpix2::finalise() {
hHitMap->Write();
hMaskMap->Write();
hHitMapDiscarded->Write();
hPixelToTMap->Write();
hPixelToT->Write();
hPixelToA->Write();
hPixelCnt->Write();
hPixelsPerFrame->Write();
}
......@@ -33,7 +33,6 @@ namespace corryvreckan {
// Functions
void initialise();
StatusCode run(Clipboard* clipboard);
void finalise();
private:
std::shared_ptr<Detector> m_detector;
......
......@@ -125,16 +125,3 @@ StatusCode TestAlgorithm::run(Clipboard* clipboard) {
return Success;
}
void TestAlgorithm::finalise() {
hitmap->Write();
eventTimes->Write();
correlationX->Write();
correlationY->Write();
correlationX2Dlocal->Write();
correlationY2Dlocal->Write();
correlationX2D->Write();
correlationY2D->Write();
correlationTime->Write();
correlationTimeInt->Write();
}
......@@ -22,7 +22,6 @@ namespace corryvreckan {
// Functions
void initialise();
StatusCode run(Clipboard* clipboard);
void finalise();
private:
std::shared_ptr<Detector> m_detector;
......
......@@ -130,14 +130,6 @@ StatusCode Timepix3Clustering::run(Clipboard* clipboard) {
return Success;
}
void Timepix3Clustering::finalise() {
clusterSize->Write();
clusterWidthRow->Write();
clusterWidthColumn->Write();
clusterTot->Write();
clusterPositionGlobal->Write();
}
// Check if a pixel touches any of the pixels in a cluster
bool Timepix3Clustering::touching(Pixel* neighbour, Cluster* cluster) {
......
......@@ -22,7 +22,6 @@ namespace corryvreckan {
// Functions
void initialise();
StatusCode run(Clipboard* clipboard);
void finalise();
private:
static bool sortByTime(Pixel* pixel1, Pixel* pixel2);
......
Markdown is supported
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