]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFCalSector.cxx
Adding new libraries
[u/mrichter/AliRoot.git] / TOF / AliTOFCalSector.cxx
index b3c5050e0cf3d7bdf34627187fc9add130957b76..95b73cc4cc0e1da2d5e31fd8c92c4608149cb629 100644 (file)
 
 /*
 $Log$
+Revision 1.6  2006/04/20 22:30:49  hristov
+Coding conventions (Annalisa)
+
+Revision 1.5  2006/04/16 22:29:05  hristov
+Coding conventions (Annalisa)
+
+Revision 1.4  2006/04/05 08:35:38  hristov
+Coding conventions (S.Arcelli, C.Zampolli)
+
+Revision 1.3  2006/03/28 14:58:16  arcelli
+updates to handle new V5 geometry & some re-arrangements
+
 Revision 1.2  2006/02/13 16:53:00  decaro
 just Fixing Log info
 
@@ -30,17 +42,17 @@ author: Chiara Zampolli, zampolli@bo.infn.it
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
-#include "TObject.h"
-#include "TROOT.h"
 #include "TBrowser.h"
-#include "TClass.h"
+#include "TROOT.h"
+
 #include "AliLog.h"
-#include "AliTOFGeometryV5.h"
+
 #include "AliTOFCalPlateA.h"
 #include "AliTOFCalPlateB.h"
 #include "AliTOFCalPlateC.h"
 #include "AliTOFCalSector.h"
 #include "AliTOFChannel.h"
+#include "AliTOFGeometryV5.h"
 
 extern TROOT *gROOT;
 
@@ -48,37 +60,48 @@ ClassImp(AliTOFCalSector)
 
 //________________________________________________________________
 
-AliTOFCalSector::AliTOFCalSector(){
-  fCh = 0;
-  fGeom=0x0;
-  fNPlate=0;
-  fNStripA=0;
-  fNStripB=0;
-  fNStripC=0;
-  fNpadZ=0;
-  fNpadX=0;
+AliTOFCalSector::AliTOFCalSector():
+  fNPlate(0),
+  fNStripA(0),
+  fNStripB(0),
+  fNStripC(0),
+  fNpadZ(0),
+  fNpadX(0),
+  fGeom(0x0),
+  fCh(0x0)
+{
+  //main ctor
   gROOT->GetListOfBrowsables()->Add(this);
 
 }
 //________________________________________________________________
 
 AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch):
+  fNPlate(0),
+  fNStripA(0),
+  fNStripB(0),
+  fNStripC(0),
+  fNpadZ(0),
+  fNpadX(0),
+  fGeom(0x0),
   fCh(ch)
 {
-  fGeom=0x0;
-  fNPlate=0;
-  fNStripA=0;
-  fNStripB=0;
-  fNStripC=0;
-  fNpadZ=0;
-  fNpadX=0;
+  //ctor with channel
   gROOT->GetListOfBrowsables()->Add(this);
 }
 //________________________________________________________________
 
-AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){
-  fCh = 0;
-  fGeom= geom; 
+AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom):
+  fNPlate(0),
+  fNStripA(0),
+  fNStripB(0),
+  fNStripC(0),
+  fNpadZ(0),
+  fNpadX(0),
+  fGeom(geom),
+  fCh(0x0)
+{
+  //ctor with geom
   fNPlate  = fGeom->NPlates();
   fNStripA = fGeom->NStripA();
   fNStripB = fGeom->NStripB();
@@ -91,9 +114,16 @@ AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){
 //________________________________________________________________
 
 AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch):
+  fNPlate(0),
+  fNStripA(0),
+  fNStripB(0),
+  fNStripC(0),
+  fNpadZ(0),
+  fNpadX(0),
+  fGeom(geom),
   fCh(ch)
 {
-  fGeom= geom; 
+  // ctor with channel and geom
   fNPlate  = fGeom->NPlates();
   fNStripA = fGeom->NStripA();
   fNStripB = fGeom->NStripB();
@@ -105,8 +135,17 @@ AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch):
 //________________________________________________________________
 
 AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
-  TObject(sec)
+  TObject(sec),
+  fNPlate(0),
+  fNStripA(0),
+  fNStripB(0),
+  fNStripC(0),
+  fNpadZ(0),
+  fNpadX(0),
+  fGeom(0x0),
+  fCh(0x0)
   {
+    //copy ctor
     fCh = sec.fCh;
     fNPlate = sec.fNPlate;
     fNStripA = sec.fNStripA;
@@ -118,8 +157,25 @@ AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec):
   }
 //________________________________________________________________
 
+AliTOFCalSector& AliTOFCalSector::operator=(const AliTOFCalSector& sec)
+  {
+    //assignment operator
+    this->fCh = sec.fCh;
+    this->fNPlate = sec.fNPlate;
+    this->fNStripA = sec.fNStripA;
+    this->fNStripB = sec.fNStripB;
+    this->fNStripC = sec.fNStripC;
+    this->fNpadZ = sec.fNpadZ;
+    this->fNpadX = sec.fNpadX;
+    gROOT->GetListOfBrowsables()->Add(this);
+    return *this;
+
+  }
+//________________________________________________________________
+
 AliTOFCalSector::~AliTOFCalSector()
 {
+  //dtor
   gROOT->GetListOfBrowsables()->Remove(this);
   delete[] fCh;
 }
@@ -127,7 +183,7 @@ AliTOFCalSector::~AliTOFCalSector()
 //________________________________________________________________
 
 void AliTOFCalSector::Browse(TBrowser *b){
-
+  //add cal obj to list of browsables
   if(fGeom==0x0){
     AliTOFGeometry *geom= new AliTOFGeometryV5(); 
     AliInfo("V5 TOF Geometry is taken as the default");