/* $Id$ */
+/* History of cvs commits:
+ *
+ * $Log$
+ */
+
//_________________________________________________________________________
// Class provides correspondence between "raw numbers" i.e. number of crustall
// in prototype and PHOT AbsId numer, used in reconstruction.
// --- Standard library ---
// --- AliRoot header files ---
+#include "AliLog.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSConTableDB.h"
fGeom = AliPHOSGeometry::GetInstance("IHEP","") ;
}
-//____________________________________________________________________________
- AliPHOSConTableDB::AliPHOSConTableDB(const AliPHOSConTableDB* cdb){
-//Copy constructor
-
- fProtoRaws=cdb->fProtoRaws ; // Parameters
- fProtoColumns=cdb->fProtoColumns ; // used to calculate
- fRawOffset=cdb->fRawOffset ; // correspondance
- fColOffset=cdb->fColOffset ; // map
- fNcrInProto=cdb->fNcrInProto ; //Number of channels in prototype
- fMinAbsId=cdb->fMinAbsId ; //Minimal AbsId, corresponding to some prototype cristall.
- fMaxAbsId=cdb->fMaxAbsId ; //Maximal AbsId, corresponding to some prototype cristall
- fAbsIdMap=new TArrayS(*(cdb->fAbsIdMap)) ; //Map of correspondance between Raw and PHOS ID
- fRawIdMap=new TArrayS(*(cdb->fRawIdMap)) ; //Map of correspondance between AbsId and Raw
+//____________________________________________________________________________
+AliPHOSConTableDB::AliPHOSConTableDB(const AliPHOSConTableDB& cdb):TNamed(cdb.GetName(), cdb.GetTitle())
+{
+ //Copy constructor
+
+ fProtoRaws=cdb.fProtoRaws ; // Parameters
+ fProtoColumns=cdb.fProtoColumns ; // used to calculate
+ fRawOffset=cdb.fRawOffset ; // correspondance
+ fColOffset=cdb.fColOffset ; // map
+ fNcrInProto=cdb.fNcrInProto ; //Number of channels in prototype
+ fMinAbsId=cdb.fMinAbsId ; //Minimal AbsId, corresponding to some prototype cristall.
+ fMaxAbsId=cdb.fMaxAbsId ; //Maximal AbsId, corresponding to some prototype cristall
+ fAbsIdMap=new TArrayS(*(cdb.fAbsIdMap)) ; //Map of correspondance between Raw and PHOS ID
+ fRawIdMap=new TArrayS(*(cdb.fRawIdMap)) ; //Map of correspondance between AbsId and Raw
}
+
//____________________________________________________________________________
AliPHOSConTableDB::~AliPHOSConTableDB()
{
if(fAbsIdMap)
- delete [] fAbsIdMap ;
+ delete fAbsIdMap ;
if(fRawIdMap)
- delete [] fRawIdMap ;
+ delete fRawIdMap ;
}
//____________________________________________________________________________
//assuming, that prototype is centered in the third module of the PHOS
fNcrInProto =fProtoRaws*fProtoColumns ;
if(!fNcrInProto){
- Error("BuildDB", "configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype") ;
+ AliError(Form("configuratio of prototype is not known!!!\n Specify number of raws and columns in prototype"));
return ;
}
fRawOffset = (fGeom->GetNPhi() - fProtoRaws)/2 ;
return 0 ;
}
//____________________________________________________________________________
-void AliPHOSConTableDB::Print(Option_t * option)const {
+void AliPHOSConTableDB::Print(const Option_t *)const {
//prints configuraion
TString message ;
else
message += " null \n" ;
- Info("Print", message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() ) ;
+ AliInfo(Form(message.Data(), GetName(), GetTitle(), fGeom->GetName(), fGeom->GetTitle() )) ;
- message = "-------Prototype parameters--------\n" ;
- message += " number of columns: %d" ;
- message += " number of raws: %d" ;
- message += " centered in third PHOS module with offsets: " ;
+ message = "\n-------Prototype parameters--------\n" ;
+ message += " number of columns: %d \n" ;
+ message += " number of raws: %d \n" ;
+ message += " centered in third PHOS module with offsets: \n " ;
message += " raw: %d of %d\n" ;
message += " col: %d of %d\n" ;
- message += "------------------------------------" ;
+ message += "------------------------------------ \n" ;
- Info("Print", message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() );
+ AliInfo(Form(message.Data(), fProtoColumns, fProtoRaws, fRawOffset, fGeom->GetNPhi(), fColOffset,fGeom->GetNZ() ));
}
//____________________________________________________________________________
AliPHOSConTableDB& AliPHOSConTableDB::operator=(const AliPHOSConTableDB& cdb){