* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
- $Log$
- Revision 1.10 2002/10/14 14:57:00 hristov
- Merging the VirtualMC branch to the main development branch (HEAD)
+/* $Id$ */
- Revision 1.8.8.1 2002/06/10 17:51:14 hristov
- Merged with v3-08-02
-
- Revision 1.9 2002/05/05 21:10:10 nilsen
- In Distructor, delete fResponse. Since AliITSDetType is supposed to own it
- it should delete it.
-
- Revision 1.8 2001/10/04 22:40:15 nilsen
- Cosmetic changes.
-
- Revision 1.7 2001/09/07 14:43:15 hristov
- Destructor reverted after a temporary fix
-
- Revision 1.6 2001/09/07 08:44:43 hristov
- Deletion commented out because AliITSDetType was not the owner
-
- Revision 1.5 2001/05/31 06:58:38 fca
- Patch problem with destructor
-
- Revision 1.4 2001/05/01 14:47:45 nilsen
- Fixed destructor so that it destroyes the pointers fSegmentation, fResponse,
- fSimulation, and fReconst if they have been allocated. The two TStrings
- fDigClassName and fClustClassName shoud be destroyed automaticaly. This should
- fix a small memory leak associated with digitization and reconstruction.
-
-*/
////////////////////////////////////////////////////////////////////////
// This Class owns the classes needed to to detector simulations and
// reconstruction. This includes the detector segmentation classes,
ClassImp(AliITSDetType)
//______________________________________________________________________
-AliITSDetType::AliITSDetType(){
- // constructor
-
- fSegmentation = 0;
- fResponse = 0;
- fSimulation = 0;
- fReconst = 0;
+AliITSDetType::AliITSDetType():
+TObject(),
+fDetType(kND),
+fResponse(0),
+fSegmentation(0),
+fSimulation(0),
+fReconst(0),
+fDigClassName(""),
+fClustClassName(""){
+ // Default constructor.
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // A default constructed AliITSDetType class.
+}
+//______________________________________________________________________
+AliITSDetType::AliITSDetType(AliITSDetector det,AliITSresponse *res,
+ AliITSsegmentation *seg,AliITSsimulation *sim,
+ AliITSClusterFinder *cf,
+ const Char_t *DigClassName,
+ const Char_t *ClustClassName):
+TObject(),
+fDetType(det),
+fResponse(res),
+fSegmentation(seg),
+fSimulation(sim),
+fReconst(cf),
+fDigClassName(DigClassName),
+fClustClassName(ClustClassName){
+ // Standard constructor
+ // Inputs:
+ // AliITSDetector det Detector type
+ // AliITSresponse *res response class to use
+ // AliITSsegmentation *seg Segmentation class to use
+ // AliITSsimulation *sim Simulation class to use
+ // AliITSClusterFinder *cf Cluster Finder/Reconstruction class to use
+ // const Char_t DigClassName Name of the digit class to be used
+ // const Char_t ClustClassName Name of the cluster class to be
+ // used
+ // Output:
+ // none.
+ // Return:
+ // A Standard constructed AliITSDetType class.
}
//----------------------------------------------------------------------
AliITSDetType::~AliITSDetType(){
// destructor
+ // Inputs:
+ // none.
+ // Output:
+ // none.
+ // Return:
+ // none.
if(fSegmentation!=0) delete fSegmentation; fSegmentation = 0;
if(fResponse!=0) delete fResponse; fResponse = 0;
if(fReconst!=0) delete fReconst; fReconst = 0;
}
//______________________________________________________________________
-AliITSDetType::AliITSDetType(const AliITSDetType &source){
- // Copy Constructor
-
- if(&source == this) return;
- this->fReconst = source.fReconst;
- this->fSimulation = source.fSimulation;
- this->fResponse = source.fResponse;
- this->fSegmentation = source.fSegmentation;
- this->fDigClassName = source.fDigClassName;
- this->fClustClassName = source.fClustClassName;
- return;
+AliITSDetType::AliITSDetType(const AliITSDetType &source) : TObject(source){
+ // Copy Constructor
+ // Inputs:
+ // const AliITSDetType &source class to copy from.
+ // Output:
+ // none.
+ // Return:
+ // none.
+
+ if(&source == this) return;
+ this->fDetType = source.fDetType;
+ this->fReconst = source.fReconst;
+ this->fSimulation = source.fSimulation;
+ this->fResponse = source.fResponse;
+ this->fSegmentation = source.fSegmentation;
+ this->fDigClassName = source.fDigClassName;
+ this->fClustClassName = source.fClustClassName;
+ return;
}
//______________________________________________________________________
AliITSDetType& AliITSDetType::operator=(const AliITSDetType &source){
- // Assignment operator
-
- if(&source == this) return *this;
- this->fReconst = source.fReconst;
- this->fSimulation = source.fSimulation;
- this->fResponse = source.fResponse;
- this->fSegmentation = source.fSegmentation;
- this->fDigClassName = source.fDigClassName;
- this->fClustClassName = source.fClustClassName;
- return *this;
+ // Assignment operator
+ // Inputs:
+ // const AliITSDetType &source class to copy from.
+ // Output:
+ // none.
+ // Return:
+ // a new AliITSDetType class with the same values as in source.
+
+ if(&source == this) return *this;
+ this->fDetType = source.fDetType;
+ this->fReconst = source.fReconst;
+ this->fSimulation = source.fSimulation;
+ this->fResponse = source.fResponse;
+ this->fSegmentation = source.fSegmentation;
+ this->fDigClassName = source.fDigClassName;
+ this->fClustClassName = source.fClustClassName;
+ return *this;
}