1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/projects/maus
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.
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.
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/>.
17
#ifndef _SRC_COMMON_CPP_DATASTRUCTURE_TriggerEngine_
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_TriggerEngine_
20
#include "src/common_cpp/Utils/VersionNumber.hh"
21
#include "src/common_cpp/DataStructure/ParticleTrigger.hh"
25
/** @class TriggerEngine comment
27
* @var ldc_id <--description-->
28
* @var phys_event_number <--description-->
29
* @var time_stamp <--description-->
30
* @var geo <--description-->
31
* @var ptriggers <--description-->
36
/** Default constructor - initialises to 0/NULL */
39
/** Copy constructor - any pointers are deep copied */
40
TriggerEngine(const TriggerEngine& trigger);
42
/** Equality operator - any pointers are deep copied */
43
TriggerEngine& operator=(const TriggerEngine& trigger);
45
/** Destructor - any member pointers are deleted */
46
virtual ~TriggerEngine();
53
void SetLdcId(int ldc_id);
55
/** Returns PhysEventNumber */
56
int GetPhysEventNumber() const;
58
/** Sets PhysEventNumber */
59
void SetPhysEventNumber(int phys_event_number);
61
/** Returns TimeStamp */
62
int GetTimeStamp() const;
65
void SetTimeStamp(int time_stamp);
73
/** Returns the array of particle trigers */
74
ParticleTriggerArray GetParticleTriggerArray() const { return _ptriggers; }
76
/** Returns a pointer to the array of particle trigers */
77
ParticleTriggerArray* GetParticleTriggerArrayPtr() { return &_ptriggers;}
79
/** Sets the array of of particle trigers */
80
void SetParticleTriggerArray(ParticleTriggerArray ptriggers) { _ptriggers = ptriggers; }
83
void AddParticleTrigger(ParticleTrigger trigger) { _ptriggers.push_back(trigger); }
85
/** Returns the amount of particle triggers */
86
size_t GetParticleTriggerArraySize() { return _ptriggers.size(); }
90
int _phys_event_number;
93
ParticleTriggerArray _ptriggers;
95
MAUS_VERSIONED_CLASS_DEF(TriggerEngine)
99
#endif // _SRC_COMMON_CPP_DATASTRUCTURE_TriggerEngine_