if (runLoader) for (Int_t iEvent = 0;
iEvent < runLoader->GetNumberOfEvents(); iEvent++) {
char command[256];
- sprintf(command, "rm -r raw%d", iEvent);
+ snprintf(command, 256, "rm -r raw%d", iEvent);
gSystem->Exec(command);
}
delete runLoader;
runLoader->GetEvent(iEvent);
TString baseDir = gSystem->WorkingDirectory();
char dirName[256];
- sprintf(dirName, "raw%d", iEvent);
+ snprintf(dirName, 256, "raw%d", iEvent);
gSystem->MakeDirectory(dirName);
if (!gSystem->ChangeDirectory(dirName)) {
AliError(Form("couldn't change to directory %s", dirName));
char command[256];
// Note the option -s. It is used in order to avoid
// the generation of SOR/EOR events.
- sprintf(command, "dateStream -c -s -D -o %s -# %d -C -run %d",
+ snprintf(command, 256, "dateStream -c -s -D -o %s -# %d -C -run %d",
dateFileName, runLoader->GetNumberOfEvents(),runLoader->GetHeader()->GetRun());
FILE* pipe = gSystem->OpenPipe(command, "w");
ldc += AliDAQ::NumberOfLdcs(iDet) / AliDAQ::NumberOfDdls(iDet);
char rawFileName[256];
- sprintf(rawFileName, "raw%d/%s",
+ snprintf(rawFileName, 256, "raw%d/%s",
iEvent, AliDAQ::DdlFileName(iDet,iDDL));
// check existence and size of raw data file
AliInfo(Form("converting selected by trigger cluster raw data DDL files to DATE file %s", selDateFileName));
- sprintf(command, "dateStream -c -s -D -o %s -# %d -C -run %d",
+ snprintf(command, 256, "dateStream -c -s -D -o %s -# %d -C -run %d",
selDateFileName,selEvents,runLoader->GetHeader()->GetRun());
FILE* pipe2 = gSystem->OpenPipe(command, "w");
ldc += AliDAQ::NumberOfLdcs(iDet) / AliDAQ::NumberOfDdls(iDet);
char rawFileName[256];
- sprintf(rawFileName, "raw%d/%s",
+ snprintf(rawFileName, 256, "raw%d/%s",
iEvent, AliDAQ::DdlFileName(iDet,iDDL));
// check existence and size of raw data file
runLoader->SetEventNumber(nev);
runLoader->GetHeader()->Reset(rawReader->GetRunNumber(),
nev, nev);
- runLoader->TreeE()->Fill();
runLoader->GetEvent(nev);
AliInfo(Form("We are at event %d",nev));
//
}
//
// Finish the event
+ runLoader->TreeE()->Fill();
AliInfo(Form("Finished event %d",nev));
nev++;
if (N>0&&nev>=N)