Hi ROOT-fiends I'm having some trouble understanding the so-called "user bits" in TObject. I would like to have a TObject-derived object in which I use the existing bits as flags rather than adding extra member variables, like this: class BitClass : public TObject { public: SetOn() { SetBit(0); }; SetOff() { ResetBit(0); }; GetStatus() { return TestBit(0); }; } The question is : which bit numbers can I use with Set/Test/ResetBit ? According to the TObject ctor doc "the high 8 bits are reserved for system usage and the low 24 bits are user settable". But in TObject.h I see //----- Global bits (can be set for any object and should not be reused). //----- Bits 0 - 13 are reserved as global bits. Bits 14 - 23 can be used //----- in different class hierarchies (make sure there is no overlap in //----- any given hierarchy). D'ou slight confusion in my head. Sorry if this is trivial, but I have another "bit" question: which are the "high 8 bits" ? SetBit(0) through to SetBit(7) or SetBit(25) through to SetBit(32) ? Thanks a lot John -- John D. Frankland <mailto:frankland@ganil.fr> Beam Coordinator GANIL B.P. 55027 14076 CAEN Cedex 05 *tel:* +33 (0)231454628 *fax:* +33 (0)231454665
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET