FairRootGroup / FairRoot

C++ simulation, reconstruction and analysis framework for particle physics experiments
http://fairroot.gsi.de
Other
57 stars 96 forks source link

Inconsistent "Register" APIs and semantics in `FairRootManager` #1569

Open dennisklein opened 2 months ago

dennisklein commented 2 months ago

There is another issue about branch IO of FairRootManger:

There are two different, independent branch registries: fAnyBranchMap and fMap. These are used by different APIs of FairRootManager:

  1. fAnyBranchMap is used by RegisterAny and InitObjectAs.
  2. fMap is used by Register and GetObject.

Any branch registered in one way cannot be read by another way.

What's even more "interesting" is that the event header (online run) is always registered in fMap but not in fAnyBranchMap. So you may find that you can get a valid event header from GetObject but mysteriously nullptr from InitObjectAs.

Originally posted by @YanzhaoW in https://github.com/FairRootGroup/FairRoot/issues/1557#issuecomment-2186937097