Commit 11621943 authored by Administrator's avatar Administrator
Browse files

same

parent 33e5033b
......@@ -7,6 +7,7 @@
#include "CbmTrdDigi.h"
#include <FairRootFileSink.h>
#include <FairRootManager.h>
#include <TFile.h>
......@@ -58,8 +59,12 @@ public:
void DumpPlots()
{
TDirectory* oldir = gDirectory;
TFile* outFile = FairRootManager::Instance()->GetOutFile();
if (outFile != NULL) {
TFile* outFile = nullptr;
FairRootFileSink* sink = dynamic_cast<FairRootFileSink*>(FairRootManager::Instance()->GetSink());
if (sink) {
outFile = sink->GetRootFile();
}
if (outFile) {
outFile->cd();
if (!f1D.empty())
for (auto const& x : f1D)
......
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