Removal of old raw reader calls (Raphaelle)
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Nov 2010 10:05:41 +0000 (10:05 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 5 Nov 2010 10:05:41 +0000 (10:05 +0000)
TRD/AliTRDCalibChamberStatus.cxx
TRD/AliTRDCalibChamberStatus.h
TRD/AliTRDCalibPadStatus.cxx
TRD/AliTRDCalibPadStatus.h
TRD/AliTRDCalibraFillHisto.cxx
TRD/AliTRDCalibraFillHisto.h
TRD/TRDHALFCHAMBERSTATUSda.cxx
TRD/TRDPEDESTALda.cxx
TRD/TRDVDRIFTda.cxx

index a4dd2e4caeee01a85f4cd7f60702916037b7282a..b77db407bf46c6f24bfd25b9936c0725e73097ee 100644 (file)
@@ -47,7 +47,6 @@
 #include "AliTRDfeeParam.h"
 #include "AliTRDdigitsManager.h"
 #include "AliTRDSignalIndex.h"
-#include "AliTRDrawFastStream.h"
 #include "AliTRDpadPlane.h"
 #include "./Cal/AliTRDCalChamberStatus.h"
 #include "./Cal/AliTRDCalDCS.h"
@@ -266,77 +265,6 @@ void AliTRDCalibChamberStatus::Init()
 }
 //_____________________________________________________________________
 void AliTRDCalibChamberStatus::ProcessEvent(AliRawReader * rawReader, Int_t nevents_physics)
-{
-  //
-  // Event Processing loop 
-  //
-  //
-  
-  Bool_t notEmpty = kFALSE;
-    
-  AliTRDrawFastStream *rawStream = new AliTRDrawFastStream(rawReader);
-  if (!rawStream) return;
-  rawStream->SetNoErrorWarning();
-  rawStream->SetSharedPadReadout(kFALSE);
-
-  AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager(kTRUE);
-  if (!digitsManager) return;
-  digitsManager->CreateArrays();
-  
-  Int_t det    = 0;
-  while ((det = rawStream->NextChamber(digitsManager, NULL, NULL)) >= 0) { 
-
-    //nextchamber loop
-    
-    // do the QA analysis
-    if (digitsManager->GetIndexes(det)->HasEntry()) {//QA
-      // printf("there is ADC data on this chamber!\n");
-      
-      AliTRDSignalIndex *indexes = digitsManager->GetIndexes(det);
-      if (indexes->IsAllocated() == kFALSE) {
-       // AliError("Indexes do not exist!");
-       break;
-      }
-      
-      Int_t iRow  = 0;
-      Int_t iCol  = 0;
-      indexes->ResetCounters();
-      
-      while (indexes->NextRCIndex(iRow, iCol)){
-       Int_t iMcm        = (Int_t)(iCol/18);   // current group of 18 col pads
-       
-       Int_t layer = AliTRDgeometry::GetLayer(det);
-       Int_t sm    = AliTRDgeometry::GetSector(det);
-       Int_t stac  = AliTRDgeometry::GetStack(det);
-       Double_t rphi = 0.5;
-       if(iMcm > 3) rphi = 1.5;
-
-       Double_t val[4] = {sm,layer,stac,rphi}; 
-       fHnSparseI->Fill(&val[0]); 
-       notEmpty = kTRUE;
-       
-       //---------//
-       //  Debug  //
-       if(fDebugLevel > 0) {
-         Int_t detector = AliTRDgeometry::GetDetector(layer,stac,sm);
-         Double_t valu[3] = {nevents_physics,detector,rphi};
-         fHnSparseEvtDet->Fill(&valu[0]); 
-       }
-       //  Debug  //
-       //---------//
-      }
-      
-    }
-    digitsManager->ClearArrays(det);
-  }
-
-  if(notEmpty) fCounterEventNotEmpty++;
-
-  delete digitsManager;
-  delete rawStream;
-   
-}//_____________________________________________________________________
-void AliTRDCalibChamberStatus::ProcessEvent3(AliRawReader * rawReader, Int_t nevents_physics)
 {
   //
   // Event Processing loop with AliTRDrawStream
index 6942b42af410f2a6698e6fd69231f3bc773e44cf..534f8eb3f5be65c4f1de0470af49af0f945c6ab9 100644 (file)
@@ -37,8 +37,7 @@ public:
   AliTRDCalibChamberStatus& operator = (const  AliTRDCalibChamberStatus &source);
 
   void ProcessEvent(AliRawReader    *rawReader, Int_t nevents_physics);
-  void ProcessEvent3(AliRawReader    *rawReader, Int_t nevents_physics);
-  
+    
   void Init();
   void AnalyseHisto();
   void CheckEORStatus(AliTRDCalDCS *calDCS);
@@ -94,3 +93,4 @@ public:
 };
 #endif
 
