+ AliMUONRecoParam* recoParam(0x0);
+
+ AliCDBEntry* e = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam",runNumber);
+ if (e)
+ {
+ TObject* o = e->GetObject();
+ if ( o->IsA() == TObjArray::Class() )
+ {
+ TObjArray* a = static_cast<TObjArray*>(o);
+// a->SetOwner(kTRUE); // FIXME: this should be done but somehow makes the reco crash at the end at cleaning stage... investigate why ?
+ TIter next(a);
+ AliMUONRecoParam* p;
+ while ( ( p = static_cast<AliMUONRecoParam*>(next()) ))
+ {
+ if ( p->IsDefault()) recoParam = p;
+ }
+ }
+ else
+ {
+ recoParam = static_cast<AliMUONRecoParam*>(o);
+ }
+ }
+ if (!recoParam)
+ {
+ AliError("Cannot get the recoParam. Failing");
+ return;
+ }
+
+ // OK. Now get all we need and work...
+
+ AliMUONCalibrationData calib(runNumber);
+
+ Ctor(calib,recoParam,kFALSE);