Skip to content

Commit 745cb1a

Browse files
sawenzelclaude
andcommitted
Initialise the output pointers of the o2-sim hit merger
This fixes the hit merger when it runs without disc output. - The kinematics and MC-header file and tree pointers were never initialised. - With --noDiscOutput they stayed garbage, and the merge tested them as if they were valid trees. - They are now initialised to nullptr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 72dab53 commit 745cb1a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎run/O2HitMerger.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,10 @@ class O2HitMerger : public fair::mq::Device
849849
std::string mOutFileName; //!
850850

851851
// structures for the final flush
852-
TFile* mOutFile; //! outfile for kinematics
853-
TTree* mOutTree; //! tree (kinematics) associated to mOutFile
854-
TFile* mMCHeaderOnlyOutFile; //! outfile for header only information
855-
TTree* mMCHeaderTree; //! tree to hold MCHeader branch in mMCHeaderOnlyOutFile;
852+
TFile* mOutFile = nullptr; //! outfile for kinematics
853+
TTree* mOutTree = nullptr; //! tree (kinematics) associated to mOutFile
854+
TFile* mMCHeaderOnlyOutFile = nullptr; //! outfile for header only information
855+
TTree* mMCHeaderTree = nullptr; //! tree to hold MCHeader branch in mMCHeaderOnlyOutFile;
856856

857857
template <class K, class V>
858858
using Hashtable = tbb::concurrent_unordered_map<K, V>;

0 commit comments

Comments
 (0)