本文整理汇总了C++中AliCDBEntry::GetObject方法的典型用法代码示例。如果您正苦于以下问题:C++ AliCDBEntry::GetObject方法的具体用法?C++ AliCDBEntry::GetObject怎么用?C++ AliCDBEntry::GetObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliCDBEntry
的用法示例。
在下文中一共展示了AliCDBEntry::GetObject方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
Bool_t
RecoParamWithTPCDistortions(AliCDBManager *man) {
// check methods exist
if (!AliRecoParam::Class()->GetMethodAny("SuggestRunEventSpecie"))
return kFALSE;
if (!AliTPCRecoParam::Class()->GetMethodAny("GetUseCorrectionMap"))
return kFALSE;
// get event specie from GRP
AliCDBEntry *grpe = man->Get("GRP/GRP/Data");
if (!grpe) return kFALSE;
AliGRPObject *grp = (AliGRPObject *)grpe->GetObject();
AliRecoParam::EventSpecie_t evs = AliRecoParam::SuggestRunEventSpecie(grp->GetRunType(),
grp->GetBeamType(),
grp->GetLHCState());
// get TPC RecoParam for event specie
AliCDBEntry *pare = man->Get("TPC/Calib/RecoParam");
if (!pare) return kFALSE;
TObjArray *parl = (TObjArray *)pare->GetObject();
AliTPCRecoParam *par = NULL;
for (Int_t i = parl->GetEntriesFast(); i--;) {
AliTPCRecoParam *p = (AliTPCRecoParam *)parl->UncheckedAt(i);
if (!p || !(p->GetEventSpecie() & evs)) continue;
par = p;
break;
}
// check if use correction map
if (!par->GetUseCorrectionMap())
return kFALSE;
return kTRUE;
}
示例2: 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());
}
示例3: GetTimeRange
//_________________________________________________________________________________________________
void GetTimeRange(Int_t runNumber, time_t& start, time_t& end)
{
AliCDBManager::Instance()->SetRun(runNumber);
AliCDBEntry* e = AliCDBManager::Instance()->Get("GRP/GRP/Data");
AliGRPObject* grp = static_cast<AliGRPObject*>(e->GetObject());
start = grp->GetTimeStart();
end = grp->GetTimeEnd();
TDatime dstart(start);
TDatime dend(end);
dstart.Set(dstart.GetYear(),dstart.GetMonth(),dstart.GetDay(),dstart.GetHour(),0,0);
dend.Set(dend.GetYear(),dend.GetMonth(),dend.GetDay(),dend.GetHour()+1,0,0);
std::cout << TDatime(start).AsString() << std::endl;
std::cout << TDatime(end).AsString() << std::endl;
std::cout << dstart.AsString() << std::endl;
std::cout << dend.AsString() << std::endl;
start = dstart.Convert(kFALSE);
end = dend.Convert(kFALSE);
}
示例4: Error
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();
}
}
示例5: return
Float_t
SetEnergyFromGRP()
{
AliCDBEntry *cdbe = AliCDBManager::Instance()->Get("GRP/GRP/Data");
AliGRPObject *grpd = dynamic_cast<AliGRPObject*>(cdbe->GetObject());
return (grpd->GetBeamEnergy() * 2.);
}
示例6: DefaultSpecificStorage
void DefaultSpecificStorage(AliCDBManager *man, Int_t mode)
{
AliCDBEntry *cdbe = man->Get("GRP/GRP/Data");
if (!cdbe) return NULL;
AliGRPObject *grp = (AliGRPObject *)cdbe->GetObject();
TDatime date = grp->GetTimeStart();
Int_t year = date.GetYear();
const Char_t *Raw = Form("alien://Folder=/alice/data/%d/OCDB", year);
const Char_t *Ideal = "alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/";
const Char_t *Residual = "alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/";
const Char_t *Full = "alien://Folder=/alice/simulation/2008/v4-15-Release/Full/";
// for AD hack
const Char_t *Raw2015 = "alien://Folder=/alice/data/2015/OCDB";
// DEFAULT SPECIFIC OBJECTS
const Char_t *SpecificStorageList[][3] = {
// path sim rec
//
// ITS
"ITS/Align/Data", Ideal, Residual, // ok
"ITS/Calib/SPDSparseDead", Full, Residual, // ok ?
// TPC
"TPC/Calib/ClusterParam", Ideal, Residual, // ok!
"TPC/Calib/RecoParam", Residual, Residual, // ok!
"TPC/Calib/TimeGain", Ideal, Residual, // ok!
"TPC/Calib/Correction", Ideal, Residual, // ok!
// MUON
"MUON/Align/Data", Full, NULL, // ok!
// ZDC
"ZDC/Align/Data", Ideal, Ideal, // ok
"ZDC/Calib/Pedestals", Ideal, Ideal // added (11.12.2017)
};
const Int_t nSpecificStorages = sizeof(SpecificStorageList) / (3 * sizeof(Char_t *));
// set specific storages
for (Int_t isto = 0; isto < nSpecificStorages; isto++) {
if (SpecificStorageList[isto][mode+1]) {
printf("Setting specific storage: %s -> %s\n", SpecificStorageList[isto][0], SpecificStorageList[isto][mode+1]);
man->SetSpecificStorage(SpecificStorageList[isto][0], SpecificStorageList[isto][mode+1]);
}
}
// EXTRA SPECIFIC OBJECTS IF NO DISTORTIONS
if (!RecoParamWithTPCDistortions(man)) {
printf("Not using TPC distortions, need extra specific storages\n");
NoDistortionSpecificStorage(man, mode);
}
// Run-1 settings
if (year < 2015) {
man->SetSpecificStorage("AD/Calib/QAParam", Raw2015);
const Char_t *muonHack[2] = {Ideal, Residual};
man->SetSpecificStorage("MUON/Align/Data", muonHack[mode]);
}
}
示例7: PatchCDB
void PatchCDB(const char* runlist, const char* runlist1400, const char* srcOCDBPath="alien://folder=/alice/data/2016/OCDB", const char* destOCDBPath="alien://folder=/alice/cern.ch/user/l/laphecet/OCDBCH3L")
{
// function to patch the OCDB MUON/Calib/HV for the swap of CH3L Q2S1 and Q2S2
// runlist = full list of runs where Chamber03Left/Quad2Sect1 has an HV problem (trips, too low, plus the 1400 V
// below)
// runlist1400 = list of runs where Chamber03Left/Quad2Sect1 was struggling at 1400 V
// for the runs in runlist1400, the HV will be forced to zero for that sector
// note that Chamber03Left/Quad2Sect1 = Chamber02Left/Quad1Sect0 in DCS alias world
AliAnalysisTriggerScalers ts(runlist,srcOCDBPath);
std::vector<int> vrunlist = ts.GetRunList();
AliAnalysisTriggerScalers ts1400(runlist1400,srcOCDBPath);
std::vector<int> vrunlist1400 = ts1400.GetRunList();
AliCDBManager* man = AliCDBManager::Instance();
TObjString sector2("MchHvLvLeft/Chamber02Left/Quad1Sect0.actual.vMon");
TObjString sector1("MchHvLvLeft/Chamber02Left/Quad1Sect1.actual.vMon");
for ( auto r : vrunlist )
{
man->SetDefaultStorage(srcOCDBPath);
man->SetRun(r);
std::cout << "Run " << r << std::endl;
AliCDBEntry* entry = man->Get("MUON/Calib/HV");
TMap* hvmap = static_cast<TMap*>(entry->GetObject()->Clone());
TPair* p1 = hvmap->RemoveEntry(§or2);
if ( std::find(vrunlist1400.begin(),vrunlist1400.end(),r) != vrunlist1400.end() )
{
TObjArray* a1 = static_cast<TObjArray*>(p1->Value());
AliDCSValue* first = static_cast<AliDCSValue*>(a1->First());
AliDCSValue* last = static_cast<AliDCSValue*>(a1->Last());
a1->Delete();
a1->Add(new AliDCSValue(0.0f,first->GetTimeStamp()));
a1->Add(new AliDCSValue(0.0f,last->GetTimeStamp()));
}
TPair* p2 = hvmap->RemoveEntry(§or1);
hvmap->Add(new TObjString(sector2),p2->Value());
hvmap->Add(new TObjString(sector1),p1->Value());
delete p1->Key();
delete p2->Key();
man->SetDefaultStorage(destOCDBPath);
hvmap->SetUniqueID( hvmap->GetUniqueID() | ( 1 << 9 ) );
AliMUONCDB::WriteToCDB(hvmap,"MUON/Calib/HV",r,r,"Patched for CH3L Quad2Sect1 vs 0 swapping","L. Aphecetche");
man->ClearCache();
}
}
示例8: makeDecalibCDB
void makeDecalibCDB(Int_t firstRun, Int_t lastRun, Float_t decalib = 0.065)
{
//Generates a random decalibration factors O(1)
//to be applied in the anchor run simulations with raw:// .
//If decalib<0, no decalibration generated, all factors=1.
//Run range is [firstRun,lastRun] and gaussian sigma = decalib.
//Author: Boris Polishchuk.
AliCDBManager::Instance()->SetDefaultStorage("raw://");
AliCDBManager::Instance()->SetRun(firstRun);
TString emcPath("PHOS/Calib/EmcGainPedestals");
AliCDBEntry* entryEmc = AliCDBManager::Instance()->Get(emcPath.Data(),-1);
AliPHOSEmcCalibData* clb=0;
if(entryEmc) clb = (AliPHOSEmcCalibData*)entryEmc->GetObject();
else { printf("CDB entry not found. Exit.\n"); return; }
if(!clb) { printf("Calibration parameters for PHOS EMC not found.\n"); return; }
printf("\t\tEMC calibration object found: FirstRun=%d LastRun=%d Version=%d SubVersion=%d\n",
entryEmc->GetId().GetFirstRun(), entryEmc->GetId().GetLastRun(),
entryEmc->GetId().GetVersion(),entryEmc->GetId().GetSubVersion());
TRandom rn;
rn.SetSeed(0); //the seed is set to the current machine clock
Float_t adcChannelEmc;
for(Int_t module=1; module<6; module++) {
for(Int_t column=1; column<57; column++) {
for(Int_t row=1; row<65; row++) {
if(decalib<0.) adcChannelEmc = 1.;
else
adcChannelEmc =rn.Gaus(1.,decalib);
clb->SetADCchannelEmcDecalib(module,column,row,adcChannelEmc);
}
}
}
AliCDBManager::Instance()->SetDefaultStorage("local://./");
AliCDBStorage* storage = AliCDBManager::Instance()->GetDefaultStorage();
AliCDBMetaData *md = new AliCDBMetaData();
AliCDBId id(emcPath.Data(),firstRun,lastRun);
storage->Put(clb,id, md);
}
示例9: ReadDCSAliasMap
TMap* ReadDCSAliasMap()
{
// Open a file that contains DCS input data
// The CDB framework is used to open the file, this means the file is located
// in $ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB/<detector>/DCS/Data
// The file contains an AliCDBEntry that contains a TMap with the DCS structure.
// An explanation of the structure can be found in CreateDCSAliasMap()
AliCDBEntry *entry = AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
->Get("DET/DCS/Data", 0);
return dynamic_cast<TMap*> (entry->GetObject());
}
示例10:
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;
}
示例11: AliTRDCheckPedestal
//__________________________________________________________
void AliTRDCheckPedestal(const Int_t runNr){
// Establish grid connection
if(!TGrid::Connect("alien://")){printf("F-No grid connection\n");return;}
// Set the storage to the OCDB of this runNr. It will be like
// alien://folder=/alice/data/2016/OCDB
AliCDBManager *man = AliCDBManager::Instance();
man->SetDefaultStorageFromRun(runNr);
// We derive the reference storage from it
const AliCDBStorage *stor = man->GetDefaultStorage();
TString folder = stor->GetBaseFolder();
folder.ReplaceAll("OCDB","Reference");
man->SetDefaultStorage(Form("alien://folder=%s",folder.Data()));
// Set the run number
man->SetRun(runNr);
// We abuse the folder name to derive the year
TString yearString(folder);
yearString.ReplaceAll("/alice/data/","");
yearString.ReplaceAll("/Reference/","");
const Int_t year = yearString.Atoi();
printf("W-Experimental: Derived year %d from storage folder\n",year);
// The reference data is stored per Local Data Concentrator
std::vector<Int_t> LDCvec = GetLDCVector(year);
// Loop over LDCs
for(std::vector<Int_t>::iterator LDCit = LDCvec.begin();LDCit!=LDCvec.end();LDCit++){
const TString padstatus = Form("TRD/DAQData/PadStatus%d",*LDCit);
AliCDBEntry *entry = AliCDBManager::Instance()->Get(padstatus.Data());
AliTRDCalibPadStatus *calpadstatus = dynamic_cast<AliTRDCalibPadStatus *>(entry->GetObject());
if(!calpadstatus){printf("E-Can not find %s in %s \n",padstatus.Data(),folder.Data());continue;}
//Create the noise pad with the RMS values of each channel
AliTRDCalPad *noisePad = calpadstatus->CreateCalPad();
// LDC -> SM mapping
std::vector<Int_t> SMvec = GetSMVector(year,*LDCit);
for(std::vector<Int_t>::iterator SMit=SMvec.begin();SMit!=SMvec.end();SMit++){
const TString padstatussm = Form("PadNoise-LDC%d-SM%02d",*LDCit,*SMit);
TCanvas *cpadstatusm = new TCanvas(padstatussm.Data(),padstatussm.Data(),50,50,600,800);
cpadstatusm->Divide(3,2);
// Draw each layer (or here plane)
const Float_t zRange[2]={0.,0.2};
for(Int_t iLayer = 0;iLayer<6;iLayer++){
cpadstatusm->cd(iLayer+1);
noisePad->MakeHisto2DSmPl(*SMit,iLayer,0,0,zRange[0],zRange[1],-1)->Draw("colz");
}
cpadstatusm->SaveAs(Form("%s.pdf",cpadstatusm->GetName()));
} // Loop over SMs of this LDC
} // End of loop over LDCs
} // End of void AliTRDcheckPedestal
示例12: 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());
}
}
示例13: 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);
}
示例14: getT0RecoParam
void getT0RecoParam(Int_t run)
{
// Read calibration coefficients into the Calibration DB
// Arguments:
AliCDBManager* man = AliCDBManager::Instance();
man->SetDefaultStorage("raw://");
// man->SetDefaultStorage("local:///home/alla/alice/Jul14/OCDB/");
man->SetRun(run);
AliCDBEntry *entry = AliCDBManager::Instance()->Get("T0/Calib/RecoParam");
AliT0RecoParam* recoParam = 0x0;
cout<<" entry "<< entry<<endl;
if(entry) {
// load recoParam according OCDB content (single or array)
// if (!(recoParam = dynamic_cast<AliT0RecoParam*>(entry->GetObject()))) {
TObjArray* recoParamArray = static_cast<TObjArray*>(entry->GetObject());
cout<<" TObjArray* recoParamArray "<<recoParamArray->GetEntriesFast()<<endl;
for(Int_t ie = 0; ie < recoParamArray->GetEntriesFast()-1; ie++) {
recoParam = static_cast<AliT0RecoParam*>(recoParamArray->UncheckedAt(ie));
cout<<ie<<endl;
cout<<" eq "<<recoParam->GetEq()<<endl;
// recoParam->Dump();
cout<<" cfd range "<<recoParam->GetLow(300)<<" amplitude "<<recoParam->GetLow(200)<<" "<<recoParam->GetHigh(200)<<endl;
for (int i=0; i<500; i++)
if( recoParam->GetLow(i) !=0) cout<<i<<" low "<<recoParam->GetLow(i)<<" "<<endl;
for (int i=0; i<500; i++)
if( recoParam->GetHigh(i) !=50000) cout<<i<<" high "<<recoParam->GetHigh(i)<<endl;
recoParam = 0x0;
}
}
else
cout<<" no entry "<<endl;
}
示例15: MakeAllDETsFullMisAlignment
void MakeAllDETsFullMisAlignment(Char_t* CDBstorage = "local://$HOME/FullMisAlignment", Bool_t partialGeom=kFALSE){
// Make full misalignment objects for all detectors
// Pass different "CDBstorage" argument if needed (e.g. to fill
// conditions' data base on alien) or set it to null string to have
// the objects saved locally on file
// This macro defines the default name and place for the detector-macros
// in charge of producing the full misalignment objects as
// $ALICE_ROOT/DET/MakeDETFullMisAlignment.C
//
const char* macroname="MakeAllDETsFullMisAlignment.C";
TString strStorage(CDBstorage);
if(strStorage.IsNull()){
gSystem->Setenv("TOCDB","kFALSE");
}else{
gSystem->Setenv("TOCDB","kTRUE");
gSystem->Setenv("STORAGE",strStorage.Data());
gSystem->Setenv("ARVERSION",ALIROOT_VERSION);
}
if(partialGeom){
gSystem->Setenv("REALSETUP","kTRUE");
}else{
gSystem->Setenv("REALSETUP","kFALSE");
}
// Load geometry from CDB updating it if we are producing the
// alignment objects for the CDB
AliCDBManager* cdb = AliCDBManager::Instance();
if(!cdb->IsDefaultStorageSet()) cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
cdb->SetRun(0);
if(strStorage.IsNull()){ //if we produce the objects into a file
AliGeomManager::LoadGeometry(); //load geom from default CDB storage
}else{ // if we produce the objects in a CDB storage
// update geometry in it
Info(macroname,"Updating geometry in CDB storage %s",strStorage.Data());
gROOT->ProcessLine(".L $ALICE_ROOT/GRP/UpdateCDBIdealGeom.C");
if(partialGeom){
UpdateCDBIdealGeom(strStorage.Data(),"$ALICE_ROOT/macros/Config_PDC06.C");
}else{
UpdateCDBIdealGeom(strStorage.Data(),"$ALICE_ROOT/macros/Config.C");
}
// load the same geometry from given CDB storage
AliCDBPath path("GRP","Geometry","Data");
AliCDBStorage* storage = cdb->GetStorage(strStorage.Data());
AliCDBEntry *entry = storage->Get(path.GetPath(),cdb->GetRun());
if(!entry) Fatal(macroname,"Couldn't load geometry data from CDB!");
entry->SetOwner(0);
TGeoManager* geom = (TGeoManager*) entry->GetObject();
if (!geom) Fatal(macroname,"Couldn't find TGeoManager in the specified CDB entry!");
AliGeomManager::SetGeometry(geom);
}
// run macro for non-sensitive modules
// (presently generates only FRAME alignment objects)
gSystem->Exec("aliroot -b -q $ALICE_ROOT/GRP/MakeSTRUCTFullMisAlignment.C");
// run macros for sensitive modules
TString sModules="ACORDE,EMCAL,FMD,HMPID,ITS,MUON,PMD,PHOS,T0,TRD,TPC,TOF,VZERO,ZDC";
TObjArray *detArray = sModules.Tokenize(',');
TIter iter(detArray);
TObjString *ostr;
TString exec_det_macro;
while((ostr = (TObjString*) iter.Next())){
TString str(ostr->String());
exec_det_macro="aliroot -b -q $ALICE_ROOT/";
exec_det_macro+=str;
exec_det_macro+="/Make";
exec_det_macro+=str;
exec_det_macro+="FullMisAlignment.C";
gSystem->Exec(exec_det_macro.Data());
}
return;
}