Jpp  18.0.0-rc.2
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<>
29  getModel(static_cast<const JEvt&>(evt))
30  {
31  for (JSuperEvt::tx_type::const_iterator i = evt.tx.begin(); i != evt.tx.end(); ++i) {
32  this->emission[JEKey(i->id,i->counter)] = JMODEL::JEmission(i->toe);
33  }
34  }
35 
36 
37  /**
38  * Auxiliary data structure to convert model to super event.
39  */
40  struct getSuperEvt :
41  public JSuperEvt
42  {
43  /**
44  * Constructor.
45  *
46  * \param header header
47  * \param model model
48  * \param begin begin of hit data
49  * \param end end of hit data
50  */
51  template<class T>
52  getSuperEvt(const JHead& header,
53  const JModel& model,
54  T begin,
55  T end) :
56  JSuperEvt(getEvt(header, model))
57  {
58  for (JModel::emission_type::const_iterator i = model.emission.begin(); i != model.emission.end(); ++i) {
59  this->tx.push_back(JSuperEvt::tx_t(i->first.getID(), i->first.getCounter(), i->second.t1));
60  }
61 
62  for (T i = begin; i != end; ++i) {
63  this->rx.push_back(JSuperEvt::rx_t(i->getID(), i->getCounter(), i->getString(), i->getFloor(), i->getValue(), i->getWeight()));
64  }
65  }
66  };
67 }
68 
69 #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.