X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2Frec%2FAliHLTMiscImplementation.cxx;h=7774f5377b599bcc3daefb474a607c3f52473f9e;hb=95ea76b58762ac018faa46302420a3e0f388dcc8;hp=04511655d3d1156eb364d0df5f163adccb063816;hpb=73305a9321519200f12f8d7646333715eecf1c0a;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/rec/AliHLTMiscImplementation.cxx b/HLT/rec/AliHLTMiscImplementation.cxx index 04511655d3d..7774f5377b5 100644 --- a/HLT/rec/AliHLTMiscImplementation.cxx +++ b/HLT/rec/AliHLTMiscImplementation.cxx @@ -21,6 +21,10 @@ /// @date /// @brief Miscellaneous methods for the HLT AliRoot integration +// define will be set set from configure.ac, but for now it needs +// to be set until the changes in STEER have been committed +#define HAVE_NOT_ALIESDHLTDECISION + #include "AliHLTMiscImplementation.h" #include "AliHLTLogging.h" #include "AliCDBManager.h" @@ -28,7 +32,12 @@ #include "AliCDBEntry.h" #include "AliGRPManager.h" #include "AliRawReader.h" +#include "AliTracker.h" +#ifndef HAVE_NOT_ALIESDHLTDECISION +#include "AliESDHLTDecision.h" +#endif //HAVE_NOT_ALIESDHLTDECISION #include "TGeoGlobalMagField.h" +#include "AliHLTGlobalTriggerDecision.h" /** ROOT macro for the implementation of ROOT specific class methods */ ClassImp(AliHLTMiscImplementation); @@ -144,3 +153,52 @@ AliHLTUInt64_t AliHLTMiscImplementation::GetTriggerMask(AliRawReader* rawReader) } return trgMask; } + +Double_t AliHLTMiscImplementation::GetBz() +{ + // Returns Bz. + return AliTracker::GetBz(); +} + +Double_t AliHLTMiscImplementation::GetBz(const Double_t *r) +{ + // Returns Bz (kG) at the point "r" . + return AliTracker::GetBz(r); +} + +void AliHLTMiscImplementation::GetBxByBz(const Double_t r[3], Double_t b[3]) +{ + // Returns Bx, By and Bz (kG) at the point "r" . + return AliTracker::GetBxByBz(r, b); +} + +const TClass* AliHLTMiscImplementation::IsAliESDHLTDecision() const +{ + // Return the IsA of the AliESDHLTDecision class +#ifndef HAVE_NOT_ALIESDHLTDECISION + return AliESDHLTDecision::Class(); +#else // HAVE_NOT_ALIESDHLTDECISION + return NULL; +#endif // HAVE_NOT_ALIESDHLTDECISION +} + +int AliHLTMiscImplementation::Copy(const AliHLTGlobalTriggerDecision* pDecision, TObject* object) const +{ + // Copy HLT global trigger decision to AliESDHLTDecision container + if (!pDecision || !object) return -EINVAL; +#ifndef HAVE_NOT_ALIESDHLTDECISION + AliESDHLTDecision* pESDHLTDecision=NULL; + if (object->IsA()==NULL || + object->IsA() != AliESDHLTDecision::Class() || + (pESDHLTDecision=dynamic_cast(object))==NULL) { +// HLTError("can not copy HLT global decision to object of class \"%s\"", +// object->IsA()?object->IsA()->GetName():"NULL"); + return -EINVAL; + } + + pESDHLTDecision->~AliESDHLTDecision(); + new (pESDHLTDecision) AliESDHLTDecision(pDecision->GetTitle()); + +#endif // HAVE_NOT_ALIESDHLTDECISION + return 0; +}