本文整理汇总了C++中AliCDBMetaData::SetBeamPeriod方法的典型用法代码示例。如果您正苦于以下问题:C++ AliCDBMetaData::SetBeamPeriod方法的具体用法?C++ AliCDBMetaData::SetBeamPeriod怎么用?C++ AliCDBMetaData::SetBeamPeriod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliCDBMetaData
的用法示例。
在下文中一共展示了AliCDBMetaData::SetBeamPeriod方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: OccupancyAscii2OCDB
void OccupancyAscii2OCDB(Int_t runNumber,
TObjArray& filenames,
const char* ocdbpath,
const char* comment)
{
AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
AliCDBManager::Instance()->SetRun(runNumber);
AliCDBManager::Instance()->SetSpecificStorage("MUON/Calib/OccupancyMap",ocdbpath);
AliMpCDB::LoadAll();
AliMUON2DMap occupancy(kTRUE);
TObjString* str;
TIter next(&filenames);
while ( ( str = static_cast<TObjString*>(next()) ) )
{
TString data;
ReadOccupancyFile(str->String().Data(),data);
AliMUONTrackerIO::DecodeOccupancy(data.Data(),occupancy);
}
if (occupancy.GetSize())
{
AliCDBId id("MUON/Calib/OccupancyMap",runNumber,runNumber);
AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
metaData.SetResponsible("MUON TRK");
metaData.SetComment(comment);
AliCDBManager::Instance()->Put(&occupancy,id,&metaData);
}
}
示例3: id
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);
}
示例4: WriteDCSAliasMap
void WriteDCSAliasMap()
{
// This writes the output from CreateDCSAliasMap to a CDB file
TMap* dcsAliasMap = CreateDCSAliasMap();
AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
metaData.SetResponsible("Responsible person");
metaData.SetComment("Test object for TestPreprocessor.C");
AliCDBId id("DET/DCS/Data", 0, 0);
// look into AliTestShuttle's CDB main folder
AliCDBManager::Instance()->GetStorage(AliShuttleInterface::GetMainCDB())
->Put(dcsAliasMap, id, &metaData);
}
示例5: id
MakeCDBEntryCTPLatency(Float_t value = 0., Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity())
{
/* create object */
AliTOFCTPLatency *obj = new AliTOFCTPLatency();
obj->SetCTPLatency(value);
/* create cdb info */
AliCDBId id("TOF/Calib/CTPLatency", startRun, endRun);
AliCDBMetaData *md = new AliCDBMetaData();
md->SetResponsible("Roberto Preghenella");
md->SetComment("CTPLatency (ps)");
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);
}
示例6: SetOCDBFromRun1
///
/// Main method
///
/// \param year: year to set geometry and run range
/// \param printAll: verbosity checks
///
void SetOCDBFromRun1(Int_t year = 2010, Bool_t printAll = kFALSE)
{
TGrid::Connect("alien://");
Int_t run = 182325; //2012
if(year == 2010) run = 134908;
if(year == 2011) run = 159582;
AliCDBManager* man = AliCDBManager::Instance();
man->SetDefaultStorage("raw://");
man->SetRun(run);
AliCDBStorage *storage = man->GetDefaultStorage();
// Instantiate EMCAL geometry for the first time
AliEMCALGeometry * geom;
if (year == 2010) geom = AliEMCALGeometry::GetInstance("EMCAL_FIRSTYEARV1"); // 2010
else geom = AliEMCALGeometry::GetInstance("EMCAL_COMPLETEV1"); // 2011-2012-2013
//else geom = AliEMCALGeometry::GetInstance("EMCAL_COMPLETE12SMV1_DCAL_8SM"); // Run2
const Int_t nSM = geom->GetNumberOfSuperModules();
// Get the final OCDB object
AliEMCALCalibData* cparam = (AliEMCALCalibData*) (storage->Get("EMCAL/Calib/Data", run)->GetObject());
// Access OCDB file with the first version of the calibration
TString first = "Run177115_999999999_v2_s0.root";
if(year==2010) first = "Run113461_999999999_v3_s0.root";
if(year==2011) first = "Run144484_999999999_v3_s0.root";
TFile * f = TFile::Open(Form("alien:///alice/data/%d/OCDB/EMCAL/Calib/Data/%s",year,first.Data()),"READ");
AliCDBEntry * cdb = (AliCDBEntry*) f->Get("AliCDBEntry");
AliEMCALCalibData* cparam1 = (AliEMCALCalibData*) cdb->GetObject();
// New OCDB container
AliEMCALCalibData *cparamnew=new AliEMCALCalibData("EMCAL");
// Do the comparison
Float_t param = -1;
Float_t param1 = -1;
Int_t iCol = -1, iRow = -1, iSM =-1, iMod = -1,iIphi =-1,iIeta = -1;
for(Int_t i=0;i < nSM*24*48; i++)
{
//printf("AbsID %d\n",i);
geom->GetCellIndex(i,iSM,iMod,iIphi,iIeta);
geom->GetCellPhiEtaIndexInSModule(iSM,iMod, iIphi, iIeta,iRow,iCol);
Float_t param = -1;
if( cparam ) param = cparam ->GetADCchannel(iSM,iCol,iRow);
Float_t param1 = -1;
if( cparam1 ) param1 = cparam1->GetADCchannel(iSM,iCol,iRow);
if (printAll)
printf("ID %d, col %d, row %d, sm %d final %1.4f, first %1.4f\n",
i,iCol,iRow,iSM,param, param1);
cparamnew->SetADCchannel (iSM,iCol,iRow,param );
cparamnew->SetADCchannelOnline(iSM,iCol,iRow,param1);
}
// Create OCDB File
AliCDBMetaData md;
md.SetComment("Calibration after calibration with pi0, store also first online calibration");
md.SetBeamPeriod(0);
md.SetResponsible("Gustavo Conesa");
md.SetAliRootVersion(gSystem->Getenv("ARVERSION"));
// Careful, select here the first run where this calibration is valid
Int_t firstRun = 172439; // 2012-13
if(year == 2010) firstRun = 113461;
if(year == 2011) firstRun = 144484;
AliCDBId id("EMCAL/Calib/Data",firstRun,AliCDBRunRange::Infinity()); // create in EMCAL/Calib/Data DBFolder
AliCDBManager* man2 = AliCDBManager::Instance();
AliCDBStorage* loc = man2->GetStorage(Form("local://%d",year));
loc->Put(cparamnew, id, &md);
}
示例7: SetCC
//------------------------------------------------------------------------
void SetCC(Int_t flag=0)
{
// Writing calibration coefficients into the Calibration DB
// Arguments:
// flag=0: all calibration coefficients are equal
// flag=1: decalibration coefficients
// flag=2: calibration coefficients equal to inverse decalibration ones
// Author: Boris Polishchuk (Boris.Polichtchouk at cern.ch)
TString DBFolder;
Int_t firstRun = 0;
Int_t lastRun = 0;
Int_t beamPeriod = 1;
char* objFormat = "";
AliPHOSCalibData* cdb = 0;
if (flag == 0) {
// Ideal calibration with all channels at nominal value 0.005
DBFolder ="local://InitCalibDB";
firstRun = 0;
lastRun = AliCDBRunRange::Infinity();
objFormat = "PHOS ideal pedestals and ADC gain factors (5x64x56)";
cdb = new AliPHOSCalibData();
cdb->CreateNew();
}
else if (flag == 1) {
// Full decalibration is +-10% of the nominal value
DBFolder ="local://FullDecalibDB";
firstRun = 0;
lastRun = AliCDBRunRange::Infinity();
objFormat = "PHOS fully decalibrated calibration coefficients (5x64x56)";
cdb = new AliPHOSCalibData();
cdb->RandomEmc(0.045,0.055);
cdb->RandomCpv(0.0008,0.0016);
}
else if (flag == 2) {
// Residual decalibration is +-1% of the nominal value
DBFolder ="local://ResidualCalibDB";
firstRun = 0;
lastRun = AliCDBRunRange::Infinity();
objFormat = "PHOS residual calibration coefficients (5x64x56)";
cdb = new AliPHOSCalibData();
cdb->RandomEmc(0.00495,0.00505);
cdb->RandomCpv(0.00115,0.00125);
}
//Store calibration data into database
AliCDBMetaData md;
md.SetComment(objFormat);
md.SetBeamPeriod(beamPeriod);
md.SetResponsible("Boris Polichtchouk");
AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
if(gSystem->Getenv("STORAGE")){
cout << "Setting specific storage" << endl;
AliCDBManager::Instance()->SetSpecificStorage("PHOS/*",DBFolder.Data());
}
cdb->WriteEmc(firstRun,lastRun,&md);
cdb->WriteCpv(firstRun,lastRun,&md);
cdb->WriteEmcBadChannelsMap(firstRun,lastRun,&md);
}
示例8: SetCalibDB
void SetCalibDB() {
Int_t firstRun = 0; // What is this
Int_t lastRun = 9999999;
Int_t beamPeriod = 1;
char* objFormat = "";
TString DBFolder ="local://$ALICE_ROOT/OCDB/EMCAL/beamtest07";
firstRun = 0;
lastRun = 999999999;
objFormat = "EMCAL beam test 2007 gain factors and pedestals";
AliEMCALCalibData *calibda=new AliEMCALCalibData("EMCAL");
Float_t fADCpedestal = 0.009;
Float_t fADCchannel = 0.0153; // 250 GeV / (16*1024)
Float_t ped = 0.;
Float_t cc = fADCchannel;
Int_t nSMod = 12;
Int_t nCol = 48;
Int_t nRow = 24;
Int_t nRow2 = 12; //Modules 11 and 12 are half modules
Int_t colOffset = 40;
Int_t rowOffset = 8;
Double_t gain_ratios[8][8] =
{
15.9289, 16.2141, 16.1204, 15.9118,
15.9363, 15.9402, 16.2257, 16.0097,
16.058, 16.1116, 16.039, 16.4167,
16.2148, 16.1399, 16.1515, 16.2194,
15.9082, 16.0776, 16.0496, 16.2353,
15.8054, 16.2158, 16.2344, 16.1023,
15.8903, 16.2387, 16.13, 16.157,
16.0685, 16.172, 16.3495, 16.3887,
16.2842, 16.049, 16.4328, 16.3954,
16.4226, 15.7254, 16.1634, 16.3182,
16.4216, 16.1201, 16.0000, 16.2305,
16.0266, 16.3573, 16.1382, 16.237,
16.2981, 16.1796, 15.854, 16.4189,
15.6425, 16.287, 16.3293, 16.6308,
16.2469, 16.0412, 16.252, 16.3367,
16.1412, 16.0646, 16.3996, 16.3479
};
Float_t gains[8][8] =
{
4.43274, 6.7283, 8.23733, 3.59882,
4.2717, 2.85658, 4.86389, 2.71961,
3.05523, 3.02552, 3.50615, 3.26494,
6.69024, 2.51058, 8.42275, 2.83824,
8.05074, 5.36051, 4.36794, 4.73468,
9.9684, 5.5, 6.42999, 5.6,
7.37306, 5.28314, 5.27662, 5.26982,
3.29468, 5.23107, 6.40948, 4.06855,
4.09685, 5.37323, 5.32816, 5.89487,
9.2395, 5.3, 4.77239, 5.0,
4.85923, 3.44063, 4.74517, 5.28772,
3.80171, 4.84878, 5.12039, 4.59205,
2.34745, 3.16971, 3.61231, 3.65195,
3.43496, 3.4, 3.65678, 2.9,
2.71648, 3.39577, 3.40896, 3.31741,
3.24286, 3.51346, 2.61503, 3.44246
};
for(Int_t supermodule=0; supermodule < nSMod; supermodule++) {
for(Int_t column=0; column< nCol; column++) {
if(supermodule >= 10)
nRow = nRow2;
for(Int_t row=0; row< nRow; row++) {
if(supermodule < 2 && column > 39 && row > 7 && row < 16) {
cc = 1./gain_ratios[column-colOffset][row-rowOffset]/gains[column-colOffset][row-rowOffset];
cout << "column = " << column << " column - colOffset = " << column-colOffset << " row = " << " row Offset = " << row-rowOffset << endl;
}
calibda->SetADCchannel(supermodule,column,row,cc);
calibda->SetADCpedestal(supermodule,column,row,ped);
}
}
}
//Store calibration data into database
AliCDBMetaData md;
md.SetComment(objFormat);
md.SetBeamPeriod(beamPeriod);
md.SetResponsible("David Silvermyr");
AliCDBId id("EMCAL/Calib/Data",firstRun,lastRun); // create in
// EMCAL/Calib/Data DBFolder
AliCDBManager* man = AliCDBManager::Instance();
AliCDBStorage* loc = man->GetStorage(DBFolder.Data());
loc->Put(calibda, id, &md);
}
示例9: UploadRejectList
void UploadRejectList(Int_t firstRun=0, Int_t lastRun=AliCDBRunRange::Infinity())
{
AliCDBManager::Instance()->SetDefaultStorage("alien://folder=/alice/data/2015/OCDB");
AliCDBManager::Instance()->SetRun(firstRun);
AliCDBManager::Instance()->SetSpecificStorage("MUON/Calib/RejectList","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB2015");
AliMpCDB::LoadAll();
AliMUONRejectList rl;
rl.SetDetectionElementProbability(806,1.0); // alignment problem
// first round of checks in LHC13f with first run of the period : 4 holes
rl.SetHVProbability("MchHvLvRight/Chamber03Right/Quad4Sect1",1.0);
rl.SetPCBProbability(811,4,1.0);
rl.SetPCBProbability(900,1,1.0);
rl.SetPCBProbability(1010,0,1.0);
// second scan of LHC13f: all runs
// DE 612 : one of the 7-8 HV capa per PCB went bad ?
// remove 3 full manus and then the channels in between...
rl.SetManuProbability(612,1034,1.0);
rl.SetManuProbability(612,112,1.0);
rl.SetManuProbability(612,14,1.0);
for ( Int_t i = 0; i < 8; ++i )
{
rl.SetChannelProbability(612,111,i,1.0);
rl.SetChannelProbability(612,113,40+i,1.0);
rl.SetChannelProbability(612,15,40+i,1.0);
rl.SetChannelProbability(612,13,i,1.0);
}
for ( Int_t i = 48; i <= 63; ++i )
{
rl.SetChannelProbability(612,1141,i,1.0);
}
for ( Int_t i = 32; i <= 47; ++i )
{
rl.SetChannelProbability(612,1141,i,1.0);
}
for ( Int_t i = 0; i <= 31; ++i )
{
rl.SetChannelProbability(612,1140,i,1.0);
}
// DE 714 : same story as in DE 612 ...
rl.SetManuProbability(714,111,1.0);
rl.SetManuProbability(714,216,1.0);
rl.SetManuProbability(714,1143,1.0);
for ( Int_t i = 47; i <= 32; ++i )
{
rl.SetChannelProbability(714,112,i,1.0);
}
for ( Int_t i = 0; i <= 15; ++i )
{
rl.SetChannelProbability(714,215,i,1.0);
}
for ( Int_t i = 18; i <= 63; ++i )
{
rl.SetChannelProbability(714,1233,i,1.0);
}
for ( Int_t i = 32; i <= 47; ++i )
{
rl.SetChannelProbability(714,112,i,1.0);
}
rl.SetChannelProbability(714,1142,0,1.0);
rl.SetChannelProbability(714,1142,1,1.0);
rl.SetManuProbability(903,1129,1.0);
rl.SetManuProbability(903,108,1.0);
// only for run 196646
rl.SetDetectionElementProbability(919,1.0);
rl.SetPCBProbability(918,1,1.0);
rl.SetPCBProbability(918,2,1.0);
rl.SetPCBProbability(918,3,1.0);
rl.SetBusPatchProbability(1648,1.0); // BP on DE 918
AliCDBId id("MUON/Calib/RejectList",firstRun,lastRun);
AliCDBMetaData metaData;
metaData.SetBeamPeriod(0);
metaData.SetResponsible("MUON TRK");
metaData.SetComment("Uploaded by UploadRejectList.C macro (handmade by L. Aphecetche) using information from MC vs Data tracking efficiency studies (Javier Martin Bianco) - eye scan (P. Pillot) - only for run 196646 -");
AliCDBManager::Instance()->Put(&rl,id,&metaData);
}
示例10: StoreMapsSDD
void StoreMapsSDD(Int_t firstRun=0,Int_t lastRun=AliCDBRunRange::Infinity(), Bool_t optSmear=kFALSE){
///////////////////////////////////////////////////////////////////////
// Macro to generate and store the correction maps for SDD //
// Generates: //
// 1 file with 520 AliITSCorrMapSDD drift maps (MapsTimeSDD) //
///////////////////////////////////////////////////////////////////////
if(!AliCDBManager::Instance()->IsDefaultStorageSet()) {
AliCDBManager::Instance()->SetDefaultStorage("local://OCDB");
}
AliCDBMetaData *md = new AliCDBMetaData();
md->SetObjectClassName("TObjArray");
md->SetResponsible("Francesco Prino");
md->SetBeamPeriod(0);
md->SetComment("Simulated data");
AliCDBId mapT("ITS/Calib/MapsTimeSDD",firstRun,lastRun);
TObjArray tmap(520);
tmap.SetOwner(kFALSE);
TRandom3 *gran = new TRandom3();
AliITSCorrMapSDD* mapTime0;
AliITSCorrMapSDD* mapTime1;
for(Int_t mod=0;mod<260;mod++){
// maps
Char_t name[20];
sprintf(name,"DriftTimeMap_%d_%d\n",mod,0);
Int_t nbinsan=1;
if(optSmear && (mod==10 || mod==240)){
nbinsan=256;
sprintf(name,"DriftTimeMap_%d_%d\n",mod,0);
mapTime0 = new AliITSCorrMap2DSDD(name,nbinsan,72);
sprintf(name,"DriftTimeMap_%d_%d\n",mod,1);
mapTime1 = new AliITSCorrMap2DSDD(name,nbinsan,72);
}else{
sprintf(name,"DriftTimeMap_%d_%d\n",mod,0);
mapTime0 = new AliITSCorrMap1DSDD(name,72);
sprintf(name,"DriftTimeMap_%d_%d\n",mod,1);
mapTime1 = new AliITSCorrMap1DSDD(name,72);
}
for(Int_t nan = 0;nan< nbinsan;nan++){
for(Int_t nt = 0;nt<36*2;nt++){
Double_t cnt0=0.;
Double_t cnt1=0.;
if(optSmear){
cnt0=gran->Gaus(0,20);
cnt1=gran->Gaus(0,20);
}
mapTime0->SetCellContent(nan,nt,cnt0);
mapTime1->SetCellContent(nan,nt,cnt1);
}
}
tmap.Add(mapTime0);
tmap.Add(mapTime1);
printf("Added module %d\n",mod);
}
AliCDBManager::Instance()->GetDefaultStorage()->Put(&tmap, mapT, md);
}