当前位置: 首页>>代码示例>>C++>>正文


C++ AliCDBEntry::GetMetaData方法代码示例

本文整理汇总了C++中AliCDBEntry::GetMetaData方法的典型用法代码示例。如果您正苦于以下问题:C++ AliCDBEntry::GetMetaData方法的具体用法?C++ AliCDBEntry::GetMetaData怎么用?C++ AliCDBEntry::GetMetaData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AliCDBEntry的用法示例。


在下文中一共展示了AliCDBEntry::GetMetaData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ChangeRunRange

Bool_t ChangeRunRange(const char* objectPath,
                      int run1=0, int run2=AliCDBRunRange::Infinity(),
                      const char* inputOCDB="alien://folder=/alice/data/2013/OCDB",
                      const char* outputOCDB="alien://folder=/alice/cern.ch/user/l/laphecet/OCDB2013") 
{
  AliCDBManager* man = AliCDBManager::Instance();
  
  man->SetDefaultStorage(inputOCDB);
  
  AliCDBEntry* e = man->Get(objectPath,AliCDBRunRange::Infinity());
  
  if (!e)
  {
    cout << Form("ERROR : could not get %s from %s",objectPath,inputOCDB) << endl;
    return kFALSE;
  }
  
  e->GetId().SetRunRange(run1,run2);
  
  AliCDBMetaData* md = e->GetMetaData();
  
  md->SetResponsible("L. Aphecetche and P. Pillot"); // to insure we have no $Id$ in the metadata fields (see https://savannah.cern.ch/bugs/?95527)
  
  man->SetDefaultStorage(outputOCDB);
 
  return man->Put(e->GetObject(),e->GetId(),e->GetMetaData());
}
开发者ID:aphecetche,项目名称:acode,代码行数:27,代码来源:ChangeRunRange.C

示例2: printf

ReadRecoParam(const Int_t runNumber)
{
  // Read the array of PHOS recoparam objects from OCDB and
  // print its content to stdout

  AliCDBManager::Instance()->SetDefaultStorage("raw://");
  AliCDBManager::Instance()->SetRun(runNumber);

  AliCDBEntry* cdbEntry = AliCDBManager::Instance()->Get("PHOS/Calib/RecoParam");
  AliCDBMetaData *md = cdbEntry->GetMetaData();
  printf("Responsible: %s\n",md->GetResponsible());
  printf("MD Comment : %s\n",md->GetComment());
  TObjArray* arrayRecoParam = (TObjArray*)cdbEntry->GetObject();

  AliPHOSRecoParam *rp = 0;
  for (Int_t i=0; i<arrayRecoParam->GetEntries(); i++) {
    rp = (AliPHOSRecoParam*)arrayRecoParam->At(i);
    printf("Recoparam %d: event specie = %d\n",
	   i,rp->GetEventSpecie());

    printf("\tEMCClusteringThreshold = %g\n",rp->GetEMCClusteringThreshold());
    printf("\tEMCLocalMaxCut         = %g\n",rp->GetEMCLocalMaxCut());
    printf("\tEMCRawDigitThreshold   = %g\n",rp->GetEMCRawDigitThreshold());
    printf("\tEMCMinE                = %g\n",rp->GetEMCMinE());
    printf("\tEMCLogWeight           = %g\n",rp->GetEMCLogWeight());
    printf("\tEMCSampleQualityCut    = %g\n",rp->GetEMCSampleQualityCut());
    printf("\tEMCEcoreRadius         = %g\n",rp->GetEMCEcoreRadius());
    printf("\tEMCEcore2ESD           = %d\n",rp->EMCEcore2ESD());
    printf("\tEMCSubtractPedestals   = %d\n",rp->EMCSubtractPedestals());
    printf("\tEMCToUnfold            = %d\n",rp->EMCToUnfold());
    printf("\tEMCfitter version      = %s\n",rp->EMCFitterVersion());
    printf("\tEMCEnergyCorrectionOn  = %d\n",rp->GetEMCEnergyCorrectionOn());
    printf("\tGlobalAltroOffset      = %f\n",rp->GetGlobalAltroOffset());
    printf("\tGlobalAltroThreshold   = %d\n",rp->GetGlobalAltroThreshold());
    printf("\tTimeGateAmpThresh      = %g\n",rp->GetTimeGateAmpThresh());
    printf("\tTimeGateLow            = %g\n",rp->GetTimeGateLow());
    printf("\tTimeGateHigh           = %g\n",rp->GetTimeGateHigh());
    printf("\tNonlinearityCorrectionVersion = %s\n",rp->GetNonlinearityCorrectionVersion());
  }
}
开发者ID:alisw,项目名称:AliRoot,代码行数:40,代码来源:UpdateRecoParam.C

示例3: id

UpdateRecoParam(const Int_t runNumber)
{
  // Read the array of PHOS recoparam objects from OCDB and update
  // EMC fitter version to "v4".
  // Write the updated object to OCDB.
  // Yuri Kharlov. 9.12.2011
  //
  /* $Id$ */

  AliCDBManager::Instance()->SetDefaultStorage("raw://");
  AliCDBManager::Instance()->SetRun(runNumber);

  AliCDBEntry* cdbEntry = AliCDBManager::Instance()->Get("PHOS/Calib/RecoParam");
  AliCDBMetaData *md = cdbEntry->GetMetaData();
  cout << "Responsible: " << md->GetResponsible() << endl;
  cout << "MD Comment : " << md->GetComment() << endl;
  TObjArray* arrayRecoParam = (TObjArray*)cdbEntry->GetObject();

  cout << "N recoparam = " << arrayRecoParam->GetEntries() << endl;

  AliPHOSRecoParam *rp = 0;
  for (Int_t i=0; i<arrayRecoParam->GetEntries(); i++) {
    rp = (AliPHOSRecoParam*)arrayRecoParam->At(i);
    printf("RP %d: event specie = %d, fitter version = %s\n",
	   i,rp->GetEventSpecie(),rp->EMCFitterVersion());
    rp->SetEMCFitterVersion("v4");
  }

  // Writing new recoparam to OCDB

  AliCDBManager* cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage("local://OCDB");

  AliCDBMetaData *md= new AliCDBMetaData();
  md->SetResponsible("Yuri Kharlov");
  md->SetComment("PHOS recoparameters: EMC fitter version is updated to v4");
  AliCDBId id("PHOS/Calib/RecoParam",167690,AliCDBRunRange::Infinity());
  cdb->Put(arrayRecoParam,id, md);

}
开发者ID:alisw,项目名称:AliRoot,代码行数:40,代码来源:UpdateRecoParam.C


注:本文中的AliCDBEntry::GetMetaData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。