~mbogomilov/maus/devel3

« back to all changes in this revision

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

  • Committer: Durga Rajaram
  • Date: 2014-01-14 07:07:02 UTC
  • mfrom: (659.1.80 relcand)
  • Revision ID: durga@fnal.gov-20140114070702-2l1fuj1w6rraw7xe
Tags: MAUS-v0.7.6
MAUS-v0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 * along with MAUS.  If not, see <http://www.gnu.org/licenses/>.
15
15
 */
16
16
 
17
 
#include "src/common_cpp/DataStructure/EMREvent.hh"
18
 
 
 
17
#include "DataStructure/EMREvent.hh"
 
18
#include "DataStructure/EMRPlaneHit.hh"
19
19
 
20
20
namespace MAUS {
21
21
 
22
 
EMREvent::EMREvent() {
 
22
EMREvent::EMREvent()
 
23
  : _emrplanehitarray() {
 
24
//    for (int planeid=0; planeid<48; planeid++) {
 
25
//         EMRPlaneHit emrplanehit;
 
26
//         emrplanehit.SetPlane(planeid);
 
27
//         _emrplanehitarray.push_back(emrplanehit);
 
28
//    }
23
29
}
24
30
 
25
31
EMREvent::EMREvent(const EMREvent& _emrevent) {
26
 
    *this = _emrevent;
 
32
  *this = _emrevent;
27
33
}
28
34
 
29
35
EMREvent& EMREvent::operator=(const EMREvent& _emrevent) {
30
 
    if (this == &_emrevent) {
 
36
  if (this == &_emrevent) {
31
37
        return *this;
32
 
    }
33
 
    return *this;
 
38
  }
 
39
  SetEMRPlaneHitArray(_emrevent._emrplanehitarray);
 
40
  return *this;
34
41
}
35
42
 
36
43
EMREvent::~EMREvent() {
 
44
  int nplhits = _emrplanehitarray.size();
 
45
  for (int i = 0; i < nplhits; i++)
 
46
    delete _emrplanehitarray[i];
 
47
 
 
48
  _emrplanehitarray.resize(0);
 
49
}
 
50
 
 
51
EMRPlaneHitArray EMREvent::GetEMRPlaneHitArray() const {
 
52
  return _emrplanehitarray;
 
53
}
 
54
 
 
55
void EMREvent::SetEMRPlaneHitArray(EMRPlaneHitArray emrplanehitarray) {
 
56
  _emrplanehitarray = emrplanehitarray;
37
57
}
38
58
}
39
59