Jpp 20.0.0-27-g39925593c-D
the software that should make you happy
Loading...
Searching...
No Matches
JTimesliceClone.hh
Go to the documentation of this file.
1#ifndef __JTRIGGER__JTIMESLICECLONE__
2#define __JTRIGGER__JTIMESLICECLONE__
3
4#include <vector>
5
9#include "JLang/JClass.hh"
13
14
15/**
16 * \author mdejong
17 */
18
19namespace JTRIGGER {}
20namespace JPP { using namespace JTRIGGER; }
21
22namespace 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 */
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
Tools for handling different hit types.
Direct access to module in detector data structure.
Router for direct addressing of module data in detector data structure.
const JModuleAddress & getAddress(const JObjectID &id) const
Get address of module.
const JClass_t & getReference() const
Get reference to object.
Definition JReference.hh:38
Template definition of a multi-dimensional oscillation probability interpolation table.
Clone of JTimeslice.
JLANG::JClass< JElement_t >::argument_type argument_type
std::vector< value_type >::reverse_iterator reverse_iterator
JSuperFrameClone1D< JElement_t > value_type
JTimesliceClone< JElement_t > & rotate(const JRotation3D &R)
Rotate.
JTimesliceClone< JElement_t > & transform(const JMatrix3D &R)
Transform.
JTimesliceClone()
Default constructor.
std::vector< value_type >::const_iterator const_iterator
std::vector< value_type >::iterator iterator
JTimesliceClone(const JTimeslice< JElement_t > &input, const JModuleRouter &router)
Constructor.
JTimesliceClone< JElement_t > & rotate_back(const JRotation3D &R)
Rotate back.
std::vector< value_type >::const_reverse_iterator const_reverse_iterator
JTimesliceClone(const JTimeslice< JElement_t > &input)
Constructor.
std::vector< value_type >::const_iterator const_iterator
Definition JTimeslice.hh:34
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary classes and methods for triggering.
JArgument< T >::argument_type argument_type
Definition JClass.hh:82
Template definition of hit toolkit.