Skip to content

Add Reset() to Container and EventHeader and add UndefValueDouble - #154

Merged
lubynets merged 1 commit into
HeavyIonAnalysis:masterfrom
fjlinz:reset
Oct 22, 2026
Merged

lubynets merged 1 commit into
HeavyIonAnalysis:masterfrom
fjlinz:reset

Conversation

@fjlinz

@fjlinz fjlinz commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

An EventHeader is not cleared between tree entries. If a converter has nothing to fill for an entry, the values of the previous entry are silently written again. One example is a reconstructed event without a matched MC event.
This is a way to clear an object before it is filled again for the next tree entry:

  • New constant UndefValueDouble (-999.). Until now the double field type (Introduce new field type double #152) had no matching "undefined" value. Maybe to be added?
  • Container::Reset() sets all user-defined fields to "undefined" values: UndefValueDouble, UndefValueFloat, UndefValueInt, and false for booleans.
  • EventHeader::Reset() does the same and also sets the vertex position to UndefValueFloat.

Things to keep in mind:

  • Booleans have no "undefined" value, so false is used.
  • Track, Particle, Hit and Module keep their current behaviour (Container::Reset() only touches user-defined fields there).

@fjlinz

fjlinz commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@lubynets Also this is a very much needed extensio to cope with the matching in time-based mode.

I will also have an update to the matching which I am about to finalize...

@lubynets

Copy link
Copy Markdown
Contributor

Hi Frederic, thanks a lot for both developments!

@lubynets
lubynets merged commit b88c200 into HeavyIonAnalysis:master Oct 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants