本文整理汇总了C++中TString::Sizeof方法的典型用法代码示例。如果您正苦于以下问题:C++ TString::Sizeof方法的具体用法?C++ TString::Sizeof怎么用?C++ TString::Sizeof使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TString
的用法示例。
在下文中一共展示了TString::Sizeof方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseArg
// Helper functions to set argument
inline TString parseArg(const TString& input, TString arg, const TString dfval="") {
if (!arg.EndsWith("=")) arg += "=";
if (input.Contains(arg)) {
int sidx = input.Index(arg) + arg.Sizeof() - 1;
int eidx = input.Index(",", sidx);
if (eidx < 0) eidx = input.Sizeof();
return input(sidx, eidx-sidx);
} else {
return dfval;
}
}
示例2: selectNewPad
TVirtualPad* ParameterEvolutionPlotter::selectNewPad()
{
TCanvas* c1 = m_canvases[m_canvases.size()-1];
if ( m_padId>=6 ){
// Create a new canvas that has the old title "foo 3" but with
// incremented number: "foo 4". Only one-digit numbers are supported.
TString title = c1->GetTitle();
int oldNumber = TString(title[title.Sizeof()-2]).Atoi(); // get last character and turn into integer
title.Replace(title.Sizeof()-2,1,Form("%i",++oldNumber)); // replace last character with incremented integer
c1 = selectNewCanvas(title);
}
m_padId+=1;
return c1->cd(m_padId);
}
示例3: Setoutputfileprefix
void Setoutputfileprefix( TString const& filename ){
outputfileprefix = filename;
Int_t pos(0);
for(Int_t i(0);i<outputfileprefix.Sizeof();i++){
if(outputfileprefix[i] == '/')
pos = i;
}
outputfileprefix.Remove(0,pos+1);
outputfileprefix.ReplaceAll(".root","");
}
示例4: SetChVoltParameters
void KVINDRAUpDater::SetChVoltParameters(KVDBRun* kvrun)
{
KVRList* param_list = kvrun->GetLinks("Channel-Volt");
if (!param_list)
return;
if (!param_list->GetSize())
return;
KVDetector* kvd;
KVDBParameterSet* kvps;
KVCalibrator* kvc;
TIter next_ps(param_list);
TString str;
// Setting Channel-Volts calibration parameters
while ((kvps = (KVDBParameterSet*) next_ps())) { // boucle sur les parametres
str = kvps->GetName();
str.Remove(str.Sizeof() - 4, 3); //Removing 3 last letters (ex : "_PG")
kvd = fArray->GetDetector(str.Data());
if (!kvd)
Warning("SetChVoltParameters(UInt_t)", "Dectector %s not found !",
str.Data());
else { // detector found
kvc = kvd->GetCalibrator(kvps->GetName(), kvps->GetTitle());
if (!kvc)
Warning("SetChVoltParameters(UInt_t)",
"Calibrator %s %s not found !", kvps->GetName(),
kvps->GetTitle());
else { //calibrator found
for (Int_t i = 0; i < kvc->GetNumberParams(); i++) {
kvc->SetParameter(i, kvps->GetParameter(i));
}
kvc->SetStatus(kTRUE); // calibrator ready
} //calibrator found
} //detector found
} //boucle sur les parameters
}