Commit 06f749ae authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Make histogram file unique pointer

parent 0b14a837
......@@ -145,7 +145,7 @@ void Analysis::load_modules() {
// Create histogram output file
std::string histogramFile = global_config.getPath("histogramFile");
m_histogramFile = new TFile(histogramFile.c_str(), "RECREATE");
m_histogramFile = std::make_unique<TFile>(histogramFile.c_str(), "RECREATE");
m_directory = m_histogramFile->mkdir("corryvreckan");
if(m_histogramFile->IsZombie()) {
throw RuntimeError("Cannot create main ROOT file " + histogramFile);
......
......@@ -66,7 +66,7 @@ namespace corryvreckan {
// Log file if specified
std::ofstream log_file_;
TFile* m_histogramFile;
std::unique_ptr<TFile> m_histogramFile;
TDirectory* m_directory;
int m_events;
int m_tracks;
......
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