示例#1
0
//______________________________________________________________________________
void ChangeRecoParam(Int_t startRun,const char* fromURI,const char* toURI)
{
  AliCDBManager::Instance()->SetDefaultStorage(fromURI);
  AliCDBManager::Instance()->SetRun(startRun);
  
  AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
  
  AliMpCDB::LoadAll();

  if (!entry) return;
  
  TObject* o = entry->GetObject();
  
  if (!o)
  {
    cout << "Could not get recoparams ? Oups" << endl;
    return;
  }
  
  if ( o->IsA() != TObjArray::Class() ) 
  {
    cout << "This code only works with TObjArray recoparams. Sorry" << endl;
    return;
  }
  
  TObjArray* array = static_cast<TObjArray*>(o);
  for ( Int_t i = 0; i <= array->GetLast(); ++i ) 
  {
    AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
    // if (AliRecoParam::Convert(p->GetEventSpecie())==AliRecoParam::kLowMult)
    // {
    //   cout << Form("array[%d]=%s %s %s",i,
    //                p ? p->ClassName() : "",
    //                p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
    //                p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
    //   p->Print("");
      AliMUONRecoParam* rp = dynamic_cast<AliMUONRecoParam*>(p);
      if (!rp) 
      {
        cout << "OUPS. OUPS" << endl;
        return;
      }
//      rp->SetHVLimit(2,1580);
      UInt_t mask = rp->PadGoodnessMask();
      mask |= ( (1<<7) << 24 );
      rp->SetPadGoodnessMask(mask);
      rp->Print("");
  }
  
  AliCDBManager::Instance()->SetDefaultStorage(toURI);
  
  AliMUONCDB::WriteToCDB(array, "MUON/Calib/RecoParam", startRun, AliCDBRunRange::Infinity(), 
                         "reconstruction parameters for MUON, patched to take into account the bit for bus patch removed online by PAR", "L. Aphecetche");
  
}
示例#2
0
//______________________________________________________________________________
void ChangeRecoParam(Int_t startRun=195767,const char* outputOCDB="alien://folder=/alice/cern.ch/user/l/laphecet/OCDB")
{
  AliCDBManager::Instance()->SetDefaultStorage("raw://");
  AliCDBManager::Instance()->SetRun(99999999);
  
  AliCDBEntry* entry = AliCDBManager::Instance()->Get("MUON/Calib/RecoParam");
  
  if (!entry) return;
  
  TObject* o = entry->GetObject();
  
  if (!o)
  {
    cout << "Could not get recoparams ? Oups" << endl;
    return;
  }
  
  if ( o->IsA() != TObjArray::Class() ) 
  {
    cout << "This code only works with TObjArray recoparams. Sorry" << endl;
    return;
  }
  
  TObjArray* array = static_cast<TObjArray*>(o);
  for ( Int_t i = 0; i <= array->GetLast(); ++i ) 
  {
    AliDetectorRecoParam* p = static_cast<AliDetectorRecoParam*>(array->At(i));
    if (AliRecoParam::Convert(p->GetEventSpecie())==AliRecoParam::kLowMult)
    {
      cout << Form("array[%d]=%s %s %s",i,
                   p ? p->ClassName() : "",
                   p ? AliRecoParam::GetEventSpecieName(AliRecoParam::Convert(p->GetEventSpecie())) :"",
                   p ? ( p->IsDefault() ? "default" : "") : "" ) << endl;
      p->Print("");
      AliMUONRecoParam* rp = dynamic_cast<AliMUONRecoParam*>(p);
      if (!rp) 
      {
        cout << "OUPS. OUPS" << endl;
        return;
      }
      rp->SetHVLimit(1,-99999);
      rp->SetPadGoodnessMask(0x400be93);
      rp->Print("");
    }
  }
  
  AliCDBManager::Instance()->SetDefaultStorage(outputOCDB);
  
  AliMUONCDB::WriteToCDB(array, "MUON/Calib/RecoParam", startRun, AliCDBRunRange::Infinity(), 
                         "reconstruction parameters for MUON, patched for event size limits (for DQM)", "L. Aphecetche");
  
}