~chris-rogers/maus/1312

« back to all changes in this revision

Viewing changes to src/common_cpp/DataStructure/EMREvent.cc

candidate 0.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
}
42
42
 
43
43
EMREvent::~EMREvent() {
44
 
  int nplhits = _emrplanehitarray.size();
45
 
  for (int i = 0; i < nplhits; i++)
46
 
    delete _emrplanehitarray[i];
47
 
 
48
44
  _emrplanehitarray.resize(0);
49
45
}
50
46
 
53
49
}
54
50
 
55
51
void EMREvent::SetEMRPlaneHitArray(EMRPlaneHitArray emrplanehitarray) {
 
52
  int nplhits = _emrplanehitarray.size();
 
53
  for (int i = 0; i < nplhits; i++) {
 
54
    if (_emrplanehitarray[i] != NULL)
 
55
        delete _emrplanehitarray[i];
 
56
  }
56
57
  _emrplanehitarray = emrplanehitarray;
57
58
}
58
59
}