~ajdobbs/maus/event-selection

« back to all changes in this revision

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

  • 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
#ifndef _SRC_COMMON_CPP_DATASTRUCTURE_TriggerEngine_
 
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_TriggerEngine_
 
19
 
 
20
#include "src/common_cpp/Utils/VersionNumber.hh"
 
21
#include "src/common_cpp/DataStructure/ParticleTrigger.hh"
 
22
 
 
23
namespace MAUS {
 
24
 
 
25
/** @class TriggerEngine comment
 
26
 *
 
27
 *  @var ldc_id  <--description-->
 
28
 *  @var phys_event_number  <--description-->
 
29
 *  @var time_stamp  <--description-->
 
30
 *  @var geo  <--description-->
 
31
 *  @var ptriggers  <--description-->
 
32
 */
 
33
 
 
34
class TriggerEngine {
 
35
  public:
 
36
    /** Default constructor - initialises to 0/NULL */
 
37
    TriggerEngine();
 
38
 
 
39
    /** Copy constructor - any pointers are deep copied */
 
40
    TriggerEngine(const TriggerEngine& trigger);
 
41
 
 
42
    /** Equality operator - any pointers are deep copied */
 
43
    TriggerEngine& operator=(const TriggerEngine& trigger);
 
44
 
 
45
    /** Destructor - any member pointers are deleted */
 
46
    virtual ~TriggerEngine();
 
47
 
 
48
 
 
49
    /** Returns LdcId */
 
50
    int GetLdcId() const;
 
51
 
 
52
    /** Sets LdcId */
 
53
    void SetLdcId(int ldc_id);
 
54
 
 
55
    /** Returns PhysEventNumber */
 
56
    int GetPhysEventNumber() const;
 
57
 
 
58
    /** Sets PhysEventNumber */
 
59
    void SetPhysEventNumber(int phys_event_number);
 
60
 
 
61
    /** Returns TimeStamp */
 
62
    int GetTimeStamp() const;
 
63
 
 
64
    /** Sets TimeStamp */
 
65
    void SetTimeStamp(int time_stamp);
 
66
 
 
67
    /** Returns Geo */
 
68
    int GetGeo() const;
 
69
 
 
70
    /** Sets Geo */
 
71
    void SetGeo(int geo);
 
72
 
 
73
    /** Returns the array of particle trigers */
 
74
    ParticleTriggerArray GetParticleTriggerArray() const         { return _ptriggers; }
 
75
 
 
76
    /** Returns a pointer to the array of particle trigers */
 
77
    ParticleTriggerArray* GetParticleTriggerArrayPtr()           { return &_ptriggers;}
 
78
 
 
79
    /** Sets the array of of particle trigers */
 
80
    void SetParticleTriggerArray(ParticleTriggerArray ptriggers) { _ptriggers = ptriggers; }
 
81
 
 
82
    /** Adds a trigger */
 
83
    void AddParticleTrigger(ParticleTrigger trigger)             { _ptriggers.push_back(trigger); }
 
84
 
 
85
    /** Returns the amount of particle triggers */
 
86
    size_t GetParticleTriggerArraySize()                         { return _ptriggers.size(); }
 
87
 
 
88
  private:
 
89
    int _ldc_id;
 
90
    int _phys_event_number;
 
91
    int _time_stamp;
 
92
    int _geo;
 
93
    ParticleTriggerArray  _ptriggers;
 
94
 
 
95
    MAUS_VERSIONED_CLASS_DEF(TriggerEngine)
 
96
};
 
97
}
 
98
 
 
99
#endif  // _SRC_COMMON_CPP_DATASTRUCTURE_TriggerEngine_
 
100