本文整理汇总了C++中KVString::ReplaceAll方法的典型用法代码示例。如果您正苦于以下问题:C++ KVString::ReplaceAll方法的具体用法?C++ KVString::ReplaceAll怎么用?C++ KVString::ReplaceAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVString
的用法示例。
在下文中一共展示了KVString::ReplaceAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetProperties
//________________________________________________________________
Bool_t KVFAZIADetector::SetProperties()
{
// detector name are assumed to be defined as
// SI2-T2-Q2-B001
// CSI-T2-Q2-B001
// SI1-T1-Q1-B001
//
KVString tmp;
KVString sname(GetName());
sname.Begin("-");
SetLabel(sname.Next());
gFazia->AddDetectorLabel(GetLabel());
tmp = sname.Next(); tmp.ReplaceAll("T",""); fTelescope = tmp.Atoi();
tmp = sname.Next(); tmp.ReplaceAll("Q",""); fQuartet = tmp.Atoi();
tmp = sname.Next(); tmp.ReplaceAll("B",""); fBlock = tmp.Atoi();
KVSignal* sig=0;
//"QH1", "I1", "QL1", "Q2", "I2", "Q3
if (fSignals)
delete fSignals;
fSignals = new KVList(kTRUE);
KVString lsignals="";
if ( !strcmp(GetLabel(),"SI1") ) { lsignals="QH1,I1,QL1"; }
else if ( !strcmp(GetLabel(),"SI2" ) ) { lsignals="Q2,I2"; }
else if ( !strcmp(GetLabel(),"CSI" ) ) { lsignals="Q3"; }
else{
Warning("SetProperties","Unknown label \"%s\" for this detector : %s\n",GetLabel(),GetName());
lsignals="";
}
lsignals.Begin(",");
while ( !lsignals.End() )
{
KVString ssig = lsignals.Next();
if (ssig.BeginsWith("Q")){
sig = new KVChargeSignal(ssig.Data());
}
else if (ssig.BeginsWith("I")){
sig = new KVCurrentSignal(ssig.Data());
}
else{
Warning("unknown format signal detectorlabel=%s, signal=%s\n",GetLabel(),ssig.Data());
sig = new KVSignal(ssig.Data(),"unknown");
}
sig->LoadPSAParameters(GetLabel());
sig->SetDetectorName(GetName());
fSignals->Add(sig);
}
return kTRUE;
}
示例2: ExpandAutoBatchName
const Char_t* KVINDRAReconDataAnalyser::ExpandAutoBatchName(const Char_t* format)
{
//Replace any 'special' symbols in "format" with their current values
//
// $Date : current date and time
// $System : name of system to be analysed
// $User : name of user
// $UserClass or $Selector : name of user's analysis class (KVSelector)
// $DataSelector : name of user's data selector (KVDataSelector)
static KVString tmp;
tmp = KVDataAnalyser::ExpandAutoBatchName(format);
tmp.ReplaceAll("$Selector", GetUserClass());
tmp.ReplaceAll("$DataSelector", GetKVDataSelector());
return tmp.Data();
}
示例3: ReadHeader
Bool_t KVSimReader_SMF_asym::ReadHeader(){
KVString snom;
Int_t res = ReadLineAndCheck(1," ");
switch (res){
case 0:
return kFALSE;
case 1:
snom.Form("%s",GetReadPar(0).Data());
snom.ReplaceAll("evt_","");
//Info("ReadHeader","lecture %d",snom.Atoi());
nv->SetValue("event_number",snom.Atoi());
break;
default:
return kFALSE;
}
res = ReadLineAndCheck(1," ");
switch (res){
case 0:
return kFALSE;
case 1:
nv->SetValue("ndes",GetIntReadPar(0));
ndes = 0;
return kTRUE;
default:
return kFALSE;
}
}