Skip to content

Commit 96fafb9

Browse files
jackal1-66sawenzel
authored andcommitted
Update MC header when using event pool generator
1 parent 47fced5 commit 96fafb9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Generators/include/Generators/GeneratorFromFile.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,10 @@ class GeneratorFromO2Kine : public o2::eventgen::Generator
8787
void SetStartEvent(int start);
8888

8989
void setContinueMode(bool val) { mContinueMode = val; };
90-
91-
private:
9290
/** methods that can be overridden **/
9391
void updateHeader(o2::dataformats::MCEventHeader* eventHeader) override;
9492

93+
private:
9594
TFile* mEventFile = nullptr; //! the file containing the persistent events
9695
TBranch* mEventBranch = nullptr; //! the branch containing the persistent events
9796
TBranch* mMCHeaderBranch = nullptr; //! branch containing MC event headers
@@ -143,6 +142,11 @@ class GeneratorFromEventPool : public o2::eventgen::Generator
143142
return import_good;
144143
}
145144

145+
void updateHeader(o2::dataformats::MCEventHeader* eventHeader) override
146+
{
147+
mO2KineGenerator->updateHeader(eventHeader);
148+
}
149+
146150
// determine the collection of available files
147151
std::vector<std::string> setupFileUniverse(std::string const& path) const;
148152

0 commit comments

Comments
 (0)