Acoustic event.  
 More...
#include <JEvent.hh>
 | 
| template<class T >  | 
| static void  | overlap (T p, T q, const double Tmax_s) | 
|   | Empty overlapping events.  More...
  | 
|   | 
Acoustic event. 
Definition at line 38 of file JAcoustics/JEvent.hh.
 
  
  
      
        
          | JACOUSTICS::JEvent::JEvent  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
template<class T > 
  
  
      
        
          | JACOUSTICS::JEvent::JEvent  | 
          ( | 
          const std::string &  | 
          oid,  | 
         
        
           | 
           | 
          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
 - 
  
    | oid | detector identifier  | 
    | counter | counter  | 
    | id | identifier  | 
    | __begin | begin of data  | 
    | __end | end of data  | 
  
   
Definition at line 91 of file JAcoustics/JEvent.hh.
  103       for (
T i = __begin; i != __end; ++i) {
 
  107       sort(this->begin(), this->end());
 
JCounter()
Default constructor. 
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
 
 
 
  
  
      
        
          | virtual JACOUSTICS::JEvent::~JEvent  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
  
  
      
        
          | const std::string& JACOUSTICS::JEvent::getOID  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | int JACOUSTICS::JEvent::getOverlays  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | int JACOUSTICS::JEvent::getID  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | void JACOUSTICS::JEvent::merge  | 
          ( | 
          const JEvent &  | 
          event | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Merge event. 
It is assumed that the transmissions in both events are ordered according the default less-than operator.
- Parameters
 - 
  
  
 
Definition at line 159 of file JAcoustics/JEvent.hh.
  165       const_iterator __hit1 = 
this ->begin();
 
  166       const_iterator __end1 = 
this ->end();
 
  168       const_iterator __hit2 = 
event.begin();
 
  169       const_iterator __end2 = 
event.end();
 
  171       buffer.resize(this->size() + event.size());
 
  175       while (__hit1 != __end1 && __hit2 != __end2) {
 
  177         if        (*__hit1 < *__hit2) {
 
  182         } 
else if (*__hit2 < *__hit1) {
 
  200       out = 
copy(__hit1, __end1, out);
 
  201       out = 
copy(__hit2, __end2, out);
 
  203       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. 
 
friend void swap(JEvent &first, JEvent &second)
Swap events. 
 
void copy(const Head &from, JHead &to)
Copy header from from to to. 
 
 
 
 
template<class T > 
  
  
      
        
          | static void JACOUSTICS::JEvent::overlap  | 
          ( | 
          T  | 
          p,  | 
         
        
           | 
           | 
          T  | 
          q,  | 
         
        
           | 
           | 
          const double  | 
          Tmax_s  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Empty overlapping events. 
The events should be time sorted on input.
The time window applies to the difference between the first transmission of an event and the last transmission of the previous event.
- Parameters
 - 
  
    | p | begin of events  | 
    | q | end of events  | 
    | Tmax_s | time window [s]  | 
  
   
Definition at line 241 of file JAcoustics/JEvent.hh.
  243       for (
T __q = p, __p = __q++; __p != q && __q != q; __p = __q++) {
 
  247             __q->begin()->getToE() < __p->rbegin()->getToE() + Tmax_s) {
 
  251           for (__p = __q++; __p != q && __q != q; __p = __q++) {
 
  253             if (__q->begin()->getToE() < __p->rbegin()->getToE() + Tmax_s)
 
do set_variable OUTPUT_DIRECTORY $WORKDIR T
 
 
 
 
Read from input. 
- Parameters
 - 
  
  
 
- Returns
 - reader 
 
Implements JIO::JSerialisable.
Definition at line 320 of file JAcoustics/JEvent.hh.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
 
 
 
 
Write to output. 
- Parameters
 - 
  
  
 
- Returns
 - writer 
 
Implements JIO::JSerialisable.
Definition at line 338 of file JAcoustics/JEvent.hh.
  340       out << static_cast<const JCounter&>(*this);
 
  344       out << static_cast<const std::vector<JTransmission>&>(*this);
 
 
 
 
      
        
          | JACOUSTICS::JEvent::ClassDefOverride  | 
          ( | 
          JEvent  | 
          ,  | 
        
        
           | 
           | 
          3  | 
            | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
  
  
      
        
          | int JACOUSTICS::JCounter::getCounter  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
 
  
  
      
        
          | JACOUSTICS::JCounter::ClassDefNV  | 
          ( | 
          JCounter  | 
          ,  | 
         
        
           | 
           | 
          1  | 
            | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inherited   | 
  
 
 
Swap events. 
- Parameters
 - 
  
    | first | first event  | 
    | second | second event  | 
  
   
Definition at line 217 of file JAcoustics/JEvent.hh.
  220       std::swap(first.
oid,      second.
oid);
 
  222       std::swap(first.
id,       second.
id);
 
friend void swap(JEvent &first, JEvent &second)
Swap events. 
 
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
 
 
 
 
  
  
      
        
          | bool operator<  | 
          ( | 
          const JEvent &  | 
          first,  | 
         
        
           | 
           | 
          const JEvent &  | 
          second  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
friend   | 
  
 
Less than operator for acoustics events. 
The less than operator is applied to the first hit in the events.
If there are no hits in either event, the counter of the events is used.
- Parameters
 - 
  
    | first | first event  | 
    | second | second event  | 
  
   
- Returns
 - true if first event earliear than second; else false 
 
Definition at line 275 of file JAcoustics/JEvent.hh.
  277       if (!first.empty() && !second.empty())
 
  278         return first.begin()->getToE() < second.begin()->getToE();
 
int getCounter() const 
Get counter. 
 
 
 
 
  
  
      
        
          | 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 291 of file JAcoustics/JEvent.hh.
  295       out << 
event.getOID()                 << endl;
 
  296       out << setw(8) << 
event.getCounter()  << endl;
 
  297       out << setw(2) << 
event.getOverlays() << endl;
 
  298       out << setw(3) << 
event.getID()       << endl;
 
  300       for (const_iterator i = event.begin(); i != 
event.end(); ++i) {
 
  302         out << setw(10) << i->getID()        << 
' '  
  303             << setw(10) << i->getRunNumber() << 
' '  
  304             << fixed << setw(12) << setprecision(6) << i->getToA()  << 
' ' 
  305             << fixed << setw(12) << setprecision(6) << i->getToE()  << 
' ' 
  306             << fixed << setw(8)  << setprecision(0) << i->getQ()    << 
' ' 
  307             << fixed << setw(8)  << setprecision(0) << i->getW()    << endl;
 
 
 
 
  
  
      
        
          | int JACOUSTICS::JEvent::overlays | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | int JACOUSTICS::JEvent::id | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | int JACOUSTICS::JCounter::counter | 
         
       
   | 
  
protectedinherited   | 
  
 
 
The documentation for this struct was generated from the following file: