~ajdobbs/maus/event-selection

« back to all changes in this revision

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

  • Committer: Yordan Karadzhov
  • Date: 2016-07-01 11:05:05 UTC
  • Revision ID: yordan.karadzhov@cern.ch-20160701110505-6c8a0osghvnwffjy
EpicsInterface and TriggerEngine are added to the Data structure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
 
2
 *
 
3
 * MAUS is free software: you can redistribute it and/or modify
 
4
 * it under the terms of the GNU General Public License as published by
 
5
 * the Free Software Foundation, either version 3 of the License, or
 
6
 * (at your option) any later version.
 
7
 *
 
8
 * MAUS is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with MAUS.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#include "src/common_cpp/DataStructure/TriggerEngine.hh"
 
18
 
 
19
 
 
20
namespace MAUS {
 
21
 
 
22
TriggerEngine::TriggerEngine()
 
23
    : _ldc_id(0), _phys_event_number(0),
 
24
      _time_stamp(0), _geo(0), _ptriggers() {
 
25
}
 
26
 
 
27
TriggerEngine::TriggerEngine(const TriggerEngine& trigger)
 
28
    : _ldc_id(0), _phys_event_number(0),
 
29
      _time_stamp(0), _geo(0), _ptriggers() {
 
30
    *this = trigger;
 
31
}
 
32
 
 
33
TriggerEngine& TriggerEngine::operator=(const TriggerEngine& trigger) {
 
34
    if (this == &trigger) {
 
35
        return *this;
 
36
    }
 
37
 
 
38
    SetLdcId(trigger._ldc_id);
 
39
    SetPhysEventNumber(trigger._phys_event_number);
 
40
    SetTimeStamp(trigger._time_stamp);
 
41
    SetGeo(trigger._geo);
 
42
    SetParticleTriggerArray(trigger._ptriggers);
 
43
 
 
44
    return *this;
 
45
}
 
46
 
 
47
TriggerEngine::~TriggerEngine() {
 
48
}
 
49
 
 
50
int TriggerEngine::GetLdcId() const {
 
51
    return _ldc_id;
 
52
}
 
53
 
 
54
void TriggerEngine::SetLdcId(int ldc_id) {
 
55
    _ldc_id = ldc_id;
 
56
}
 
57
 
 
58
int TriggerEngine::GetPhysEventNumber() const {
 
59
    return _phys_event_number;
 
60
}
 
61
 
 
62
void TriggerEngine::SetPhysEventNumber(int phys_event_number) {
 
63
    _phys_event_number = phys_event_number;
 
64
}
 
65
 
 
66
int TriggerEngine::GetTimeStamp() const {
 
67
    return _time_stamp;
 
68
}
 
69
 
 
70
void TriggerEngine::SetTimeStamp(int time_stamp) {
 
71
    _time_stamp = time_stamp;
 
72
}
 
73
 
 
74
int TriggerEngine::GetGeo() const {
 
75
    return _geo;
 
76
}
 
77
 
 
78
void TriggerEngine::SetGeo(int geo) {
 
79
    _geo = geo;
 
80
}
 
81
}
 
82