ATLAS Offline Software
EventInfo_p1.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**
6  * @file EventInfo_p1.icc
7  *
8  * @brief This class is the persistent representation of EventInfo
9  * @author Marcin.Nowak@cern.ch
10  */
11 
12 inline
13 EventInfo_p1::EventInfo_p1() : m_trigger_info(0)
14 {}
15 
16 inline
17 EventInfo_p1::~EventInfo_p1()
18 {
19  if( m_trigger_info )
20  delete m_trigger_info;
21 }
22 
23 
24 inline
25 EventInfo_p1::EventInfo_p1 (const EventInfo_p1& other)
26  : m_event_ID (other.m_event_ID),
27  m_event_type (other.m_event_type),
28  m_trigger_info (other.m_trigger_info ? new TriggerInfo_p1 (*other.m_trigger_info) : 0)
29 {
30 }
31 
32 
33 inline
34 EventInfo_p1& EventInfo_p1::operator= (const EventInfo_p1& other)
35 {
36  if (this != &other) {
37  m_event_ID = other.m_event_ID;
38  m_event_type = other.m_event_type;
39  if (other.m_trigger_info) {
40  m_trigger_info = new TriggerInfo_p1 (*other.m_trigger_info);
41  }
42  else {
43  m_trigger_info = nullptr;
44  }
45  }
46  return *this;
47 }
48 
49 
50 inline
51 EventInfo_p1::EventInfo_p1 (EventInfo_p1&& other)
52  : m_event_ID (other.m_event_ID),
53  m_event_type (other.m_event_type),
54  m_trigger_info (other.m_trigger_info)
55 {
56  other.m_trigger_info = nullptr;
57 }
58 
59 
60 inline
61 EventInfo_p1& EventInfo_p1::operator= (EventInfo_p1&& other)
62 {
63  if (this != &other) {
64  m_event_ID = other.m_event_ID;
65  m_event_type = other.m_event_type;
66  m_trigger_info = other.m_trigger_info;
67  other.m_trigger_info = nullptr;
68  }
69  return *this;
70 }