X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSOnlineSDDInjectors.cxx;h=29ef7f6c87ab093894d46ff5ddbb3f50f34abc84;hb=eaca09ae54f96f131c9d7d5b463396adf678458a;hp=f0b81174ab61aa78c1a9a339a6ec35e68b9701e2;hpb=e89a0633156f35d79366bd79b109699bce9fcb42;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSOnlineSDDInjectors.cxx b/ITS/AliITSOnlineSDDInjectors.cxx index f0b81174ab6..29ef7f6c87a 100644 --- a/ITS/AliITSOnlineSDDInjectors.cxx +++ b/ITS/AliITSOnlineSDDInjectors.cxx @@ -19,6 +19,7 @@ #include #include #include +#include /* $Id$ */ @@ -49,6 +50,14 @@ AliITSOnlineSDDInjectors::AliITSOnlineSDDInjectors():AliITSOnlineSDD(),fHisto(), SetPositions(); SetDefaults(); SetTimeStep(fgkDefaultTimeStep); + for(Int_t i=0;i0){ for(Int_t i=0;iSetBinContent(i+1,GetMeanDriftSpeed(i)); @@ -623,10 +640,10 @@ Bool_t AliITSOnlineSDDInjectors::WriteToROOT(TFile *fil) const { AliWarning("Invalid pointer to ROOT file"); return kFALSE; } - Char_t hisnam[20]; + TString hisnam; fil->cd(); - sprintf(hisnam,"hdrsp%02dc%02ds%d",fDDL,fCarlos,fSide); - TH1F hdsp(hisnam,"",kInjPads,-0.5,kInjPads-0.5); + hisnam.Form("hdrsp%02dc%02ds%d",fDDL,fCarlos,fSide); + TH1F hdsp(hisnam.Data(),"",kInjPads,-0.5,kInjPads-0.5); if(fNEvents==0){ AliWarning("Zero analyzed events"); return kFALSE; @@ -646,9 +663,9 @@ Bool_t AliITSOnlineSDDInjectors::WriteToROOT(TFile *fil) const { void AliITSOnlineSDDInjectors::WriteInjectorStatusToASCII(){ // dump status of injectors encoded into UInt_t // 5 bits (value 0-31) to store number of pads with given status - Char_t outfilnam[100]; - sprintf(outfilnam,"SDDinj_ddl%02dc%02d_sid%d.data",fDDL,fCarlos,fSide); - FILE* outf=fopen(outfilnam,"a"); + TString outfilnam; + outfilnam.Form("SDDinj_ddl%02dc%02d_sid%d.data",fDDL,fCarlos,fSide); + FILE* outf=fopen(outfilnam.Data(),"a"); Int_t n[8]={0,0,0,0,0,0,0,0}; for(Int_t jpad=fFirstPadForFit; jpad<=fLastPadForFit; jpad++){ Int_t statusPad=GetInjPadStatus(jpad);