Jpp  18.5.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JSuperEvtToolkit.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JSUPEREVTTOOLKIT__
2 #define __JACOUSTICS__JSUPEREVTTOOLKIT__
3 
4 #include "JAcoustics/JModel.hh"
5 #include "JAcoustics/JEvt.hh"
8 
9 
10 /**
11  * \file
12  *
13  * Acoustic super event fit toolkit.
14  * \author mdejong
15  */
16 namespace JACOUSTICS {}
17 namespace JPP { using namespace JACOUSTICS; }
18 
19 namespace JACOUSTICS {
20 
21 
22  /**
23  * Get model of detector.
24  *
25  * \param evt super event
26  */
27  template<>
28  inline
30  getModel(static_cast<const JEvt&>(evt))
31  {
32  for (JSuperEvt::tx_type::const_iterator i = evt.tx.begin(); i != evt.tx.end(); ++i) {
33  this->emission[JEKey(i->id,i->counter)] = JMODEL::JEmission(i->toe);
34  }
35  }
36 
37 
38  /**
39  * Auxiliary data structure to convert model to super event.
40  */
41  struct getSuperEvt :
42  public JSuperEvt
43  {
44  /**
45  * Constructor.
46  *
47  * \param header header
48  * \param model model
49  * \param begin begin of hit data
50  * \param end end of hit data
51  */
52  template<class T>
53  getSuperEvt(const JHead& header,
54  const JModel& model,
55  T begin,
56  T end) :
57  JSuperEvt(getEvt(header, model))
58  {
59  for (JModel::emission_type::const_iterator i = model.emission.begin(); i != model.emission.end(); ++i) {
60  this->tx.push_back(JSuperEvt::tx_t(i->first.getID(), i->first.getCounter(), i->second.t1));
61  }
62 
63  for (T i = begin; i != end; ++i) {
64  this->rx.push_back(JSuperEvt::rx_t(i->getID(), i->getCounter(), i->getString(), i->getFloor(), i->getValue(), i->getWeight()));
65  }
66  }
67  };
68 }
69 
70 #endif
Acoustics transmission.
Definition: JSuperEvt.hh:118
getModel(const T &object)
Constructor.
Model for fit to acoustics data.
Acoustic event fit toolkit.
Auxiliary data structure to convert model to event.
Acoustic event header.
Acoustic event fit.
Acoustic event fit.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
JACOUSTICS::JModel::emission_type emission
Acoustic super event fit.
Definition: JSuperEvt.hh:36
Emitter key.
Definition: JEKey.hh:32
Acoustics emission.
Definition: JSuperEvt.hh:61
container_type::const_iterator const_iterator
Definition: JHashMap.hh:86
Auxiliary data structure to convert event to model.
Model for fit to acoutsics data.
Acoustic event fit.
Auxiliary data structure to convert model to super event.
getSuperEvt(const JHead &header, const JModel &model, T begin, T end)
Constructor.