Acoustic event.
More...
#include <JEvent.hh>
Acoustic event.
Definition at line 30 of file JAcoustics/JEvent.hh.
JACOUSTICS::JEvent::JEvent |
( |
| ) |
|
|
inline |
template<class T >
JACOUSTICS::JEvent::JEvent |
( |
const int |
counter, |
|
|
const int |
id, |
|
|
T |
__begin, |
|
|
T |
__end |
|
) |
| |
|
inline |
Constructor.
The transmissions will be sorted to ensure proper functioning of method JEvent::merge and class JEventOverlap.
- Parameters
-
counter | counter |
id | identifier |
__begin | begin of data |
__end | end of data |
Definition at line 56 of file JAcoustics/JEvent.hh.
66 for (
T i = __begin; i != __end; ++i) {
70 sort(this->begin(), this->end());
JCounter()
Default constructor.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
virtual JACOUSTICS::JEvent::~JEvent |
( |
| ) |
|
|
inlinevirtual |
int JACOUSTICS::JEvent::getCounter |
( |
| ) |
const |
|
inline |
int JACOUSTICS::JEvent::getOverlays |
( |
| ) |
const |
|
inline |
int JACOUSTICS::JEvent::getID |
( |
| ) |
const |
|
inline |
void JACOUSTICS::JEvent::merge |
( |
const JEvent & |
event | ) |
|
|
inline |
Merge event.
- Parameters
-
Definition at line 119 of file JAcoustics/JEvent.hh.
125 const_iterator __hit1 =
this ->begin();
126 const_iterator __end1 =
this ->end();
128 const_iterator __hit2 =
event.begin();
129 const_iterator __end2 =
event.end();
131 buffer.resize(this->size() + event.size());
135 while (__hit1 != __end1 && __hit2 != __end2) {
137 if (*__hit1 < *__hit2) {
142 }
else if (*__hit2 < *__hit1) {
160 out =
copy(__hit1, __end1, out);
161 out =
copy(__hit2, __end2, out);
163 buffer.resize(
distance(buffer.begin(), out));
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
void copy(const Head &from, JHead &to)
Copy header from from to to.
JACOUSTICS::JEvent::ClassDef |
( |
JEvent |
, |
|
|
1 |
|
|
) |
| |
JACOUSTICS::JCounter::ClassDefNV |
( |
JCounter |
, |
|
|
1 |
|
|
) |
| |
|
inherited |
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const JEvent & |
event |
|
) |
| |
|
friend |
Write event to output stream.
- Parameters
-
out | output stream |
event | event |
- Returns
- output stream
Definition at line 178 of file JAcoustics/JEvent.hh.
182 out << setw(8) <<
event.getCounter() << endl;
183 out << setw(2) <<
event.getOverlays() << endl;
184 out << setw(3) <<
event.getID() << endl;
186 for (const_iterator i = event.begin(); i !=
event.end(); ++i) {
188 out << setw(10) << i->getID() <<
' '
189 << fixed << setw(9) << setprecision(3) << i->getToA() <<
' '
190 << fixed << setw(9) << setprecision(3) << i->getToE() <<
' '
191 << fixed << setw(6) << setprecision(0) << i->getQ() << endl;
int JACOUSTICS::JEvent::counter |
|
protected |
int JACOUSTICS::JEvent::overlays |
|
protected |
int JACOUSTICS::JEvent::id |
|
protected |
The documentation for this struct was generated from the following file: