]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSBeamTestDigSPD.cxx
correcting printf format specifiers
[u/mrichter/AliRoot.git] / ITS / AliITSBeamTestDigSPD.cxx
index c8e16a438821079ca04ff48bc53c464c84b69dc4..62212fb518c827c9d27dcfda4a657347922777a5 100644 (file)
@@ -6,9 +6,11 @@
 //                                                //
 ////////////////////////////////////////////////////
 
-#include "AliITS.h"
+/* $Id$ */
+
 #include "AliITSdigitSPD.h"
-#include "AliRawReaderDate.h"
+#include "AliRawReader.h"
+#include "AliRawReader.h"
 #include "AliRawDataHeader.h"
 #include "AliITSRawStreamSPD.h"
 #include "AliITSBeamTestDigSPD.h"
@@ -21,23 +23,19 @@ ClassImp(AliITSBeamTestDigSPD)
 
 
 //_____________________________________________________________
-  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(): AliITSBeamTestDig()
-{
+  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(): AliITSBeamTestDig(),
+fFlagHeader(0){
   //
   // Constructor
   //
-
-  
 }
 
 //_____________________________________________________________
-  AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title)
-{
+AliITSBeamTestDigSPD::AliITSBeamTestDigSPD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fFlagHeader(0){
   //
   // Constructor
   //
-
 }
 
 //__________________________________________________________________
@@ -56,19 +54,23 @@ void AliITSBeamTestDigSPD::Exec(Option_t* /*opt*/)
   //Reads raw data for SPD, fill SPD digits tree
 
 
+  if(!fITSgeom){
+    Error("Exec","fITSgeom is null!");
+    return;
+  }
   TBranch* branch = fTreeD->GetBranch("ITSDigitsSPD");
 
-  AliITSgeom* geom = fBt->GetITSgeom();
   Int_t nsdd=0;
   Int_t nspd=0;
   Int_t nssd=0;
-  for(Int_t nlay=1;nlay<=geom->GetNlayers();nlay++){
-    for(Int_t nlad=1;nlad<=geom->GetNladders(nlay);nlad++){
-      for(Int_t ndet=1;ndet<=geom->GetNdetectors(nlay);ndet++){
-       Int_t index=geom->GetModuleIndex(nlay,nlad,ndet);
-       if(geom->GetModuleTypeName(index)=="kSPD") nspd++;
-       if(geom->GetModuleTypeName(index)=="kSDD") nsdd++;
-       if(geom->GetModuleTypeName(index)=="kSSD") nssd++;
+  for(Int_t nlay=1;nlay<=fITSgeom->GetNlayers();nlay++){
+    for(Int_t nlad=1;nlad<=fITSgeom->GetNladders(nlay);nlad++){
+      for(Int_t ndet=1;ndet<=fITSgeom->GetNdetectors(nlay);ndet++){
+       Int_t index=fITSgeom->GetModuleIndex(nlay,nlad,ndet);
+       TString dtype(fITSgeom->GetModuleTypeName(index));
+       if(dtype.Contains("SPD")) nspd++;
+       if(dtype.Contains("SDD")) nsdd++;
+       if(dtype.Contains("SSD")) nssd++;
       }
     }
   }
@@ -85,17 +87,17 @@ void AliITSBeamTestDigSPD::Exec(Option_t* /*opt*/)
    }
   
 
-  AliITSRawStreamSPD str(fReaderDate);
+  AliITSRawStreamSPD str(fReader);
 
-  fReaderDate->SelectEquipment(17,211,211);
+  // fReader->SelectEquipment(17,0,19);
 
   while(str.Next()){  
 
-    const AliRawDataHeader* rdh = fReaderDate->GetDataHeader();
-    UChar_t blockAttributes = fReaderDate->GetBlockAttributes();     
-    UInt_t statusBits = fReaderDate->GetStatusBits();     
-    UInt_t orbitNumber = rdh->fEventID2;                        
-    UShort_t  bunchCross = rdh->fEventID1;      
+    const AliRawDataHeader* rdh = fReader->GetDataHeader();
+    UChar_t blockAttributes = fReader->GetBlockAttributes();     
+    UInt_t statusBits = fReader->GetStatusBits();     
+    UInt_t orbitNumber = rdh->GetEventID2();                    
+    UShort_t  bunchCross = rdh->GetEventID1();      
       // UInt_t DataSize = rdh->fSize;                               
       //UChar_t L1TrigType = rdh->fL1TriggerType;                            
       //UInt_t MiniEvId = rdh->GetMiniEventID();                             
@@ -128,11 +130,11 @@ void AliITSBeamTestDigSPD::Exec(Option_t* /*opt*/)
       //fITSHeader->SetSubDet(0,Subdets);
       //fITSHeader->SetL1TriggerType(0,L1TrigType);
 
-   // fITSHeader->SetOrbitNumberSPD(OrbitNumber);
-         //printf("Bunch Crossing  = %x\n ",BunchCross);
-     if ( blockAttributes != 0x3a ) {
-       Info("Exec","Block Attribs  = %x\n ",blockAttributes);
-     }  
+      //fITSHeader->SetOrbitNumberSPD(OrbitNumber);
+      //printf("Bunch Crossing  = %x\n ",BunchCross);
+      //if ( blockAttributes != 0x3a ) {
+      //Info("Exec","Block Attribs  = %x\n ",blockAttributes);
+      //}  
     
      
     
@@ -148,7 +150,7 @@ void AliITSBeamTestDigSPD::Exec(Option_t* /*opt*/)
     fTreeD->SetEntries(maxn);
   
        
-    fReaderDate->Reset();
+    fReader->Reset();
     fTreeD->AutoSave();