Jpp  15.0.3
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JTimesliceClone.hh
Go to the documentation of this file.
1 #ifndef __JTRIGGER__JTIMESLICECLONE__
2 #define __JTRIGGER__JTIMESLICECLONE__
3 
4 #include <vector>
5 
7 #include "JTrigger/JTimeslice.hh"
9 #include "JLang/JClass.hh"
10 #include "JGeometry3D/JMatrix3D.hh"
13 
14 
15 /**
16  * \author mdejong
17  */
18 
19 namespace JTRIGGER {}
20 namespace JPP { using namespace JTRIGGER; }
21 
22 namespace JTRIGGER {
23 
27 
28 
29  /**
30  * Clone of JTimeslice.
31  */
32  template<class JElement_t>
34  public std::vector< JSuperFrameClone1D<JElement_t> >,
35  public JHitToolkit<JElement_t>
36  {
37  public:
38 
45 
46 
47  /**
48  * Default constructor.
49  */
51  {}
52 
53 
54  /**
55  * Constructor.
56  *
57  * The cloned data are organised according the input time slice.
58  *
59  * \param input super frame
60  */
62  {
63  for (typename JTimeslice<JElement_t>::const_iterator i = input.begin(); i != input.end(); ++i) {
64  this->push_back(JSuperFrameClone1D<JElement_t>(*i));
65  }
66  }
67 
68 
69  /**
70  * Constructor.
71  *
72  * The cloned data are organised according the module router.
73  *
74  * \param input super frame
75  * \param router module router
76  */
78  const JModuleRouter& router)
79  {
80  this->resize(router.getReference().size());
81 
82  for (typename JTimeslice<JElement_t>::const_iterator i = input.begin(); i != input.end(); ++i) {
83  (*this)[router.getAddress(i->getModuleID()).first] = JSuperFrameClone1D<JElement_t>(*i);
84  }
85  }
86 
87 
88  /**
89  * Transform.
90  *
91  * \param R matrix
92  */
94  {
95  for (iterator i = this->begin(); i != this->end(); ++i) {
96  i->transform(R);
97  }
98 
99  return *this;
100  }
101 
102 
103  /**
104  * Rotate.
105  *
106  * \param R rotation matrix
107  */
109  {
110  for (iterator i = this->begin(); i != this->end(); ++i) {
111  i->rotate(R);
112  }
113 
114  return *this;
115  }
116 
117 
118  /**
119  * Rotate back.
120  *
121  * \param R rotation matrix
122  */
124  {
125  for (iterator i = this->begin(); i != this->end(); ++i) {
126  i->rotate_back(R);
127  }
128 
129  return *this;
130  }
131  };
132 }
133 
134 #endif
std::vector< value_type >::const_iterator const_iterator
Definition: JTimeslice.hh:34
std::vector< value_type >::reverse_iterator reverse_iterator
JTimesliceClone< JElement_t > & transform(const JMatrix3D &R)
Transform.
JLANG::JClass< JElement_t >::argument_type argument_type
std::vector< value_type >::const_reverse_iterator const_reverse_iterator
3 x 3 matrix
Router for direct addressing of module data in detector data structure.
Rotation matrix.
Definition: JRotation3D.hh:111
JTimesliceClone< JElement_t > & rotate(const JRotation3D &R)
Rotate.
Tools for handling different hit types.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
JTimesliceClone(const JTimeslice< JElement_t > &input)
Constructor.
JArgument< T >::argument_type argument_type
Definition: JClass.hh:82
std::vector< value_type >::iterator iterator
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:43
Direct access to module in detector data structure.
std::vector< value_type >::const_iterator const_iterator
JTimesliceClone()
Default constructor.
const JClass_t & getReference() const
Get reference to object.
Definition: JReference.hh:38
Clone of JTimeslice.
const JModuleAddress & getAddress(const JObjectID &id) const
Get address of module.
JSuperFrameClone1D< JElement_t > value_type
Template definition of hit toolkit.
Definition: JHitToolkit.hh:60
JTimesliceClone(const JTimeslice< JElement_t > &input, const JModuleRouter &router)
Constructor.
Clone of JSuperFrame1D.
JTimesliceClone< JElement_t > & rotate_back(const JRotation3D &R)
Rotate back.
Time slice with calibrated data.
Definition: JTimeslice.hh:26