This seems like a nice way to deal with changing GEnv of input files when TSelector loops over a TChain instead of a TTree. The obvious drawback however is that I needed TSelector::GetEntry() to be defined as what it is supposed to do, although it is never called by TTreePlayer (i.e. your selector works fine without it). But since I also checked for zero local entries (which is also a sign that the input file might have changed), this only poses a problem if entries are to be read non-sequentially, and this is a very rare occasion. Bottom line would be:  * Entries read sequentially and no GetEntry() defined -> no overhead and secure  * GetEntry() defined -> produces a little overhead, still secure  * Entries read non-sequentially and no GetEntry() defined   -> GEnv might be from the previous input file
This seems like a nice way to deal with changing GEnv of input files when
TSelector loops over a TChain instead of a TTree. The obvious drawback however
is that I needed TSelector::GetEntry() to be defined as what it is supposed to
do, although it is never called by TTreePlayer (i.e. your selector works fine
without it).
But since I also checked for zero local entries (which is also a
sign that the input file might have changed), this only poses a problem if
entries are to be read non-sequentially, and this is a very rare occasion.
Bottom line would be:
 * Entries read sequentially and no GetEntry() defined -> no overhead and secure
 * GetEntry() defined -> produces a little overhead, still secure
 * Entries read non-sequentially and no GetEntry() defined
  -> GEnv might be from the previous input file

tudo-physik-e4/froast,tudo-physik-e4/froast,oschulz/froast,oschulz/froast