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.
 
◆ JEvent() [1/2]
  
  
      
        
          | JACOUSTICS::JEvent::JEvent  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JEvent() [2/2]
template<class T > 
  
  
      
        
          | JACOUSTICS::JEvent::JEvent  | 
          ( | 
          const int  | 
          detid,  | 
         
        
           | 
           | 
          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
 - 
  
    | detid | detector identifier  | 
    | counter | counter  | 
    | id | identifier  | 
    | __begin | begin of data  | 
    | __end | end of data  | 
  
   
Definition at line 97 of file JAcoustics/JEvent.hh.
  109       for (T i = __begin; i != __end; ++i) {
 
  113       sort(this->begin(), this->end());
 
 
 
 
◆ ~JEvent()
  
  
      
        
          | virtual JACOUSTICS::JEvent::~JEvent  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
◆ getDetectorID()
  
  
      
        
          | const int JACOUSTICS::JEvent::getDetectorID  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getOverlays()
  
  
      
        
          | int JACOUSTICS::JEvent::getOverlays  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ getID()
  
  
      
        
          | int JACOUSTICS::JEvent::getID  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inline   | 
  
 
 
◆ merge()
  
  
      
        
          | 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 165 of file JAcoustics/JEvent.hh.
  171       const_iterator __hit1 = 
this ->begin();
 
  172       const_iterator __end1 = 
this ->end();
 
  174       const_iterator __hit2 = 
event.begin();
 
  175       const_iterator __end2 = 
event.end();
 
  177       buffer.resize(this->size() + event.size());
 
  181       while (__hit1 != __end1 && __hit2 != __end2) {
 
  183         if        (*__hit1 < *__hit2) {
 
  188         } 
else if (*__hit2 < *__hit1) {
 
  206       out = 
copy(__hit1, __end1, out);
 
  207       out = 
copy(__hit2, __end2, out);
 
  209       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.
 
friend void swap(JEvent &first, JEvent &second)
Swap events.
 
 
 
 
◆ overlap()
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 247 of file JAcoustics/JEvent.hh.
  249       for (T __q = p, __p = __q++; __p != q && __q != q; __p = __q++) {
 
  253             __q->begin()->getToE() < __p->rbegin()->getToE() + Tmax_s) {
 
  257           for (__p = __q++; __p != q && __q != q; __p = __q++) {
 
  259             if (__q->begin()->getToE() < __p->rbegin()->getToE() + Tmax_s)
 
 
 
 
◆ read()
◆ write()
Write to output. 
- Parameters
 - 
  
  
 
- Returns
 - writer 
 
Implements JIO::JSerialisable.
Definition at line 344 of file JAcoustics/JEvent.hh.
  346       out << static_cast<const JCounter&>(*
this);
 
  350       out << static_cast<const std::vector<JTransmission>&>(*this);
 
 
 
 
◆ ClassDefOverride()
      
        
          | JACOUSTICS::JEvent::ClassDefOverride  | 
          ( | 
          JEvent  | 
          ,  | 
        
        
           | 
           | 
          4  | 
            | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ getCounter()
  
  
      
        
          | int JACOUSTICS::JCounter::getCounter  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlineinherited   | 
  
 
 
◆ ClassDefNV()
  
  
      
        
          | JACOUSTICS::JCounter::ClassDefNV  | 
          ( | 
          JCounter  | 
          ,  | 
         
        
           | 
           | 
          1  | 
            | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inherited   | 
  
 
 
◆ swap
Swap events. 
- Parameters
 - 
  
    | first | first event  | 
    | second | second event  | 
  
   
Definition at line 223 of file JAcoustics/JEvent.hh.
  228       std::swap(first.
id,       second.
id);
 
 
 
 
◆ operator<
  
  
      
        
          | 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 281 of file JAcoustics/JEvent.hh.
  283       if (!first.empty() && !second.empty())
 
  284         return first.begin()->getToE() < second.begin()->getToE();
 
int getCounter() const
Get counter.
 
 
 
 
◆ operator<<
  
  
      
        
          | 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 297 of file JAcoustics/JEvent.hh.
  301       out << 
event.getDetectorID()          << endl;
 
  302       out << setw(8) << 
event.getCounter()  << endl;
 
  303       out << setw(2) << 
event.getOverlays() << endl;
 
  304       out << setw(3) << 
event.getID()       << endl;
 
  306       for (const_iterator i = event.begin(); i != event.end(); ++i) {
 
  308         out << setw(10) << i->getID()        << 
' '  
  309             << setw(10) << i->getRunNumber() << 
' '  
  310             << fixed << setw(12) << setprecision(6) << i->getToA()  << 
' ' 
  311             << fixed << setw(12) << setprecision(6) << i->getToE()  << 
' ' 
  312             << fixed << setw(8)  << setprecision(0) << i->getQ()    << 
' ' 
  313             << fixed << setw(8)  << setprecision(0) << i->getW()    << endl;
 
 
 
 
◆ detid
  
  
      
        
          | int JACOUSTICS::JEvent::detid | 
         
       
   | 
  
protected   | 
  
 
 
◆ overlays
  
  
      
        
          | int JACOUSTICS::JEvent::overlays | 
         
       
   | 
  
protected   | 
  
 
 
◆ id
  
  
      
        
          | int JACOUSTICS::JEvent::id | 
         
       
   | 
  
protected   | 
  
 
 
◆ counter
  
  
      
        
          | int JACOUSTICS::JCounter::counter | 
         
       
   | 
  
protectedinherited   | 
  
 
 
The documentation for this struct was generated from the following file: