X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TRD%2FAliTRDdigitsManager.cxx;h=048ee25067965450564648d1fc664ae3005156f5;hb=22fceaeca5737ed5409748d70852302a77ebd7a5;hp=9827a4a16e1db6e826f3b6f7348040578c32d63a;hpb=5896bc2390f0f00190993604873e6895cdfd6a5f;p=u%2Fmrichter%2FAliRoot.git diff --git a/TRD/AliTRDdigitsManager.cxx b/TRD/AliTRDdigitsManager.cxx index 9827a4a16e1..048ee250679 100644 --- a/TRD/AliTRDdigitsManager.cxx +++ b/TRD/AliTRDdigitsManager.cxx @@ -90,6 +90,11 @@ AliTRDdigitsManager::AliTRDdigitsManager(const AliTRDdigitsManager &m) // AliTRDdigitsManager copy constructor // + for (Int_t iDict = 0; iDict < kNDict; iDict++) + { + fDict[iDict] = NULL; + } + } //_____________________________________________________________________________ @@ -369,8 +374,9 @@ Bool_t AliTRDdigitsManager::MakeBranch(TTree * const tree) // Make the branches for the dictionaries for (Int_t iDict = 0; iDict < kNDict; iDict++) { - Char_t branchname[15]; - sprintf(branchname,"TRDdictionary%d",iDict); + const Int_t kBranchname = 15; + Char_t branchname[kBranchname]; + snprintf(branchname,kBranchname,"TRDdictionary%d",iDict); if (fDict[iDict]) { const AliTRDarrayDictionary *kDictionary = (AliTRDarrayDictionary *) fDict[iDict]->At(0); @@ -453,8 +459,8 @@ Bool_t AliTRDdigitsManager::ReadDigits(TTree * const tree) AliWarning(Form("Create default version of digits parameter (NTimeBin=%d).\n" ,AliTRDSimParam::Instance()->GetNTimeBins())); fDigitsParam = new AliTRDdigitsParam(); - fDigitsParam->SetNTimeBins(AliTRDSimParam::Instance()->GetNTimeBins()); - fDigitsParam->SetADCbaseline(AliTRDSimParam::Instance()->GetADCbaseline()); + fDigitsParam->SetNTimeBinsAll(AliTRDSimParam::Instance()->GetNTimeBins()); + fDigitsParam->SetADCbaselineAll(AliTRDSimParam::Instance()->GetADCbaseline()); } return status; @@ -533,7 +539,7 @@ Int_t AliTRDdigitsManager::GetTrack(Int_t track if ((track < 0) || (track >= kNDict)) { - AliError(Form("track %d out of bounds (size: %d, this: 0x%08x)",track,kNDict,this)); + AliError(Form("track %d out of bounds (size: %d, this: 0x%p)",track,kNDict,this)); return -1; } @@ -872,7 +878,7 @@ Bool_t AliTRDdigitsManager::LoadArrayDict() // Get the branch Char_t branchname[15]; - sprintf(branchname,"TRDdictionary%d",iDict); + snprintf(branchname,15,"TRDdictionary%d",iDict); TBranch *branch = fTree->GetBranch(branchname); if (!branch) { @@ -1007,7 +1013,7 @@ Bool_t AliTRDdigitsManager::StoreArrayDict() // Get the branch Char_t branchname[15]; - sprintf(branchname,"TRDdictionary%d",iDict); + snprintf(branchname,15,"TRDdictionary%d",iDict); TBranch *branch = fTree->GetBranch(branchname); if (!branch) {