]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSOnlineSDDBase.cxx
Part of the Warning messages changed to AliDebug messages
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSDDBase.cxx
index 5cdb9c0736cfc47ba4ad71448ac2e17e2729b830..4dfdf52c4213fae6c0ffde2694bc45efac80e0a0 100644 (file)
@@ -62,7 +62,7 @@ AliITSOnlineSDDBase::~AliITSOnlineSDDBase(){
 }
 //______________________________________________________________________
 void AliITSOnlineSDDBase::Reset(){
-  //
+  // reset all counters
   fNEvents=0;
   for(Int_t i=0;i<fgkNAnodes;i++){
     fGoodAnode[i]=1;
@@ -73,7 +73,7 @@ void AliITSOnlineSDDBase::Reset(){
 }
 //______________________________________________________________________
 void  AliITSOnlineSDDBase::ValidateAnodes(){
-  //
+  // tag good/bad channels
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
     fGoodAnode[ian]=1;
     Float_t basel=GetAnodeBaseline(ian);
@@ -89,7 +89,8 @@ void  AliITSOnlineSDDBase::ValidateAnodes(){
 
 //______________________________________________________________________
 void AliITSOnlineSDDBase::AddEvent(TH2F* hrawd){
-  // 
+  // analyzes one event and adds its ontribution to the various counters
+
   fNEvents++;
   const Int_t kTimeBins=fLastGoodTB+1;
   Float_t sum[fgkNAnodes];
@@ -168,7 +169,7 @@ Float_t AliITSOnlineSDDBase::GetMinimumBaseline() const {
 }
 //______________________________________________________________________
 Float_t AliITSOnlineSDDBase::CalcMeanRawNoise() const{
-  //
+  // compute mean value of raw noise
   Float_t meanns=0.;
   Int_t cnt=0;
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
@@ -181,8 +182,11 @@ Float_t AliITSOnlineSDDBase::CalcMeanRawNoise() const{
 }
 //______________________________________________________________________
 void AliITSOnlineSDDBase::WriteToASCII(){
-  //
-  Char_t outfilnam[100];
+  // writes parameters of each channel into an ASCII file 
+  // to be then read in the successive step for common mode noise
+  // correction (AliITSOnlineSDDCMN)
+
+  TString outfilnam;
   Float_t basMin,basMax;
   GetMinAndMaxBaseline(basMin,basMax);
   Float_t finalVal=basMin;
@@ -194,8 +198,8 @@ void AliITSOnlineSDDBase::WriteToASCII(){
   Int_t thrH=(Int_t)(finalVal+fHighThrFact*avNoise+0.5);
   if(CountGoodAnodes()==0) thrH=255;
 
-  sprintf(outfilnam,"SDDbase_step1_ddl%02dc%02d_sid%d.data",fDDL,fCarlos,fSide);
-  FILE* outf=fopen(outfilnam,"w");
+  outfilnam.Form("SDDbase_step1_ddl%02dc%02d_sid%d.data",fDDL,fCarlos,fSide);
+  FILE* outf=fopen(outfilnam.Data(),"w");
   fprintf(outf,"%d\n",thrH);
   fprintf(outf,"%d\n",thrL);
   Float_t corrnoise=2.;