本文整理汇总了C++中TObjString::SetString方法的典型用法代码示例。如果您正苦于以下问题:C++ TObjString::SetString方法的具体用法?C++ TObjString::SetString怎么用?C++ TObjString::SetString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TObjString
的用法示例。
在下文中一共展示了TObjString::SetString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
NBD(TString datastr, TString Glauberstr,TString histonamev){
dataname.SetString(datastr.Data());
Glaubername.SetString(Glauberstr.Data());
histoname.SetString(histonamev.Data());
mubest.ResizeTo(1); kbest.ResizeTo(1);
chis.ResizeTo(1); Ndf.ResizeTo(1);
};
示例2: run_reco
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
void run_reco( TString mcEngine="TGeant3", Bool_t AlignDone=true )
{
// ---- Load libraries -------------------------------------------------
FairLogger *logger = FairLogger::GetLogger();
// logger->SetLogFileName("MyLog.log");
logger->SetLogToScreen(kTRUE);
// logger->SetLogToFile(kTRUE);
// logger->SetLogVerbosityLevel("HIGH");
// logger->SetLogFileLevel("DEBUG4");
logger->SetLogScreenLevel("INFO");
// Verbosity level (0=quiet, 1=event level, 2=track level, 3=debug)
Int_t iVerbose = 0; // just forget about it, for the moment
TString Align= "";
if (AlignDone) {
Align= "align_";
}
TString InDir = "./data/";
// Input file (MC Events)
TString inFile ="testrun_";
inFile = InDir +inFile + Align + mcEngine + ".root";
// Output file name
TString outFile ="testreco_";
outFile = InDir + outFile + Align + mcEngine + ".root";
// Parameter file
TString parFile ="testparams_";
parFile = InDir + parFile + Align + mcEngine + ".root";
// Millepede file name
TString milleFile ="testmille_";
milleFile = InDir + milleFile + Align + mcEngine;
TList *parFileList = new TList();
TString workDir = gSystem->Getenv("VMCWORKDIR");
TString paramDir = workDir + "/simulation/Tutorial4/parameters/";
TString paramFile = paramDir + "example.par";
TObjString tutDetDigiFile;
tutDetDigiFile.SetString(paramFile);
parFileList->Add(&tutDetDigiFile);
// ----- Timer --------------------------------------------------------
TStopwatch timer;
// ----- Reconstruction run -------------------------------------------
FairRunAna *fRun= new FairRunAna();
FairFileSource *fFileSource = new FairFileSource(inFile);
fRun->SetSource(fFileSource);
fRun->SetSink(new FairRootFileSink(outFile));
FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
FairParRootFileIo* parInput1 = new FairParRootFileIo();
FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo2->open(parFileList, "in");
parInput1->open(parFile.Data());
parIo2->open(parFileList, "in");
rtdb->setFirstInput(parInput1);
rtdb->setSecondInput(parIo2);
rtdb->setOutput(parInput1);
rtdb->saveOutput();
// ----- TorinoDetector hit producers ---------------------------------
FairTutorialDet4HitProducerIdealMisalign* hitProducer = new FairTutorialDet4HitProducerIdealMisalign();
hitProducer->DoMisalignment(kFALSE);
fRun->AddTask(hitProducer);
FairTutorialDet4StraightLineFitter* fitter = new FairTutorialDet4StraightLineFitter();
fitter->SetVersion(2);
fRun->AddTask(fitter);
FairTutorialDet4MilleWriter* writer = new FairTutorialDet4MilleWriter();
// writer->SetWriteAscii(kTRUE);
writer->SetVersion(2);
writer->SetFileName(milleFile);
fRun->AddTask(writer);
fRun->Init();
timer.Start();
fRun->Run();
// ----- Finish -------------------------------------------------------
cout << endl << endl;
// Extract the maximal used memory an add is as Dart measurement
// This line is filtered by CTest and the value send to CDash
FairSystemInfo sysInfo;
//.........这里部分代码省略.........