+
index bcb389b8d121525ff64c024fddbd2b7970696ef8..b5fd6e0c271d5ff72234a8f76ffac1b99688b5ea 100644 (file)
@@ -91,7 +91,6 @@
 #include "./Cal/AliTRDCalPad.h"
 #include "./Cal/AliTRDCalSingleChamberStatus.h"
 
-#include "AliTRDrawFastStream.h"
 #include "AliTRDdigitsManager.h"
 #include "AliTRDdigitsParam.h"
 #include "AliTRDSignalIndex.h"
@@ -446,129 +445,8 @@ Int_t AliTRDCalibPadStatus::ProcessEvent(
 }
 
 //_____________________________________________________________________
-Int_t AliTRDCalibPadStatus::ProcessEvent2(AliRawReader *rawReader)
-{
-  //
-  // Event Processing loop - AliTRDRawStreamCosmic
-  // 0 time bin problem or zero suppression
-  // 1 no input
-  // 2 input
-  // Raw version number: 
-  // [3,31] non zero suppressed
-  // 2,4 and [32,63] zero suppressed 
-  //
-  
-  Int_t withInput = 1;
 
-  AliTRDrawFastStream *rawStream = new AliTRDrawFastStream(rawReader);
-  rawStream->SetNoErrorWarning();
-  rawStream->SetSharedPadReadout(kTRUE);
-
-  AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager(kTRUE);
-  digitsManager->CreateArrays();
-  
-  AliTRDfeeParam *feeParam = AliTRDfeeParam::Instance();
-
-  Int_t det    = 0;
-  while ((det = rawStream->NextChamber(digitsManager, NULL, NULL)) >= 0) { //idetector
-    if (digitsManager->GetIndexes(det)->HasEntry()) {//QA
-      //       printf("there is ADC data on this chamber!\n");
-      
-       AliTRDarrayADC *digits = (AliTRDarrayADC *) digitsManager->GetDigits(det); //mod
-      if (digits->HasData()) { //array
-       
-       AliTRDSignalIndex   *indexes = digitsManager->GetIndexes(det);
-       if (indexes->IsAllocated() == kFALSE) {
-         AliError("Indexes do not exist!");
-         break;
-       }
-       Int_t iRow  = 0;
-       Int_t iCol  = 0;
-       indexes->ResetCounters();
-
-       while (indexes->NextRCIndex(iRow, iCol)) { //column,row
-         
-
-         AliTRDdigitsParam *digitParam = (AliTRDdigitsParam *)digitsManager->GetDigitsParam();
-         
-         Int_t mcm          = 0;     // MCM from AliTRDfeeParam
-         Int_t rob          = 0;     // ROB from AliTRDfeeParam
-         Int_t extCol       = 0;     // extended column from  AliTRDfeeParam  
-         mcm = feeParam->GetMCMfromPad(iRow,iCol);
-         rob = feeParam->GetROBfromPad(iRow,iCol);
-
-         Int_t idetector  = det;                            //  current detector
-         Int_t iRowMax    = rawStream->GetMaxRow();         //  current rowmax
-
-         Int_t adc        = 20 - (iCol%18) -1;                 //  current adc
-         Int_t col        = 0;                              //  col!=0 ->Shared Pad
-         extCol = feeParam->GetExtendedPadColFromADC(rob,mcm,adc);
-         //printf("  iCol %d  iRow %d  iRowMax %d  rob %d  mcm %d  adc %d  extCol %d\n",iCol,iRow,iRowMax,rob,mcm,adc,extCol);   
-         
-         // Signal for regular pads
-         Int_t nbtimebin  = digitParam->GetNTimeBins(idetector);  //  number of time bins read from data         
-         for(Int_t k = 0; k < nbtimebin; k++){
-           Short_t signal = 0;
-           signal = digits->GetData(iRow,iCol,k);
-           
-           if(signal>0) {
-             UpdateHisto2(idetector,iRow,iCol,signal,iRowMax,col,mcm,rob);
-           }
-         }
-
-         
-         
-         if((adc==3-1 || adc==20-1 || adc==19-1) && (iCol > 1 && iCol <142) /* && fSharedPadsOn*/ ) { //SHARED PADS
-           
-             switch(adc) {
-             case 2:  
-               adc = 20;                                       //shared Pad adc 
-               mcm = feeParam->GetMCMfromSharedPad(iRow,iCol); //shared Pad mcm 
-               col =  1;
-               break;
-             case 19:  
-               adc = 1;                                        //shared Pad adc  
-               mcm = feeParam->GetMCMfromSharedPad(iRow,iCol); //shared Pad mcm  
-               col =  2;
-               break;
-             case 18: 
-               adc =  0;                                       //shared Pad adc  
-               mcm = feeParam->GetMCMfromSharedPad(iRow,iCol); //shared Pad mcm 
-               col =  3;
-               break;
-             }
-             rob = feeParam->GetROBfromSharedPad(iRow,iCol);     //shared Pad rob 
-             
-           
-           extCol = feeParam->GetExtendedPadColFromADC(rob,mcm,adc);     //extended pad col via the shared pad rob,mcm and adc
-           
-           //printf("SHARED PAD ---  iCol %d  iRow %d  rob %d  mcm %d  adc %d  extCol %d  col %d\n",iCol,iRow,rob,mcm,adc,extCol,col);
-           for(Int_t k = 0; k < nbtimebin; k++){
-             Short_t signal = 0;
-             signal = digits->GetDataByAdcCol(iRow,extCol,k);
-             
-             if(signal>0) {
-               UpdateHisto2(idetector,iRow,iCol,signal,iRowMax,col,mcm,rob);
-             }
-           }
-         } //shared pads end
-           
-         
-         withInput = 2;
-       }//column,row
-
-      }//array
-    }//QA
-    digitsManager->ClearArrays(det);
-  }//idetector
-  delete digitsManager;
-  delete rawStream;
-  return withInput;
-}
-
-//_____________________________________________________________________
-
-Int_t AliTRDCalibPadStatus::ProcessEvent3(AliRawReader *rawReader)
+Int_t AliTRDCalibPadStatus::ProcessEvent2(AliRawReader *rawReader)
 {
   //
   // RawReader = AliTRDrawStream (Jochen Klein) 
@@ -1205,3 +1083,5 @@ Int_t AliTRDCalibPadStatus::GetSector(Int_t d) const
   return ((Int_t) (d / 30));
 
 }
