#ifdef __GNUG__ #pragma implementation #endif #ifdef CDF1 #include "run1cpp/bnk/GenpParticle.hh" #endif #include "Stntuple/obj/TStnLepton.hh" ClassImp(TStnLepton) //______________________________________________________________________________ void TStnLepton::ReadV1(TBuffer &R__b) { // read V1 of TStnLepton (was autogenerated...) TObject::Streamer(R__b); fMomentum.Streamer(R__b); R__b >> fCharge; R__b >> fGenpNumber; } //______________________________________________________________________________ void TStnLepton::Streamer(TBuffer &R__b) { // Stream an object of class TStnLepton. UInt_t R__s, R__c; if (R__b.IsReading()) { Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v == 1) { // V1 streamer was auto-generated ReadV1(R__b); } else { // current version - V2 TObject::Streamer(R__b); fMomentum.Streamer(R__b); R__b >> fCharge; R__b >> fGenpNumber; R__b >> fObspNumber; } R__b.CheckByteCount(R__s, R__c,TStnLepton::IsA()); } else { R__c = R__b.WriteVersion(TStnLepton::IsA(), kTRUE); TObject::Streamer(R__b); fMomentum.Streamer(R__b); R__b << fCharge; R__b << fGenpNumber; R__b << fObspNumber; R__b.SetByteCount(R__c, kTRUE); } } //_____________________________________________________________________________ TStnLepton::TStnLepton() { fGenpNumber = -1; fObspNumber = -1; } //_____________________________________________________________________________ #ifdef CDF1 TStnLepton::TStnLepton(GENP_PARTICLE* mc) : fMomentum(*mc->Momentum()) { fMcNumber = mc->Number(); fCharge = mc->Charge(); } #else TStnLepton::TStnLepton(GENP_PARTICLE* mc) { } #endif //_____________________________________________________________________________ TStnLepton::~TStnLepton() { } //_____________________________________________________________________________ void TStnLepton::Copy(TObject& Obj) const { // copy contents of '*this' into Obj int nb = ((char*)&fObspNumber)-(char*)this + sizeof(Int_t); memcpy(&Obj,this,nb); }