Hi,
I have a custom class that I store into a TTree. There is one member in the class I do not want to store in the tree. I only know of two possible options.
-
Add the individual class members by hand i.e. hard code it.
This seems way too cumbersome since I have over 30 class member and I just don’t want to keep about 5 of them. -
Use the “//!” option in the class definition.
class Custom : public TObject {
public:
Custom() {;}
~Custom() {;}
int keep;
int notkeep; //! <-- don't want to use this
ClassDef(Custom, 1)
}
This doesn’t help because I also want to make another tree that keeps the variable I threw away from the original tree.
Is there a 3rd option? Preferably, I would make a branch for the whole class. Then remove one or more resulting TLeafs from the tree before I start filling the tree.
Surge