ClassImp(AliITSDetTypeRec)
//________________________________________________________________
-AliITSDetTypeRec::AliITSDetTypeRec(): TObject(){
+AliITSDetTypeRec::AliITSDetTypeRec(): TObject(),
+fNMod(0),
+fReconstruction(0),
+fSegmentation(0),
+fCalibration(0),
+fPreProcess(0),
+fPostProcess(0),
+fDigits(0),
+fNdtype(0),
+fCtype(0),
+fNctype(0),
+fRecPoints(0),
+fNRecPoints(0),
+fSelectedVertexer(),
+fLoader(0),
+fRunNumber(0),
+fFirstcall(kTRUE){
// Default Constructor
// Inputs:
// none.
// none.
// Return:
// A properly zero-ed AliITSDetTypeRec class.
- fReconstruction = 0;
- fSegmentation = 0;
- fCalibration = 0;
- fPreProcess = 0;
- fPostProcess = 0;
- fDigits = 0;;
+
for(Int_t i=0; i<3; i++){
fClusterClassName[i]=0;
fDigClassName[i]=0;
fRecPointClassName[i]=0;
}
- fNdtype = 0;
- fCtype = 0;
- fNMod = 0;
- fNctype = 0;
- fRecPoints = 0;
- fNRecPoints = 0;
+
SelectVertexer(" ");
- fLoader = 0;
- fRunNumber = 0;
- fFirstcall = kTRUE;
+
}
//________________________________________________________________
-AliITSDetTypeRec::AliITSDetTypeRec(AliITSLoader *loader): TObject(){
+AliITSDetTypeRec::AliITSDetTypeRec(AliITSLoader *loader): TObject(),
+fNMod(0),
+fReconstruction(0),
+fSegmentation(0),
+fCalibration(0),
+fPreProcess(0),
+fPostProcess(0),
+fDigits(0),
+fNdtype(0),
+fCtype(0),
+fNctype(0),
+fRecPoints(0),
+fNRecPoints(0),
+fSelectedVertexer(),
+fLoader(loader),
+fRunNumber(0),
+fFirstcall(kTRUE){
// Standard Constructor
// Inputs:
// none.
//
fReconstruction = new TObjArray(fgkNdettypes);
- fSegmentation = 0;
- fCalibration = 0;
- fPreProcess = 0;
- fPostProcess = 0;
fDigits = new TObjArray(fgkNdettypes);
for(Int_t i=0; i<3; i++){
fClusterClassName[i]=0;
fNctype[i]=0;
}
- SelectVertexer(" ");
- fLoader = loader;
-
+ SelectVertexer(" ");
SetRunNumber();
- fFirstcall = kTRUE;
}
+
//______________________________________________________________________
-AliITSDetTypeRec::AliITSDetTypeRec(const AliITSDetTypeRec &/*rec*/):TObject(/*rec*/){
- // Copy constructor.
+AliITSDetTypeRec::AliITSDetTypeRec(const AliITSDetTypeRec & rec):TObject(rec),
+fNMod(rec.fNMod),
+fReconstruction(rec.fReconstruction),
+fSegmentation(rec.fSegmentation),
+fCalibration(rec.fCalibration),
+fPreProcess(rec.fPreProcess),
+fPostProcess(rec.fPostProcess),
+fDigits(rec.fDigits),
+fNdtype(rec.fNdtype),
+fCtype(rec.fCtype),
+fNctype(rec.fNctype),
+fRecPoints(rec.fRecPoints),
+fNRecPoints(rec.fNRecPoints),
+fSelectedVertexer(rec.fSelectedVertexer),
+fLoader(rec.fLoader),
+fRunNumber(rec.fRunNumber),
+fFirstcall(rec.fFirstcall)
+{
+
+ // Copy constructor.
- Error("Copy constructor","Copy constructor not allowed");
-
}
//______________________________________________________________________
-AliITSDetTypeRec& AliITSDetTypeRec::operator=(const AliITSDetTypeRec& /*source*/){
- // Assignment operator. This is a function which is not allowed to be
- // done.
- Error("operator=","Assignment operator not allowed\n");
- return *this;
+AliITSDetTypeRec& AliITSDetTypeRec::operator=(const AliITSDetTypeRec& source){
+ // Assignment operator.
+ this->~AliITSDetTypeRec();
+ new(this) AliITSDetTypeRec(source);
+ return *this;
+
}
//_____________________________________________________________________
AliITSDetTypeRec::~AliITSDetTypeRec(){
-
//Destructor
if(fReconstruction){
SetRunNumber((Int_t)AliCDBManager::Instance()->GetRun());
Int_t run=GetRunNumber();
- if(run<0)run=0; // if the run number is not yet set, use fake run # 0
Bool_t origCacheStatus = AliCDBManager::Instance()->GetCacheFlag();
Bool_t isCacheActive = kTRUE;
AliCDBEntry *entry2SSD = AliCDBManager::Instance()->Get("ITS/Calib/RespSSD", run);
if(!entrySPD || !entrySDD || !entrySSD || !entry2SPD || !entry2SDD || !entry2SSD){
- AliWarning("Calibration object retrieval failed! Dummy calibration will be used.");
- AliCDBStorage *localStor =
- AliCDBManager::Instance()->GetStorage("local://$ALICE_ROOT");
-
- entrySPD = localStor->Get("ITS/Calib/CalibSPD", run);
- entrySDD = localStor->Get("ITS/Calib/CalibSDD", run);
- entrySSD = localStor->Get("ITS/Calib/CalibSSD", run);
- entry2SPD = localStor->Get("ITS/Calib/RespSPD", run);
- entry2SDD = localStor->Get("ITS/Calib/RespSDD", run);
- entry2SSD = localStor->Get("ITS/Calib/RespSSD", run);
- }
-
- if(!entrySPD || !entrySDD || !entrySSD || !entry2SPD || !entry2SDD || !entry2SSD){
- AliError("Calibration data was not found in $ALICE_ROOT!");
+ AliFatal("Calibration object retrieval failed! ");
return kFALSE;
- }
-
+ }
+
TObjArray *calSPD = (TObjArray *)entrySPD->GetObject();
if(!isCacheActive)entrySPD->SetObject(NULL);
entrySPD->SetOwner(kTRUE);
for(id=0;id<3;id++){
rec = (AliITSClusterFinderV2*)GetReconstructionModel(id);
rec->SetDetTypeRec(this);
- if (!rec) {
- Error("DigitsToRecPoints",
- "The reconstruction class was not instanciated");
- exit(1);
- }
+ if (!rec)
+ AliFatal("The reconstruction class was not instanciated");
+
rec->RawdataToClusters(rawReader,clusters);
}
Int_t nClusters =0;
+ TClonesArray *emptyArray=new TClonesArray("AliITSRecPoint");
for(Int_t iModule=0;iModule<GetITSgeom()->GetIndexMax();iModule++){
array = clusters[iModule];
if(!array){
- Error("DigitsToRecPoints","data for module %d missing!",iModule);
- array = new TClonesArray("AliITSRecPoint");
+ AliDebug(1,Form("data for module %d missing!",iModule));
+ array = emptyArray;
}
cTree->SetBranchAddress("ITSRecPoints",&array);
cTree->Fill();
nClusters+=array->GetEntriesFast();
- delete array;
}
+ delete emptyArray;
+
fLoader->WriteRecPoints("OVERWRITE");
delete[] clusters;