// //
// //
////////////////////////////////////////////////////
-#include "AliITS.h"
#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;
}
//__________________________________________________________________
TBranch* branch = fTreeD->GetBranch("ITSDigitsSDD");
Int_t maxn=0;
- 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);
+ TString dtype(fITSgeom->GetModuleTypeName(index));
+ if(dtype.Contains("SPD")) nspd++;
+ if(dtype.Contains("SDD")) nsdd++;
+ if(dtype.Contains("SSD")) nssd++;
}
}
}
switch(fBtPer){
case kNov04:
- fStreamer = new AliITSRawStreamSDDv3(fReader);
+ fStreamer = new AliITSRawStreamSDDBeamTestNov04(fReader);
break;
case kAug04:
AliVMERawStream vmeStreamer(fReader);
if(fSDDEvType==2) fITSHeader->SetEventTypeSDD(kCalibration1);
if(fSDDEvType==3) fITSHeader->SetEventTypeSDD(kCalibration2);
fReader->Reset();
- fStreamer = new AliITSRawStreamSDDv2(fReader);
+ fStreamer = new AliITSRawStreamSDDBeamTest(fReader);
break;
}
}
//______________________________________________________________________
-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;
}