fTOF(0.),
fTracksMatched(),
fNCells(0),
- fCellsAbsId(),
- fCellsAmpFraction()
+ fCellsAbsId(0x0),
+ fCellsAmpFraction(0x0)
{
// default constructor
fTOF(0.),
fTracksMatched(),
fNCells(0),
- fCellsAbsId(),
- fCellsAmpFraction()
+ fCellsAbsId(0x0),
+ fCellsAmpFraction(0x0)
{
// constructor
fTOF(0.),
fTracksMatched(),
fNCells(0),
- fCellsAbsId(),
- fCellsAmpFraction()
+ fCellsAbsId(0x0),
+ fCellsAmpFraction(0x0)
{
// constructor
}
fTOF(clus.fTOF),
fTracksMatched(clus.fTracksMatched),
fNCells(clus.fNCells),
- fCellsAbsId(),
- fCellsAmpFraction()
+ fCellsAbsId(0x0),
+ fCellsAmpFraction(0x0)
{
// Copy constructor
fTracksMatched = clus.fTracksMatched;
fNCells= clus. fNCells;
+ // delete anyway
+ if(fCellsAbsId)delete [] fCellsAbsId;
+ if(fCellsAmpFraction)delete [] fCellsAmpFraction;
+
if (clus.fNCells > 0) {
if(clus.fCellsAbsId){
{
// Set the array of cell absId numbers
if (fNCells) {
- fCellsAbsId = new UShort_t[fNCells];
- for (Int_t i = 0; i < fNCells; i++) fCellsAbsId[i] = array[i];
+ if(!fCellsAbsId)fCellsAbsId = new UShort_t[fNCells];
+ for (Int_t i = 0; i < fNCells; i++) fCellsAbsId[i] = array[i];
}
}
{
// Set the array of cell amplitude fraction
if (fNCells) {
- fCellsAmpFraction = new Double32_t[fNCells];
- for (Int_t i = 0; i < fNCells; i++) fCellsAmpFraction[i] = array[i];
+ if(!fCellsAmpFraction)fCellsAmpFraction = new Double32_t[fNCells];
+ for (Int_t i = 0; i < fNCells; i++) fCellsAmpFraction[i] = array[i];
}
}