]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSBeamTestDigSSD.cxx
added skeleton for HLTpendolino library
[u/mrichter/AliRoot.git] / ITS / AliITSBeamTestDigSSD.cxx
index 0ee5d5e89209e71a24475e98ae10fdeb420e5960..9c347534fcca056e121792df24b7e0b018785a73 100644 (file)
@@ -5,10 +5,9 @@
 // Date: October 2004                  //
 ////////////////////////////////////////
 
-#include "AliITS.h"
 #include "AliITSgeom.h"
 #include "AliITSdigitSSD.h"
-#include "AliRawReaderDate.h"
+#include "AliRawReader.h"
 #include "AliITSRawStreamSSDv1.h"
 #include "AliITSBeamTestDigSSD.h"
 #include <TBranch.h>
 ClassImp(AliITSBeamTestDigSSD)
 
 //_____________________________________________________________
-AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(): AliITSBeamTestDig() {
+AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(): AliITSBeamTestDig(),
+fFlagHeader(0) 
+{
   //
   // Constructor
   //  
 }
 
 //_____________________________________________________________
-AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title) {
+AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fFlagHeader(0){
   //
   // Constructor
   //
@@ -43,17 +45,21 @@ void AliITSBeamTestDigSSD::Exec(Option_t* /*opt*/) {
   //returns 2 if calibration (injector) data, returns 3 if calibration (test pul  //se) event
 
   TBranch* branch = fTreeD->GetBranch("ITSDigitsSSD");
-  AliITSgeom* geom = fBt->GetITSgeom();
+  if(!fITSgeom){
+    Error("Exec","fITSgeom is null!");
+    return;
+  }
+
   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);
+       if(fITSgeom->GetModuleTypeName(index)=="kSPD") nspd++;
+       if(fITSgeom->GetModuleTypeName(index)=="kSDD") nsdd++;
+       if(fITSgeom->GetModuleTypeName(index)=="kSSD") nssd++;
       }
     }
   }
@@ -70,11 +76,11 @@ void AliITSBeamTestDigSSD::Exec(Option_t* /*opt*/) {
   
   // this constructor sets the flag to select SSD data only 
   // the Next method below will then jump to SSD data for this event
-  AliITSRawStreamSSDv1 str(fReaderDate);
+  AliITSRawStreamSSDv1 str(fReader);
 
   // no selection of equipment 
-  //fReaderDate->SelectEquipment(-1);
-  //fReaderDate->SelectEquipment(17,102,102);
+  //fReader->SelectEquipment(-1);
+  //fReader->SelectEquipment(17,102,102);
 
   while(str.Next()){   
     
@@ -100,7 +106,7 @@ void AliITSBeamTestDigSSD::Exec(Option_t* /*opt*/) {
   
   fTreeD->SetEntries(maxn);
     
-  fReaderDate->Reset();
+  fReader->Reset();
   
   fTreeD->AutoSave();