Commit 4a55b05c authored by Fabio Ravera's avatar Fabio Ravera
Browse files

Added printout in Destroy

parent 146e4540
......@@ -53,14 +53,18 @@ void SystemController::Destroy()
{
if(fDetectorMonitor != nullptr)
{
LOG(INFO) << BOLDRED << "Destroying monitoring" << RESET;
fDetectorMonitor->stopMonitoring();
while(fMonitorFuture.wait_for(std::chrono::milliseconds(250)) != std::future_status::ready) { LOG(INFO) << "Waiting for monitoring to be completed..."; }
delete fDetectorMonitor;
fDetectorMonitor = nullptr;
LOG(INFO) << BOLDRED << "Monitoring destroyed" << RESET;
}
this->closeFileHandler();
LOG(INFO) << BOLDRED << "Destroying interfaces" << RESET;
delete fBeBoardInterface;
fBeBoardInterface = nullptr;
delete fReadoutChipInterface;
......@@ -80,6 +84,8 @@ void SystemController::Destroy()
delete fNetworkStreamer;
fNetworkStreamer = nullptr;
LOG(INFO) << BOLDRED << "Interfaces destroyed" << RESET;
}
void SystemController::addFileHandler(const std::string& pFilename, char pOption)
......
......@@ -149,14 +149,18 @@ void Tool::Destroy()
LOG(INFO) << BOLDRED << "Destroying memory objects" << RESET;
SystemController::Destroy();
#ifdef __HTTP__
LOG(INFO) << BOLDRED << "Destroying HttpServer" << RESET;
if(fHttpServer)
{
delete fHttpServer;
fHttpServer = nullptr;
}
LOG(INFO) << BOLDRED << "HttpServer Destroyed" << RESET;
#endif
SoftDestroy();
LOG(INFO) << BOLDRED << "Memory objects destroyed" << RESET;
}
void Tool::SoftDestroy()
......
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