From: morsch Date: Sat, 5 Jul 2014 19:02:05 +0000 (+0200) Subject: SetFlag GetFlag lifted to interface X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=a02060852650254a16086f9dff2a3196d7c57505 SetFlag GetFlag lifted to interface --- diff --git a/STEER/AOD/AliAODMCParticle.h b/STEER/AOD/AliAODMCParticle.h index 2a2d676d9b1..abcd46f7831 100644 --- a/STEER/AOD/AliAODMCParticle.h +++ b/STEER/AOD/AliAODMCParticle.h @@ -81,17 +81,17 @@ class AliAODMCParticle: public AliVParticle { virtual void SetGeneratorIndex(Short_t i) {fGeneratorIndex = i;} virtual Short_t GetGeneratorIndex() const {return fGeneratorIndex;} enum { kPrimary = 1<<0, kPhysicalPrim = 1<<1, kSecondaryFromWeakDecay = 1<<2, kSecondaryFromMaterial = 1 <<3}; // use only the first 8bits! - void SetFlag(UInt_t flag){fFlag = flag;} // carefull flag encodes three different types of information - UInt_t GetFlag() const {return fFlag;} + virtual void SetFlag(UInt_t flag){fFlag = flag;} // carefull flag encodes three different types of information + virtual UInt_t GetFlag() const {return fFlag;} // for the status we use the upper 16 bits/2 bytes of the flag word void SetStatus(Int_t status){ if(status<0)return; // a TParticle can have a negative status, catch this here and do nothing - fFlag &= 0xffff; // reset the upper bins keep the lower bins + fFlag &= 0xffff; // reset the upper bins keep the lower bins fFlag |= (((UInt_t)status)<<16); // bit shift by 16 } - UInt_t GetStatus() const { + virtual UInt_t GetStatus() const { // bit shift by 16 return fFlag>>16; }