]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDCalibChamberStatus.cxx
Removal of old raw reader calls (Raphaelle)
[u/mrichter/AliRoot.git] / TRD / AliTRDCalibChamberStatus.cxx
index a91ef5588d629f281091647f811491c1085feb7c..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,76 +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);
-  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++;
-
-  if(digitsManager) delete digitsManager;
-  if(rawStream) delete rawStream;
-   
-}//_____________________________________________________________________
-void AliTRDCalibChamberStatus::ProcessEvent3(AliRawReader * rawReader, Int_t nevents_physics)
 {
   //
   // Event Processing loop with AliTRDrawStream
@@ -402,7 +331,7 @@ void AliTRDCalibChamberStatus::ProcessEvent3(AliRawReader * rawReader, Int_t nev
 
   if(notEmpty) fCounterEventNotEmpty++;
 
-  if(digitsManager) delete digitsManager;
+  delete digitsManager;
   delete rawStream;
    
 }
@@ -687,7 +616,7 @@ TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCS *calDCS, I
   Double_t col0    = padPlane0->GetCol0();
 
   char  name[1000];
-  sprintf(name,"%s DCS status sm %d pl %d",GetTitle(),sm,pl);
+  snprintf(name,1000,"%s DCS status sm %d pl %d",GetTitle(),sm,pl);
   TH2F * his = new TH2F( name, name, 88,-TMath::Abs(row0),TMath::Abs(row0)
                                    ,148,-TMath::Abs(col0),TMath::Abs(col0));
 
@@ -716,7 +645,8 @@ TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCS *calDCS, I
        // Take the value
        Int_t mcm = paramfee->GetMCMfromPad(irow,icol);
        Int_t rob = paramfee->GetROBfromPad(irow,icol);
-       Int_t state = calDCSFEEEOR->GetMCMGlobalState(rob,mcm); 
+       if(mcm < 0) AliWarning("Problem with mcm number");
+       Int_t state = calDCSFEEEOR->GetMCMGlobalState(rob,TMath::Abs(mcm)); 
                his->SetBinContent(binz,biny,state);
       }
     }
@@ -779,3 +709,4 @@ TCanvas* AliTRDCalibChamberStatus::PlotHistos2DSmEORStatus(AliTRDCalDCS *calDCS,
 }
 
 
+