Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JSuperFrameClone2D.hh
Go to the documentation of this file.
1 #ifndef __JTRIGGER__JSUPERFRAMECLONE2D__
2 #define __JTRIGGER__JSUPERFRAMECLONE2D__
3 
4 #include <vector>
5 
10 #include "JLang/JClass.hh"
11 
12 
13 /**
14  * \author mdejong
15  */
16 
17 namespace JTRIGGER {}
18 namespace JPP { using namespace JTRIGGER; }
19 
20 namespace JTRIGGER {
21 
22  /**
23  * Clone of JSuperFrame2D.
24  */
25  template<class JElement_t>
27  public JModuleHeader,
28  public std::vector< JFrameClone<JElement_t> >,
29  public JHitToolkit<JElement_t>
30  {
31  public:
32 
39 
40 
41  /**
42  * Default constructor.
43  */
45  JModuleHeader(),
46  std::vector< JFrameClone<JElement_t> >()
47  {}
48 
49 
50  /**
51  * Constructor.
52  *
53  * \param input 2-dimensional super frame
54  */
57  std::vector< JFrameClone<JElement_t> >()
58  {
59  for (typename JSuperFrame2D<JElement_t>::const_iterator i = input.begin(); i != input.end(); ++i) {
60  this->push_back(JFrameClone<JElement_t>(*i));
61  }
62  }
63 
64 
65  /**
66  * Rewind internal iterators.
67  */
68  inline void rewind() const
69  {
70  for (const_iterator i = this->begin(); i != this->end(); ++i) {
71  i->rewind();
72  }
73  }
74 
75 
76  /**
77  * Set the internal iterators to the lower bounds corresponding to the time of the given hit.
78  *
79  * \param hit hit
80  */
81  void lower_bound(argument_type hit) const
82  {
83  for (const_iterator i = this->begin(); i != this->end(); ++i) {
84  i->lower_bound(hit);
85  }
86  }
87 
88 
89  /**
90  * Increment the internal iterators until the lower bounds corresponding to the time of the given hit.
91  *
92  * \param hit hit
93  */
94  void fast_forward(argument_type hit) const
95  {
96  for (const_iterator i = this->begin(); i != this->end(); ++i) {
97  i->fast_forward(hit);
98  }
99  }
100  };
101 }
102 
103 #endif
JLANG::JClass< JElement_t >::argument_type argument_type
std::vector< value_type >::const_iterator const_iterator
void lower_bound(argument_type hit) const
Set the internal iterators to the lower bounds corresponding to the time of the given hit...
Clone of JSuperFrame2D.
std::vector< value_type >::reverse_iterator reverse_iterator
Tools for handling different hit types.
JSuperFrameClone2D()
Default constructor.
JArgument< T >::argument_type argument_type
Definition: JClass.hh:82
std::vector< value_type >::const_reverse_iterator const_reverse_iterator
Clone of JFrame.
Definition: JFrameClone.hh:22
std::vector< value_type >::iterator iterator
const JModuleHeader & getModuleHeader() const
Get module header.
JFrameClone< JElement_t > value_type
Header for Module.
JSuperFrameClone2D(const JSuperFrame2D< JElement_t > &input)
Constructor.
void fast_forward(argument_type hit) const
Increment the internal iterators until the lower bounds corresponding to the time of the given hit...
void rewind() const
Rewind internal iterators.
Template definition of hit toolkit.
Definition: JHitToolkit.hh:60