From: cvetan Date: Mon, 14 Jul 2008 16:33:25 +0000 (+0000) Subject: Getters for period,orbit,bc added to the raw-readers. Removing the indirect of gettin... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=151bea4e77af2bbac50a97a0a8207e3ed99dd2e4 Getters for period,orbit,bc added to the raw-readers. Removing the indirect of getting this numbers in the reco and use the newly added getters. --- diff --git a/RAW/AliRawReader.h b/RAW/AliRawReader.h index c97494ac722..624e8c28700 100644 --- a/RAW/AliRawReader.h +++ b/RAW/AliRawReader.h @@ -47,6 +47,18 @@ class AliRawReader: public TObject { virtual UInt_t GetType() const = 0; virtual UInt_t GetRunNumber() const = 0; virtual const UInt_t* GetEventId() const = 0; + UInt_t GetPeriod() const { + const UInt_t *id = GetEventId(); + return (((id)[0]>>4)&0x0fffffff); + } + UInt_t GetOrbitID() const { + const UInt_t *id = GetEventId(); + return ((((id)[0]<<20)&0xf00000)|(((id)[1]>>12)&0xfffff)); + } + UShort_t GetBCID() const { + const UInt_t *id = GetEventId(); + return ((id)[1]&0x00000fff); + } virtual const UInt_t* GetTriggerPattern() const = 0; virtual const UInt_t* GetDetectorPattern() const = 0; virtual const UInt_t* GetAttributes() const = 0; diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index d8f5241376d..0ba21edff87 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -2116,23 +2116,16 @@ Bool_t AliReconstruction::FillRawEventHeaderESD(AliESDEvent*& esd) // Filling information from RawReader Header // + if (!fRawReader) return kFALSE; + AliInfo("Filling information from RawReader Header"); - esd->SetBunchCrossNumber(0); - esd->SetOrbitNumber(0); - esd->SetPeriodNumber(0); - esd->SetTimeStamp(0); - esd->SetEventType(0); - const AliRawEventHeaderBase * eventHeader = fRawReader->GetEventHeader(); - if (eventHeader){ - - const UInt_t *id = eventHeader->GetP("Id"); - esd->SetBunchCrossNumber((id)[1]&0x00000fff); - esd->SetOrbitNumber((((id)[0]<<20)&0xf00000)|(((id)[1]>>12)&0xfffff)); - esd->SetPeriodNumber(((id)[0]>>4)&0x0fffffff); - - esd->SetTimeStamp((eventHeader->Get("Timestamp"))); - esd->SetEventType((eventHeader->Get("Type"))); - } + + esd->SetBunchCrossNumber(fRawReader->GetBCID()); + esd->SetOrbitNumber(fRawReader->GetOrbitID()); + esd->SetPeriodNumber(fRawReader->GetPeriod()); + + esd->SetTimeStamp(fRawReader->GetTimestamp()); + esd->SetEventType(fRawReader->GetType()); return kTRUE; }