1 #ifndef __JACOUSTICS__JEVENT__
2 #define __JACOUSTICS__JEVENT__
24 namespace JACOUSTICS {}
25 namespace JPP {
using namespace JACOUSTICS; }
27 namespace JACOUSTICS {
57 return event.begin()->getToE();
96 for (
T i = __begin; i != __end; ++i) {
100 sort(this->begin(), this->end());
166 const_iterator __hit1 =
this ->begin();
167 const_iterator __end1 =
this ->end();
169 const_iterator __hit2 =
event.begin();
170 const_iterator __end2 =
event.end();
172 buffer.resize(this->size() + event.size());
176 while (__hit1 != __end1 && __hit2 != __end2) {
178 if (*__hit1 < *__hit2) {
183 }
else if (*__hit2 < *__hit1) {
201 out =
copy(__hit1, __end1, out);
202 out =
copy(__hit2, __end2, out);
204 buffer.resize(
distance(buffer.begin(), out));
223 out <<
event.getOID() << endl;
224 out << setw(8) <<
event.getCounter() << endl;
225 out << setw(2) <<
event.getOverlays() << endl;
226 out << setw(3) <<
event.getID() << endl;
228 for (const_iterator i = event.begin(); i !=
event.end(); ++i) {
230 out << setw(10) << i->getID() <<
' '
231 << setw(10) << i->getRunNumber() <<
' '
232 << fixed << setw(12) << setprecision(6) << i->getToA() <<
' '
233 << fixed << setw(12) << setprecision(6) << i->getToE() <<
' '
234 << fixed << setw(8) << setprecision(0) << i->getQ() << endl;
261 if (!first.empty() && !second.empty())
262 return first.begin()->getToE() < second.begin()->getToE();
int getOverlays() const
Get overlays.
void merge(const JEvent &event)
Merge event.
JEvaluator()
Default constructor.
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
bool operator<(const Head &first, const Head &second)
Less than operator.
JEvent()
Default constructor.
friend std::ostream & operator<<(std::ostream &out, const JEvent &event)
Write event to output stream.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
const std::string & getOID() const
Get detector identifier.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
virtual ~JEvent()
Virtual destructor.
int getCounter() const
Get counter.
void copy(const Head &from, JHead &to)
Copy header from from to to.
JEvent(const std::string &oid, const int counter, const int id, T __begin, T __end)
Constructor.
int getID() const
Get identifier.
Auxiliary class to determine value of acoustic events.
double operator()(const JEvent &event) const
Get value of object.