@@ -44,10 +44,11 @@ void CalibratordEdx::finalizeSlot(Slot& slot)
4444 container->finalizeDebugOutput ();
4545 mCalibs .push_back (container->getCalib ());
4646
47- TFType startTF = slot.getTFStart ();
48- TFType endTF = slot.getTFEnd ();
49- auto startTime = slot.getStartTimeMS ();
50- auto endTime = slot.getEndTimeMS ();
47+ const TFType startTF = slot.getTFStart ();
48+ const TFType endTF = slot.getTFEnd ();
49+ const auto startTime = slot.getStartTimeMS ();
50+ const auto endTime = slot.getEndTimeMS ();
51+ const auto runNumber = container->getTFID ().runNumber ;
5152
5253 mTFIntervals .emplace_back (startTF, endTF);
5354 mTimeIntervals .emplace_back (startTime, endTime);
@@ -56,6 +57,7 @@ void CalibratordEdx::finalizeSlot(Slot& slot)
5657 LOGP (info, " Dumping time slot data to file" );
5758 auto calibCopy = container->getCalib ();
5859 *mDebugOutputStreamer << " CalibdEdx"
60+ << " runNumber=" << runNumber
5961 << " startTF=" << startTF // Initial time frame ID of time slot
6062 << " endTF=" << endTF // Final time frame ID of time slot
6163 << " startTime=" << startTime // Initial time frame time of time slot
@@ -65,17 +67,15 @@ void CalibratordEdx::finalizeSlot(Slot& slot)
6567 }
6668
6769 if (mDumpHistograms ) {
68- const auto fileName = fmt::format (" o2tpc_CalibratordEdx_Histos_{}_{}_{}_{}.root" , startTime, endTime, startTF, endTF);
6970 const auto dumpTHn = (mDumpHistograms & 0x1 ) == 0x1 ;
7071 const auto dumpTree = (mDumpHistograms & 0x2 ) == 0x2 ;
7172 if (dumpTree) {
72- container->writeTTree (fileName);
73+ const auto fileNameTree = fmt::format (" o2tpc_CalibratordEdx_Tree_{}_{}_{}_{}_{}.root" , runNumber, startTime, endTime, startTF, endTF);
74+ container->writeTTree (fileNameTree);
7375 }
7476 if (dumpTHn) {
75- auto f = std::make_unique<TFile>(fileName.data (), dumpTree ? " update" : " recreate" );
76- auto hn = container->getRootHist ();
77- hn->Write (" calibHist" );
78- f->Close ();
77+ const auto fileName = fmt::format (" o2tpc_CalibratordEdx_Histos_{}_{}_{}_{}_{}.root" , runNumber, startTime, endTime, startTF, endTF);
78+ container->dumpToFile (fileName.data ());
7979 }
8080 }
8181}
0 commit comments