Acoustic event.  
 More...
#include <JEvent.hh>
Acoustic event. 
Definition at line 34 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 86 of file JAcoustics/JEvent.hh.
   98       for (
T i = __begin; i != __end; ++i) {
 
  102       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::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. 
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. 
 
 
 
 
  
  
      
        
          | void JACOUSTICS::JEvent::remove  | 
          ( | 
          const size_t  | 
          ns,  | 
         
        
           | 
           | 
          const double  | 
          stdev  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Remove outliers. 
First, the transmissions are sorted according to their time-of-emission. The mean and standard deviation of the times of emission is then determined, excluding the first and last possible number of outliers from either side. From the excluded transmissions, the ones with a time-of-emission less than the given number of standard deviations away from the mean are retained.
- Parameters
 - 
  
    | ns | number of outliers  | 
    | stdev | number of standard deviations  | 
  
   
Definition at line 229 of file JAcoustics/JEvent.hh.
  234       if (ns > 0 && 2*ns < this->size()) {
 
  236         sort(this->begin(), this->end());
 
  239         reverse_iterator q = this->rbegin();
 
  246         for (const_iterator i = p; i != q.base(); ++i) {
 
  250         const double t1 = Q.getMean()  -  
stdev * Q.getSTDev();
 
  251         const double t2 = Q.getMean()  +  
stdev * Q.getSTDev();
 
  253         for (
size_t i = ns; i != 0 && p->getToE() >= t1; --i, --p) {}
 
  254         for (
size_t i = ns; i != 0 && q->getToE() <= t2; --i, --q) {}
 
Q(UTCMax_s-UTCMin_s)-livetime_s
 
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter. 
 
 
 
 
      
        
          | JACOUSTICS::JEvent::ClassDef  | 
          ( | 
          JEvent  | 
          ,  | 
        
        
           | 
           | 
          2  | 
            | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
  
  
      
        
          | 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 270 of file JAcoustics/JEvent.hh.
  274       out << 
event.getOID()                 << endl;
 
  275       out << setw(8) << 
event.getCounter()  << endl;
 
  276       out << setw(2) << 
event.getOverlays() << endl;
 
  277       out << setw(3) << 
event.getID()       << endl;
 
  279       for (const_iterator i = event.begin(); i != 
event.end(); ++i) {
 
  281         out << setw(10) << i->getID()        << 
' '  
  282             << setw(10) << i->getRunNumber() << 
' '  
  283             << fixed << setw(12) << setprecision(6) << i->getToA()  << 
' ' 
  284             << fixed << setw(12) << setprecision(6) << i->getToE()  << 
' ' 
  285             << fixed << setw(8)  << setprecision(0) << i->getQ()    << endl;
 
 
 
 
  
  
      
        
          | std::string JACOUSTICS::JEvent::oid | 
         
       
   | 
  
protected   | 
  
 
 
  
  
      
        
          | 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: