X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDCalibViewer.cxx;h=ba04d1418d6a15aeb7555f8c507bb438f157f892;hb=27a030ab9cd9129af099f6e6bb588f11a8b10eb7;hp=0ded89f4300373d069b05b0d15cf53f566373680;hpb=4a2eec96f5fc1812a8af07cbc3e212e3f01fc7e6;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDCalibViewer.cxx b/TRD/AliTRDCalibViewer.cxx index 0ded89f4300..ba04d1418d6 100644 --- a/TRD/AliTRDCalibViewer.cxx +++ b/TRD/AliTRDCalibViewer.cxx @@ -204,9 +204,9 @@ const char* AliTRDCalibViewer::AddAbbreviations(char* c, Bool_t printDrawCommand for (Int_t i = 0; i < nNorm; i++) { normLengths[i] = ((TObjString*)listOfNormalizationVariables->At(i))->String().Length(); } - Int_t *varSort = new Int_t[nVariables]; + Int_t *varSort = new Int_t[nVariables+1]; TMath::Sort(nVariables, varLengths, varSort, kTRUE); - Int_t *normSort = new Int_t[nNorm]; + Int_t *normSort = new Int_t[nNorm+1]; TMath::Sort(nNorm, normLengths, normSort, kTRUE); for (Int_t ivar = 0; ivar < nVariables; ivar++) { @@ -360,7 +360,25 @@ void AliTRDCalibViewer::GetLayerSectorStack(TString trdString, Int_t& layerNo, I // encoded with the following format: // Layer%dSector%dStack%d - sscanf(trdString.Data(), "Layer%1dSector%02dStack%1d", &layerNo, §orNo, &stackNo); + //sscanf(trdString.Data(), "Layer%1dSector%02dStack%1d", &layerNo, §orNo, &stackNo); + + // Coverity compliant solution (bit more cumbersome, but works) CBL + TString cName = trdString.Data(); + Char_t cLayer[2]; + Char_t cSector[3]; + Char_t cStack[2]; + + cLayer[0] = cName[5]; + cLayer[1] = 0; + cSector[0] = cName[12]; + cSector[1] = cName[13]; + cSector[2] = 0; + cStack[0] = cName[19]; + cStack[1] = 0; + + layerNo = atoi(cLayer); + sectorNo = atoi(cSector); + stackNo = atoi(cStack); return; } @@ -920,7 +938,7 @@ Bool_t AliTRDCalibViewer::DumpOCDBtoTreeDetails(const Char_t* runListFilename, // DCS FEE information TObjArray *dcsArray = 0; if(getDCS) { - entry = manager->Get("TRD/Calib/DCSv2"); + entry = manager->Get("TRD/Calib/DCS"); if(entry) { entry->SetOwner(kTRUE); dcsArray = (TObjArray*)entry->GetObject();