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


C++ AliCDBManager类代码示例

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


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

示例1: MakeADLightYieldsEntry

void MakeADLightYieldsEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB")
{

  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage(outputCDB);

  // Creation of the light yields OCDB object
  const Double_t lightYieldCorr[18] = {0.0,
				       2.2e-4,2.2e-4,2.2e-4,2.2e-4, 2.2e-4,2.2e-4,2.2e-4,2.2e-4,
                                       2.4e-4,2.4e-4,2.6e-4,2.6e-4, 2.4e-4,2.4e-4,2.6e-4,2.6e-4,
				       0.0};

  TH1F *yields = new TH1F("ADLightYields", "AD Light Yields", 16, -0.5, 15.5);
  yields->SetContent(lightYieldCorr);

  AliCDBMetaData *md = new AliCDBMetaData(); // metaData describing the object
  md->SetResponsible("Michal Broz");
  md->SetBeamPeriod(0);
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetComment("Light Yields channel by channel");
  md->PrintMetaData();

  AliCDBId id("AD/Calib/LightYields", 0, AliCDBRunRange::Infinity());
  man->Put(yields, id, md);

  delete md;

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

示例2: MakeADTimeDelaysEntry

void MakeADTimeDelaysEntry(const char *outputCDB = "local://$ALICE_ROOT/../AliRoot/OCDB")
{

  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage(outputCDB);

  // Creation of the time delays OCDB object
  //const Double_t timeShift[18] = {0.0, 203.2, 203.4, 203.5, 203.0, 203.4, 203.5, 203.1, 203.2, 194.2, 194.4, 194.5, 194.2, 194.7, 194.5, 194.3, 192.8, 0.0};
  const Double_t timeShift[18] = {0.0, 61.6091, 61.1891, 60.5191, 61.3591, 60.7691, 62.0291, 61.1091, 61.4591, 62.3491, 62.7891, 59.7791, 60.0991, 63.3091, 62.7691, 59.6491, 61.5091, 0.0};
  TH1F *delays = new TH1F("ADTimeDelays", "AD Time delays", 16, -0.5, 15.5);
  delays->SetContent(timeShift);
	
  AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
  md->SetResponsible("Michal Broz");
  md->SetBeamPeriod(0);
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetComment("Time delays channel by channel");
  md->PrintMetaData();

  AliCDBStorage *storLoc = man->GetDefaultStorage();
  AliCDBId id("AD/Calib/TimeDelays", 0, AliCDBRunRange::Infinity());

  man->Put(delays, id, md);

  delete md;

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

示例3: MakeVZEROTimeDelaysEntryRun2

void MakeVZEROTimeDelaysEntryRun2()
{

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

  // Creation of the time delays OCDB object

  const Double_t timeShift[66] = {0.0 , 263.453366 , 263.554201 , 263.455896 , 263.705908 , 263.178068 , 263.260511 , 263.352692 , 263.371615 , 264.275609 , 263.022590 , 263.923256 , 263.477724 , 263.328535 , 263.338143 , 263.684347 , 263.636735 , 264.240256 , 264.704787 , 263.341181 , 265.875077 , 264.362158 , 264.009584 , 263.985062 , 264.507631 , 264.711630 , 264.702209 , 264.983539 , 265.156149 , 265.340929 , 265.185957 , 265.402229 , 267.060006 , 260.193899 , 260.831277 , 260.870380 , 260.231921 , 259.848971 , 263.069287 , 262.829099 , 261.297212 , 260.468547 , 260.962657 , 260.754787 , 260.782074 , 260.244392 , 263.248285 , 262.224661 , 259.936356 , 262.307604 , 262.698634 , 262.259535 , 262.425491 , 262.041006 , 264.711811 , 264.537483 , 262.019158 , 263.940932 , 263.309260 , 263.819921 , 264.324985 , 263.419804 , 265.954522 , 266.150658 , 263.942502 , 0.0};
  TH1F *delays = new TH1F("VZEROTimeDelays","VZERO Time delays",64,-0.5,63.5);
  delays->SetContent(timeShift);
	
  AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
  md->SetResponsible("Brigitte Cheynis");
  md->SetBeamPeriod(0);
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetComment("Time delays channel by channel for Run2");
  md->PrintMetaData();

  AliCDBId id("VZERO/Calib/TimeDelays",215011,AliCDBRunRange::Infinity());

  man->Put(delays, id, md);

  delete md;

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

示例4: MakeCDBEntryTriggerMask

MakeCDBEntryTriggerMask(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity())
{

  UInt_t triggerMask[72];
  for (Int_t i = 0; i < 72; i++)
    triggerMask[i] = 0xffffff;

  /* create object */
  AliTOFTriggerMask *obj = new AliTOFTriggerMask();
  obj->SetTriggerMaskArray(triggerMask);

  /* create cdb info */
  AliCDBId id("TRIGGER/TOF/TriggerMask", startRun, endRun);
  AliCDBMetaData *md = new AliCDBMetaData();
  md->SetResponsible("Roberto Preghenella");
  md->SetComment("TOF Trigger Mask");
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetBeamPeriod(0);

  /* put object in cdb */
  AliCDBManager *cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  cdb->GetDefaultStorage()->Put(obj, id, md);

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

示例5: OCDBDefault

void OCDBDefault(Int_t mode)
{

  Int_t run  = atoi(gSystem->Getenv("CONFIG_RUN"));  
  AliCDBManager* man = AliCDBManager::Instance();
  man->SetDefaultStorage("raw://");
  
  if(gSystem->Getenv("CONFIG_OCDBTIMESTAMP"))
  {
    TString t = gSystem->Getenv("CONFIG_OCDBTIMESTAMP");
    TObjArray* list =t.Tokenize("_");
    UInt_t tU[6];
    for(Int_t i=0; i<list->GetEntries(); i++)
    {
      TString st = ((TObjString*)list->At(i))->GetString();
      tU[i] =(UInt_t)atoi(st.Data());
    }
    man->SetMaxDate(TTimeStamp(tU[0], tU[1], tU[2], tU[3], tU[4], tU[5]));
    printf("*** Setting custom OCDB time stamp %s ***\n", t.Data());
  }
  
  man->SetRun(run);
  
  // set detector specific paths
  DefaultSpecificStorage(man, mode);

}
开发者ID:alisw,项目名称:AliDPG,代码行数:27,代码来源:OCDBConfig.C

示例6: 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

示例7: rec

void rec() {
	//  AliLog::SetGlobalDebugLevel(10);
	AliCDBManager * man = AliCDBManager::Instance();
	man->SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-10-Release/Residual/");
	man->SetSpecificStorage("EMCAL/*","local://DB");
	
	AliReconstruction reco;
	AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k5kG);
	AliTracker::SetFieldMap(field,kTRUE);
	reco.SetUniformFieldTracking(kFALSE);
	reco.SetWriteESDfriend();
	reco.SetWriteAlignmentData();
  
	AliTPCRecoParam * tpcRecoParam = AliTPCRecoParam::GetLowFluxParam();
	AliTPCReconstructor::SetRecoParam(tpcRecoParam);
	AliTPCReconstructor::SetStreamLevel(0);
	reco.SetRunReconstruction("ITS TPC TRD TOF HMPID PHOS EMCAL MUON T0 VZERO FMD PMD ZDC");
	//reco.SetInput("raw.root") ;
	//AliPHOSRecoParam* recEmc = new AliPHOSRecoParamEmc();
//	recEmc->SetSubtractPedestals(kFALSE);
//	AliPHOSReconstructor::SetRecoParamEmc(recEmc);  
	reco.SetRunQA(kFALSE) ; 

	TStopwatch timer;
	timer.Start();
	reco.Run();
	timer.Stop();
	timer.Print();
}
开发者ID:JanFSchulte,项目名称:monalisa,代码行数:29,代码来源:rec.C

示例8: CreateOnlineCalibPars_CalibHisto

void CreateOnlineCalibPars_CalibHisto(){
  // Create TOF Calibration Object from AliTOFcalibHisto class
  // and write it on CDB

  AliTOFcalib *tofcalib = new AliTOFcalib();
  tofcalib->CreateCalArrays();
  AliTOFChannelOnlineArray *delayArray = (AliTOFChannelOnlineArray*) tofcalib->GetTOFOnlineDelay();

  /* get calib histo andl and load params */
  AliTOFcalibHisto calibHisto;
  calibHisto.LoadCalibPar();

  /* turn time-slewing correction off to only retrieve constants */
  calibHisto.SetFullCorrectionFlag(AliTOFcalibHisto::kTimeSlewingCorr, kFALSE);

  /* OCDB init */
  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  Int_t nChannels = AliTOFGeometry::NSectors()*(2*(AliTOFGeometry::NStripC()+AliTOFGeometry::NStripB())+AliTOFGeometry::NStripA())*AliTOFGeometry::NpadZ()*AliTOFGeometry::NpadX();
  
  /* channel-related params */
  Double_t delay;
  for (Int_t ipad = 0 ; ipad<nChannels; ipad++){
    AliTOFChannelOnline *calChannelOnline = (AliTOFChannelOnline *)tofCalOnline->At(ipad);
    delay = calibHisto.GetFullCorrection(ipad);
    delayArray->SetDelay(ipad, delay);
  }

  /* write */
  tofcalib->WriteParOnlineDelayOnCDB("TOF/Calib",0,AliCDBRunRange::Infinity());
}
开发者ID:alisw,项目名称:AliRoot,代码行数:31,代码来源:CreateOnlineCalibPars_CalibHisto.C

示例9: MakeMUONRecoParamArray

//-----------------------------------------------------------------------
void MakeMUONRecoParamArray(Int_t startRun = 0, 
                            Int_t endRun = AliCDBRunRange::Infinity(),
                            const char* settings="ppIdeal")
{
  /// set the reconstruction parameters and store them in the OCDB ($ALICE_ROOT/OCDB/MUON/Calib/RecoParam/).
  ///
  /// - make a CDB entry for the run range [startRun, endRun]
  ///
  /// for the possible values of settings, please see AliMUONRecoParam::Create
  
  // init CDB
  AliCDBManager* man = AliCDBManager::Instance();
  
  if (!man->IsDefaultStorageSet()) 
  {
    man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");    
  }
  
  man->SetRun(startRun);
  
  TObjArray* recoParams = AliMUONRecoParam::Create(settings);
  
  if (recoParams)
  {
    // save RecoParam in CDB
    AliMUONCDB::WriteToCDB(recoParams, "MUON/Calib/RecoParam", startRun, endRun, 
                           "reconstruction parameters for MUON", "L. Aphecetche and P. Pillot");
  }
  
  delete recoParams;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:32,代码来源:MakeMUONRecoParamArray.C

示例10: PrintAlignment

void
PrintAlignment()
{
  AliCDBManager* cdb   = AliCDBManager::Instance();
  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  AliCDBEntry*   align = cdb->Get("FMD/Align/Data");
  if (!align) {
    Error("PrintAlignment","didn't alignment data from CDB");
    return;
  }
  
  TClonesArray* array = dynamic_cast<TClonesArray*>(align->GetObject());
  if (!array) {
    Warning("PrintAlignement", "Invalid align data from CDB");
    return;
  }
  Int_t nAlign = array->GetEntries();
  for (Int_t i = 0; i < nAlign; i++) {
    AliAlignObjParams* a = static_cast<AliAlignObjParams*>(array->At(i));
    Double_t ang[3];
    Double_t trans[3];
    a->GetAngles(ang);
    a->GetTranslation(trans);
    std::cout << a->GetVolPath() << "\n" 
	      << "  translation: "
	      << "(" << std::setw(12) << trans[0] 
	      << "," << std::setw(12) << trans[1] 
	      << "," << std::setw(12) << trans[2] << ")\n"
	      << "  rotation:    "
	      << "(" << std::setw(12) << ang[0] 
	      << "," << std::setw(12) << ang[1] 
	      << "," << std::setw(12) << ang[2]  << ")" << std::endl;
    // a->Print();
  }
}
开发者ID:alisw,项目名称:AliRoot,代码行数:35,代码来源:PrintAlignment.C

示例11: MakeLHCClockPhaseEntry

void MakeLHCClockPhaseEntry(const char *cdbStorage = "local://$ALICE_ROOT/OCDB")
{
  // Example macro to put in OCDB the default (=0) LHC-clock phase
  // It is valid fro runs from 0 to inf
  // The timestamp range is also inf (we store the first and last value for
  // each beam)
  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage(cdbStorage);

  AliLHCClockPhase phaseObj;

  phaseObj.AddPhaseB1DP(0,0.);
  phaseObj.AddPhaseB2DP(0,0.);

  phaseObj.AddPhaseB1DP(2147483647,0.);
  phaseObj.AddPhaseB2DP(2147483647,0.);

  AliCDBMetaData* metadata = new AliCDBMetaData();
  metadata->SetResponsible("Cvetan Cheshkov");
  metadata->SetComment("Default LHC-clock phase object");
  AliCDBId id("GRP/Calib/LHCClockPhase",0,AliCDBRunRange::Infinity());

  man->Put(&phaseObj,id,metadata);

  return;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:26,代码来源:MakeLHCClockPhaseEntry.C

示例12: MakeVZEROTimeDelaysEntry

void MakeVZEROTimeDelaysEntry()
{

  AliCDBManager *man = AliCDBManager::Instance();
  man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");

  // Creation of the time delays OCDB object
  const Double_t timeShift[66] = {0.0 , 0.477957 , 0.0889999 , 0.757669 , 0.205439 , 0.239666 , -0.183705 , 0.442873 , -0.281366 , 0.260976 , 0.788995 , 0.974758 , 0.548532 , 0.495023 , 0.868472 , 0.661167 , 0.358307 , 0.221243 , 0.530179 , 1.26696 , 1.33082 , 1.27086 , 1.77133 , 1.10253 , 0.634806+0.885 , 2.14838 , 1.50212 , 1.59253 , 1.66122+0.740 , 1.16957 , 1.52056 , 1.47791 , 1.81905 , -1.94123 , -1.29124-0.350 , -2.16045 , -1.78939 , -3.11111 , -1.87178 , -1.57671-0.560 , -1.70311 , -1.81208 , -1.94475 , -2.53058+0.930 , -1.7042 , -2.08109 , -1.84416 , -0.61073 , -1.77145 , 0.16999 , -0.0585339 , 0.00401133 , 0.397726 , 0.851111 , 0.264187 , 0.59573 , -0.158263 , 0.584362 , 1.20835 , 0.927573 , 1.13895 , 0.64648 , 2.18747 , 1.68909 , 0.451194 , 0.0};
  TH1F *delays = new TH1F("VZEROTimeDelays","VZERO Time delays",64,-0.5,63.5);
  delays->SetContent(timeShift);
	
  AliCDBMetaData *md= new AliCDBMetaData(); // metaData describing the object
  md->SetResponsible("Brigitte Cheynis");
  md->SetBeamPeriod(0);
  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
  md->SetComment("Time delays channel by channel for year >= 2012");
  md->PrintMetaData();

  AliCDBId id("VZERO/Calib/TimeDelays",0,AliCDBRunRange::Infinity());

  man->Put(delays, id, md);

  delete md;

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

示例13: MakeFMDZeroMisAlignment

void MakeFMDZeroMisAlignment()
{
  // Create TClonesArray of zero-misalignment objects for FMD
  //
  const char* macroname = "MakeFMDZeroMisAlignment.C";

  // Activate CDB storage and load geometry from CDB
  AliCDBManager* cdb = AliCDBManager::Instance();
  if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
  cdb->SetRun(0);

  Bool_t    toCdb   = TString(gSystem->Getenv("TOCDB")) == TString("kTRUE");
  TString   storage = gSystem->Getenv("STORAGE");
  TString   output  = "FMDfullMisalignment.root";
  if(toCdb) output  = storage;
  
  gSystem->Load("libFMDutil");
  AliFMDAlignFaker::GetGeometry(toCdb, storage);
  AliFMDAlignFaker* faker = new AliFMDAlignFaker(AliFMDAlignFaker::kAll, 
						 "geometry.root", 
						 output.Data());

  faker->SetSensorDisplacement(0., 0., 0., 0., 0., 0.);
  faker->SetSensorRotation(0., 0., 0., 0., 0., 0.);
  faker->SetHalfDisplacement(0., 0., 0., 0., 0., 0.);
  faker->SetHalfRotation(0., 0., 0., 0., 0., 0.);
  faker->Exec();
  delete faker;


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

示例14: ReadCDBEntryTriggerMask

AliTOFTriggerMask *
ReadCDBEntryTriggerMask(Int_t run, const Char_t *defaultStorage = "raw://", const Char_t *specificStorage = NULL)
{
  AliCDBManager *cdb = AliCDBManager::Instance();
  cdb->SetDefaultStorage(defaultStorage);
  if (specificStorage)
    cdb->SetSpecificStorage("TRIGGER/TOF/TriggerMask", specificStorage);
  cdb->SetRun(run);
  AliCDBEntry *cdbe = cdb->Get("TRIGGER/TOF/TriggerMask");
  AliTOFTriggerMask *triggerMaskObj = (AliTOFTriggerMask *)cdbe->GetObject();

  return triggerMaskObj;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:13,代码来源:ReadCDBEntryTriggerMask.C

示例15: initGeom

void initGeom()
{
    // Macro replacing the gAlice->Init() to initialize the geometry
    // Suggested by Raffaele Grosso <[email protected]>
    
    AliCDBManager* man = AliCDBManager::Instance();
    man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
    man->SetRun(0);
    
    gROOT->LoadMacro("Config.C");
    gInterpreter->ProcessLine(gAlice->GetConfigFunction());
    gAlice->GetMCApp()->Init();
}
开发者ID:alisw,项目名称:AliRoot,代码行数:13,代码来源:initGeom.C


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