本文整理汇总了C++中TMap::RemoveEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ TMap::RemoveEntry方法的具体用法?C++ TMap::RemoveEntry怎么用?C++ TMap::RemoveEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMap
的用法示例。
在下文中一共展示了TMap::RemoveEntry方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
}