+
+
index 9e66f20cf74b2cfc24ebe37ef58f82c850ae0988..7467c568632be3db46c595dea4efacdef9b359f8 100644 (file)
@@ -23,7 +23,6 @@ class AliTRDCalPadStatus;
 class AliTRDrawStreamBase;
 class AliTRDgeometry;
 
-class AliTRDrawFastStream;
 class AliTRDdigitsManager;
 class AliTRDSignalIndex;
 
@@ -43,7 +42,6 @@ public:
   Int_t ProcessEvent(AliRawReader    *rawReader, Bool_t nocheck = kFALSE);
   Int_t ProcessEvent(const eventHeaderStruct   *event, Bool_t nocheck = kFALSE);
   Int_t ProcessEvent2(AliRawReader    *rawReader);
-  Int_t ProcessEvent3(AliRawReader    *rawReader);
  
   void  Destroy();
   Int_t UpdateHisto(const Int_t idet, const Int_t iRow, const Int_t iCol,
@@ -116,3 +114,5 @@ public:
 
 };
 #endif
+
+
index 026e6da762e16c56ae0e3dda1f6ec36407edb71a..478e6549acd53f77e48a52f08abaa29c3717720c 100644 (file)
@@ -71,7 +71,6 @@
 #include "./Cal/AliTRDCalPad.h"
 #include "./Cal/AliTRDCalDet.h"
 
-#include "AliTRDrawFastStream.h"
 #include "AliTRDdigitsManager.h"
 #include "AliTRDdigitsParam.h"
 #include "AliTRDSignalIndex.h"
@@ -2664,145 +2663,6 @@ Int_t AliTRDCalibraFillHisto::ProcessEventDAQ(
 }
 //_____________________________________________________________________
 Int_t AliTRDCalibraFillHisto::ProcessEventDAQ2(AliRawReader *rawReader)
