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_DBBSPILLDATA_
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_DBBSPILLDATA_
23
#include "Utils/VersionNumber.hh"
24
#include "DataStructure/DBBHit.hh"
28
typedef std::vector<DBBHit> DBBHitsArray;
34
DBBSpillData(const DBBSpillData& dbbspill);
36
DBBSpillData& operator=(const DBBSpillData& dbbspill);
38
virtual ~DBBSpillData();
44
void SetLdcId(int id);
50
void SetDBBId(int id);
52
/** Returns Spill Number */
53
int GetSpillNumber() const;
55
/** Sets Spill Number */
56
void SetSpillNumber(int n);
58
/** Returns Spill Width */
59
int GetSpillWidth() const;
61
/** Sets Spill Width */
62
void SetSpillWidth(int w);
64
/** Returns Trigger Count */
65
int GetTriggerCount() const;
67
/** Sets Trigger Count */
68
void SetTriggerCount(int tc);
70
/** Returns Hit Count */
71
int GetHitCount() const;
74
void SetHitCount(int hc);
76
/** Returns TimeStamp */
77
int GetTimeStamp() const;
80
void SetTimeStamp(int time_stamp);
82
/** Returns Detector */
83
std::string GetDetector() const;
86
void SetDetector(std::string detector);
88
/** Returns DBB Hit Array */
89
DBBHitsArray GetDBBHitsArray() const;
91
/** Get an element from DBB Hit Array (needed for PyROOT) */
92
DBBHit GetDBBHitsArrayElement(size_t index) const;
94
/** Get size of EMRHitsArray (needed for PyROOT) */
95
size_t GetDBBHitsArraySize() const;
97
/** Sets DBB Hit Array */
98
void SetDBBHitsArray(DBBHitsArray ha);
102
/** Returns DBB Trigger Array */
103
DBBHitsArray GetDBBTriggersArray() const;
105
/** Get an element from DBB Hit Array (needed for PyROOT) */
106
DBBHit GetDBBTriggersArrayElement(size_t index) const;
108
/** Get size of EMRDaqArray (needed for PyROOT) */
109
size_t GetDBBTriggersArraySize() const;
111
/** Sets DBB Hit Array */
112
void SetDBBTriggersArray(DBBHitsArray ta);
115
std::cout << "*** Spill DBB" << _dbbId << " ***\n sn: " << _spill_number
116
<< "\n sw: " << _spill_width
117
<< "\n tc: " << _trigger_count << "\n hc: "
118
<< _hit_count << "\n hits: " << _dbb_hits.size()
119
<< "\n triggers: " << _dbb_triggers.size() << std::endl;
131
std::string _detector;
133
DBBHitsArray _dbb_hits;
134
DBBHitsArray _dbb_triggers;
136
MAUS_VERSIONED_CLASS_DEF(DBBSpillData)