]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSBeamTestDigSDD.cxx
Fixes for not filled histograms and calculation of Dijet binning
[u/mrichter/AliRoot.git] / ITS / AliITSBeamTestDigSDD.cxx
index 4bd8c180b7a1601d6f5b6f64e4d72788a84d2653..a302c9a1739ba9feee4fcbcb9a879f1ccae2d42e 100644 (file)
@@ -8,9 +8,8 @@
 #include "AliITSdigitSDD.h"
 #include "AliRawReader.h"
 #include "AliVMERawStream.h"
-#include "AliITSRawStreamSDDv2.h"
-#include "AliITSRawStreamSDDv3.h"
-#include "AliITSRawStreamSDD.h"
+#include "AliITSRawStreamSDDBeamTest.h"
+#include "AliITSRawStreamSDDBeamTestNov04.h"
 #include "AliITSBeamTestDigSDD.h"
 #include "AliITSEventHeader.h"
 #include "AliITSgeom.h"
 ClassImp(AliITSBeamTestDigSDD)
 
 //_____________________________________________________________
-  AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(): AliITSBeamTestDig()
-{
+  AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(): AliITSBeamTestDig(),
+fSDDEvType(0),
+fSubEventAttributes(0),
+fBtPer(),
+fThreshold(0),
+fStreamer(0){
   //
   // Constructor
   //
   SetBtPeriod();
-  fSubEventAttributes=0;
-  fThreshold=0;
-  fStreamer=0;
 }
 
 //_____________________________________________________________
-AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title)
+AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
+fSDDEvType(0),
+fSubEventAttributes(0),
+fBtPer(),
+fThreshold(0),
+fStreamer(0)
 {
   //
   // Constructor
   //
   SetBtPeriod();
-  fSubEventAttributes=0;
-  fThreshold=0;
-  fStreamer=0;
 }
 
 //__________________________________________________________________
@@ -75,9 +77,10 @@ void AliITSBeamTestDigSDD::Exec(Option_t* /*opt*/)
     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++;
+       TString dtype(fITSgeom->GetModuleTypeName(index));
+       if(dtype.Contains("SPD")) nspd++;
+       if(dtype.Contains("SDD")) nsdd++;
+       if(dtype.Contains("SSD")) nssd++;
       }
     }
   }
@@ -92,7 +95,7 @@ void AliITSBeamTestDigSDD::Exec(Option_t* /*opt*/)
 
   switch(fBtPer){
   case kNov04:
-    fStreamer = new AliITSRawStreamSDDv3(fReader);
+    fStreamer = new AliITSRawStreamSDDBeamTestNov04(fReader);
     break;
   case kAug04:
     AliVMERawStream vmeStreamer(fReader);
@@ -106,7 +109,7 @@ void AliITSBeamTestDigSDD::Exec(Option_t* /*opt*/)
     if(fSDDEvType==2) fITSHeader->SetEventTypeSDD(kCalibration1);
     if(fSDDEvType==3) fITSHeader->SetEventTypeSDD(kCalibration2);
     fReader->Reset();
-    fStreamer = new AliITSRawStreamSDDv2(fReader);
+    fStreamer = new AliITSRawStreamSDDBeamTest(fReader);
     break;
   }
 
@@ -184,24 +187,21 @@ Int_t AliITSBeamTestDigSDD::GetEventType(){
 }
 
 //______________________________________________________________________
-AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const AliITSBeamTestDigSDD &bt):AliITSBeamTestDig(bt){
+AliITSBeamTestDigSDD::AliITSBeamTestDigSDD(const AliITSBeamTestDigSDD &bt):AliITSBeamTestDig(bt),
+fSDDEvType(bt.fSDDEvType),
+fSubEventAttributes(bt.fSubEventAttributes),
+fBtPer(bt.fBtPer),
+fThreshold(bt.fThreshold),
+fStreamer(bt.fStreamer){
     // Copy constructor. 
 
-  fSDDEvType = bt.fSDDEvType;
-  fSubEventAttributes = bt.fSubEventAttributes;
-  fBtPer = bt.fBtPer;
-  fThreshold = bt.fThreshold;
-  fStreamer = bt.fStreamer;
 }
 //______________________________________________________________________
 AliITSBeamTestDigSDD& AliITSBeamTestDigSDD::operator=(const AliITSBeamTestDigSDD &source){
-    // Assignment operator. This is a function which is not allowed to be
-    // done to the ITS beam test dig. It exits with an error.
-    // Inputs:
-    if(this==&source) return *this;
-    Error("operator=","You are not allowed to make a copy of the AliITSBeamTestDig");
-    exit(1);
-    return *this; //fake return
+    // Assignment operator. 
+  this->~AliITSBeamTestDigSDD();
+  new(this) AliITSBeamTestDigSDD(source);
+  return *this;
 }