- { //main
-  //
-  // Event Processing loop - AliTRDrawFastStream
-  // 
-  // 0 timebin problem
-  // 1 no input
-  // 2 input
-  // Same algorithm as TestBeam but different reader
-  //
-
-   //  AliTRDrawFastStream *rawStream = AliTRDrawFastStream::GetRawStream(rawReader);
-  AliTRDrawFastStream *rawStream = new AliTRDrawFastStream(rawReader);
-  rawStream->SetNoErrorWarning();
-  rawStream->SetSharedPadReadout(kFALSE);
-
-  AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager(kTRUE);
-  digitsManager->CreateArrays();
-    
-  Int_t withInput = 1;
-  
-  Double_t phvalue[16][144][36];
-  for(Int_t k = 0; k < 36; k++){
-    for(Int_t j = 0; j < 16; j++){
-      for(Int_t c = 0; c < 144; c++){
-       phvalue[j][c][k] = 0.0;
-      }
-    }
-  }
-  
-  fDetectorPreviousTrack = -1;
-  fMCMPrevious           = -1;
-  fROBPrevious           = -1;
-  
-  Int_t nbtimebin = 0;                                        
-  Int_t baseline  = 10;  
-
-  
-    fTimeMax = 0;
-       
-    Int_t det    = 0;
-    while ((det = rawStream->NextChamber(digitsManager, NULL, NULL)) >= 0) { //idetector
-
-      if (digitsManager->GetIndexes(det)->HasEntry()) {//QA
-       //      printf("there is ADC data on this chamber!\n");
-
-       AliTRDarrayADC *digits = (AliTRDarrayADC *) digitsManager->GetDigits(det); //mod
-       if (digits->HasData()) { //array
-         
-         AliTRDSignalIndex   *indexes = digitsManager->GetIndexes(det);
-         if (indexes->IsAllocated() == kFALSE) {
-           AliError("Indexes do not exist!");
-           break;
-         }
-         Int_t iRow  = 0;
-         Int_t iCol  = 0;
-         indexes->ResetCounters();
-         
-         while (indexes->NextRCIndex(iRow, iCol)) { //column,row
-           //printf(" det %d \t row %d \t col %d \t digit\n",det,iRow,iCol);
-           //while (rawStream->Next()) {
-           
-           Int_t idetector = det;                                             //  current detector
-           //Int_t imcm      = rawStream->GetMCM();                            //  current MCM
-           //Int_t irob      = rawStream->GetROB();                            //  current ROB
-           
-         
-           if((fDetectorPreviousTrack != idetector) && (fDetectorPreviousTrack != -1)) {
-             // Fill
-             withInput = TMath::Max(FillDAQ(phvalue),withInput);
-             
-             // reset
-             for(Int_t k = 0; k < 36; k++){
-               for(Int_t j = 0; j < 16; j++){
-                 for(Int_t c = 0; c < 144; c++){
-                   phvalue[j][c][k] = 0.0;
-                 }
-               }
-             }
-           }
-           
-           fDetectorPreviousTrack = idetector;
-           //fMCMPrevious           = imcm;
-           //fROBPrevious           = irob;
-           
-           //    nbtimebin              = rawStream->GetNumberOfTimeBins();              //  number of time bins read from data
-           AliTRDdigitsParam *digitParam = (AliTRDdigitsParam *)digitsManager->GetDigitsParam();
-           nbtimebin              = digitParam->GetNTimeBins(det);              //  number of time bins read from data
-           baseline               = digitParam->GetADCbaseline(det);            //  baseline
-           
-           if(nbtimebin == 0) return 0;
-           if((fTimeMax != 0) && (nbtimebin != fTimeMax)) return 0;
-           fTimeMax          = nbtimebin;
-           
-           fNumberClustersf    = fTimeMax;
-           fNumberClusters     = (Int_t)(fNumberClustersProcent*fTimeMax);
-                 
-           
-           for(Int_t itime = 0; itime < nbtimebin; itime++) {
-             //            phvalue[row][col][itime] = signal[itime]-baseline;
-             phvalue[iRow][iCol][itime] = (Short_t)(digits->GetData(iRow,iCol,itime) - baseline);
-             /*if(phvalue[iRow][iCol][itime] >= 20) {
-                printf("----------> phvalue[%d][%d][%d] %d  baseline %d \n",
-                      iRow,
-                      iCol,
-                      itime,
-                      (Short_t)(digits->GetData(iRow,iCol,itime)),
-                      baseline);
-                      }*/
-           }
-           
-         }//column,row
-         
-         // fill the last one
-         if(fDetectorPreviousTrack != -1){
-           
-           // Fill
-           withInput = TMath::Max(FillDAQ(phvalue),withInput);
-           //      printf("\n ---> withinput %d\n\n",withInput);
-           // reset
-           for(Int_t k = 0; k < 36; k++){
-             for(Int_t j = 0; j < 16; j++){
-               for(Int_t c = 0; c < 144; c++){
-                 phvalue[j][c][k] = 0.0;
-               }
-             }
-           }
-         }
-         
-       }//array
-      }//QA
-      digitsManager->ClearArrays(det);
-    }//idetector
-    delete digitsManager;
-
-    delete rawStream;
-    return withInput;
- }//main
-//_____________________________________________________________________
-Int_t AliTRDCalibraFillHisto::ProcessEventDAQ3(AliRawReader *rawReader)
  { //main
   //
   // Event Processing loop - AliTRDrawStream
index 0aeb600b3bc3c6812e672849be5a14b12964e9d0..4285ea27db1c80eba9daebecee7637a28c5c481f 100644 (file)
@@ -44,7 +44,6 @@ class AliTRDCalDet;
 class AliTRDCalROC;
 class AliTRDcalibDB;
 
-class AliTRDrawFastStream;
 class AliTRDdigitsManager;
 class AliTRDSignalIndex;
 
@@ -75,7 +74,6 @@ class AliTRDCalibraFillHisto : public TObject {
          Int_t   ProcessEventDAQ(AliRawReader *rawReader, Bool_t nocheck = kFALSE);
          Int_t   ProcessEventDAQ(const eventHeaderStruct *event, Bool_t nocheck = kFALSE);
          Int_t   ProcessEventDAQ2(AliRawReader *rawReader);
-         Int_t   ProcessEventDAQ3(AliRawReader *rawReader);
 
   // Is Pad on
           Bool_t   IsPadOn(Int_t detector, Int_t row, Int_t col) const;
@@ -334,3 +332,4 @@ AliTRDCalibraVector *GetCalibraVector() const                                { r
   
 #endif
 
+
index 7526de012fd0fb9e485ae898eeffeacaa500aae1..9364139aa8f31797227546cd11a47b8347eb5bac 100644 (file)
@@ -149,7 +149,7 @@ int main(int argc, char **argv) {
       AliRawReader *rawReader = new AliRawReaderDate((void*)event);
       rawReader->Select("TRD");
       
-      calipad.ProcessEvent3((AliRawReader *) rawReader,nevents);
+      calipad.ProcessEvent((AliRawReader *) rawReader,nevents);
       nevents++;
       delete rawReader;
       
@@ -221,4 +221,6 @@ void SendToAmoreDB(TObject *o, unsigned long32 runNb)
     printf("TRDQAda: Waring: Failed to write one of the calib objects to the AMORE database\n");
   // reset env var
   if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
-}
\ No newline at end of file
+}
+
+
index 58dd8332c12604ad77ff8d2ff29e58496783acd2..867ec1cd67fb4695b111856438f18fbedf704c61 100644 (file)
@@ -151,7 +151,7 @@ int main(int argc, char **argv) {
        // for debug
        //rawReader->SelectEquipment(-1,1024,1025);
        
-       Int_t result = calipad.ProcessEvent3((AliRawReader *) rawReader);
+       Int_t result = calipad.ProcessEvent2((AliRawReader *) rawReader);
        // 0 error, 1 no input, 2 output
        if(result == 2) nevents++;
        if(result == 0) passpadstatus = kFALSE;
index decb24a24678c459655c37b0dfac8ab915fe3169..97748453aaac6ef867a66910f31f239dd4325b69 100644 (file)
@@ -167,7 +167,7 @@ int main(int argc, char **argv) {
       AliRawReader *rawReader = new AliRawReaderDate((void*)event);
       rawReader->Select("TRD");
 
-      Int_t result = calibra->ProcessEventDAQ3((AliRawReader *)rawReader);
+      Int_t result = calibra->ProcessEventDAQ2((AliRawReader *)rawReader);
       if(!result) passvdrift = kFALSE;
       else nbvdrift += (Int_t) result/2;
              
@@ -247,3 +247,5 @@ int main(int argc, char **argv) {
   if (amoreDANameorig) gSystem->Setenv("AMORE_DA_NAME",amoreDANameorig);
   } 
 */
+
+