Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
JTRIGGER::JTimesliceRouter Class Reference

Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the optical module identifier and time. More...

#include <JTimesliceRouter.hh>

Inheritance diagram for JTRIGGER::JTimesliceRouter:
JLANG::JPointer< JClass_t > JLANG::JAbstractPointer< JClass_t > JLANG::JEquals< JAbstractPointer< JClass_t > >

Classes

struct  JPair_t
 Auxiliary structure for indexing hits in a data frame. More...
 

Public Types

typedef JTOOLS::JElement2D
< double, JPair_t
element_type
 
typedef
JTOOLS::JGridCollection
< element_type
grid_type
 
typedef JTOOLS::JRouter< int > router_type
 
typedef
JDAQTimeslice::const_iterator 
const_iterator
 

Public Member Functions

 JTimesliceRouter (const int numberOfBins)
 Constructor. More...
 
 JTimesliceRouter (const JDAQTimeslice &timeslice, const int numberOfBins)
 Constructor. More...
 
void configure (const JDAQTimeslice &timeslice)
 Configure. More...
 
const int getAddress (const JDAQModuleIdentifier &module) const
 Get address of module. More...
 
bool hasSuperFrame (const JDAQModuleIdentifier &module) const
 Check presence of module. More...
 
const JDAQSuperFramegetSuperFrame (const JDAQModuleIdentifier &module) const
 Get super frame. More...
 
JDAQFrameSubset getFrameSubset (const JDAQModuleIdentifier &module, const JTimeRange &timeRange) const
 Get subset of frame given module identifier and range of hit times. More...
 
virtual JClass_t * get () const override
 Get pointer. More...
 
virtual void set (JClass_t *p) override
 Set pointer. More...
 
template<class T >
void set (const JPointer< T > &pointer)
 Set pointer. More...
 
virtual void reset () override
 Reset pointer. More...
 
template<class T >
void reset (const JPointer< T > &pointer)
 Reset pointer. More...
 
void reset (JClass_t *p)
 Reset pointer. More...
 
JClass_t *const & getReference () const
 Get rereference to internal pointer. More...
 
JClass_t *& getReference ()
 Get rereference to internal pointer. More...
 
virtual bool equals (const JAbstractPointer &object) const
 Equals. More...
 
bool is_valid () const
 Check validity of pointer. More...
 
JClass_t * operator-> () const
 Smart pointer operator. More...
 
 operator JClass_t * () const
 Type conversion operator. More...
 

Protected Attributes

JClass_t * __p
 pointer to object More...
 

Private Attributes

int number_of_bins
 
router_type router
 
std::vector< grid_typetable
 

Detailed Description

Router for fast addressing of hits in KM3NETDAQ::JDAQTimeslice data structure as a function of the optical module identifier and time.

Note that the data in a frame from the same PMT are time ordered but the data from different PMTs are not necessarily time orderd.
The fast routing is based on the assumption that the time difference between consecutive hits in the same frame is limited.
The access speed is then determined by this time difference.

The time slice router class comprises two internal look-up tables:

Definition at line 63 of file JTimesliceRouter.hh.

Member Typedef Documentation

Definition at line 76 of file JTimesliceRouter.hh.

Definition at line 77 of file JTimesliceRouter.hh.

Definition at line 78 of file JTimesliceRouter.hh.

typedef JDAQTimeslice::const_iterator JTRIGGER::JTimesliceRouter::const_iterator

Definition at line 79 of file JTimesliceRouter.hh.

Constructor & Destructor Documentation

JTRIGGER::JTimesliceRouter::JTimesliceRouter ( const int  numberOfBins)
inline

Constructor.

Parameters
numberOfBinsnumber of bins of the hit look-up table

Definition at line 87 of file JTimesliceRouter.hh.

87  :
89  router(-1)
90  {}
int numberOfBins
number of bins for average CDF integral of optical module
Definition: JSirene.cc:64
JTRIGGER::JTimesliceRouter::JTimesliceRouter ( const JDAQTimeslice timeslice,
const int  numberOfBins 
)
inline

Constructor.

Parameters
timeslicetimeslice
numberOfBinsnumber of bins of the hit look-up table

Definition at line 99 of file JTimesliceRouter.hh.

100  :
102  router(-1)
103  {
104  configure(timeslice);
105  }
void configure(const JDAQTimeslice &timeslice)
Configure.
int numberOfBins
number of bins for average CDF integral of optical module
Definition: JSirene.cc:64

Member Function Documentation

void JTRIGGER::JTimesliceRouter::configure ( const JDAQTimeslice timeslice)
inline

Configure.

Parameters
timeslicetimeslice

Definition at line 113 of file JTimesliceRouter.hh.

114  {
115  using namespace std;
116  using namespace JPP;
117  using namespace KM3NETDAQ;
118 
119 
120  this->set(&timeslice);
121 
122 
123  for (const_iterator i = this->get()->begin(); i != this->get()->end(); ++i) {
124  router.put(i->getModuleID(), distance(this->get()->begin(), i));
125  }
126 
127 
128  const JDAQHit::JTDC_t TMIN = numeric_limits<JDAQHit::JTDC_t>::min();
129  const JDAQHit::JTDC_t TMAX = numeric_limits<JDAQHit::JTDC_t>::max();
130 
131  double Tmin = getTimeSinceRTS(this->get()->getFrameIndex()) - 0.05 * getFrameTime(); // [ns]
132  double Tmax = getTimeSinceRTS(this->get()->getFrameIndex()) + 1.05 * getFrameTime(); // [ns]
133 
134  if (Tmin < TMIN) { Tmin = TMIN; }
135  if (Tmax > TMAX) { Tmax = TMAX; }
136 
137 
138  int number_of_elements = 2;
139 
140  for (const_iterator i = this->get()->begin(); i != this->get()->end(); ++i) {
141  if (i->size() > number_of_elements) {
142  number_of_elements = i->size();
143  }
144  }
145 
146  if (number_of_bins > 1 && number_of_bins < number_of_elements) {
147  number_of_elements = number_of_bins;
148  }
149 
150 
151  const JGrid<double> bounds(number_of_elements, Tmin, Tmax);
152 
153 
154  typedef vector<JDAQHit::JTDC_t> JBuffer_t; // temporary buffer to store bin edges with proper data type
155 
156  JBuffer_t buffer(bounds.getSize() + 1);
157 
158  for (int i = 0; i != bounds.getSize(); ++i) {
159  buffer[i] = (JDAQHit::JTDC_t) bounds.getX(i);
160  }
161 
162  buffer[bounds.getSize()] = TMAX;
163 
164 
165  table.resize(this->get()->size()); // same indexing as time slice
166 
167  const JDAQHit JDAQHitMin(0, TMIN, 0); // begin marker
168  const JDAQHit JDAQHitMax(0, TMAX, 0); // end marker
169 
170  typedef vector<JDAQHit> JDAQFrame_t;
171 
172  JDAQFrame_t zbuf; // copy of raw data with additional begin and end marker
173 
174  vector<grid_type>::iterator grid = table.begin();
175 
176  for (const_iterator frame = this->get()->begin(); frame != this->get()->end(); ++frame, ++grid) {
177 
178  grid->configure(bounds);
179 
180  if (!frame->empty()) {
181 
182  if (frame-> begin()->getT() < grid->getXmin()) {
183  THROW(JTriggerException, "Hit time out of range " << frame-> begin()->getT() << " < " << grid->getXmin());
184  }
185 
186  if (frame->rbegin()->getT() > grid->getXmax()) {
187  THROW(JTriggerException, "Hit time out of range " << frame->rbegin()->getT() << " > " << grid->getXmax());
188  }
189 
190  zbuf.resize(frame->size() + 2); // reserve space end markers
191 
192  copy(frame->begin(), frame->end(), zbuf.begin() + 1);
193 
194  *zbuf. begin() = JDAQHitMin;
195  *zbuf.rbegin() = JDAQHitMax;
196 
197  {
198  JDAQFrame_t::const_iterator hit = zbuf.begin(); ++hit; // skip begin marker
199  JBuffer_t ::const_iterator t1 = buffer.begin();
200 
201  for (grid_type::iterator i = grid->begin(); i != grid->end(); ++i, ++t1) {
202 
203  while (hit->getT() < *t1) { ++hit; }
204 
205  i->getY().lpos = distance(static_cast<const JDAQFrame_t&>(zbuf).begin(), hit) - 1;
206  }
207  }
208 
209  {
210  JDAQFrame_t::const_reverse_iterator hit = zbuf.rbegin(); ++hit; // skip end marker
211  JBuffer_t ::const_reverse_iterator t1 = buffer.rbegin();
212 
213  for (grid_type::reverse_iterator i = grid->rbegin(); i != grid->rend(); ++i, ++t1) {
214 
215  while (hit->getT() >= *t1) { ++hit; }
216 
217  i->getY().rpos = distance(static_cast<const JDAQFrame_t&>(zbuf).begin(), hit.base()) - 1;
218  }
219  }
220  }
221  }
222  }
std::vector< grid_type > table
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
JDAQTimeslice::const_iterator const_iterator
unsigned int JTDC_t
leading edge [ns]
Definition: JDAQHit.hh:39
Hit data structure.
Definition: JDAQHit.hh:34
int getFrameIndex(const double t_ns)
Get frame index for a given time in ns.
Definition: JDAQClock.hh:251
double getFrameTime()
Get frame time duration.
Definition: JDAQClock.hh:162
double getTimeSinceRTS(const int frame_index)
Get time in ns since last RTS for a given frame index.
Definition: JDAQClock.hh:263
collection_type::iterator iterator
Simple data structure for an abstract collection of equidistant abscissa values.
Definition: JGrid.hh:32
collection_type::reverse_iterator reverse_iterator
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition: JHead.cc:139
virtual void set(JClass_t *p) override
Set pointer.
Definition: JPointer.hh:75
const int JTRIGGER::JTimesliceRouter::getAddress ( const JDAQModuleIdentifier module) const
inline

Get address of module.

Parameters
modulemodule
Returns
address

Definition at line 231 of file JTimesliceRouter.hh.

232  {
233  return router.get(module.getModuleID());
234  }
int getModuleID() const
Get module identifier.
bool JTRIGGER::JTimesliceRouter::hasSuperFrame ( const JDAQModuleIdentifier module) const
inline

Check presence of module.

Parameters
modulemodule
Returns
true if module present; else false

Definition at line 243 of file JTimesliceRouter.hh.

244  {
245  return router.has(module.getModuleID());
246  }
int getModuleID() const
Get module identifier.
const JDAQSuperFrame& JTRIGGER::JTimesliceRouter::getSuperFrame ( const JDAQModuleIdentifier module) const
inline

Get super frame.

Parameters
modulemodule
Returns
super frame

Definition at line 255 of file JTimesliceRouter.hh.

256  {
257  return (*(this->get()))[this->getAddress(module)];
258  }
const int getAddress(const JDAQModuleIdentifier &module) const
Get address of module.
JDAQFrameSubset JTRIGGER::JTimesliceRouter::getFrameSubset ( const JDAQModuleIdentifier module,
const JTimeRange &  timeRange 
) const
inline

Get subset of frame given module identifier and range of hit times.

Note that the hit times should have been corrected for the maximal and minimal time offsets of the PMTs in the corresponding optical module.

Parameters
modulemodule
timeRangetime range [ns]
Returns
subset with begin and end iterators

Definition at line 271 of file JTimesliceRouter.hh.

272  {
273  const int address = this->getAddress(module);
274 
275  const grid_type& grid = table [address];
276  const JDAQSuperFrame& frame = (*(this->get()))[address];
277 
278  const int first = grid.getIndex(timeRange.getLowerLimit());
279  const int second = grid.getIndex(timeRange.getUpperLimit());
280 
281  if (first < 0 || second >= grid.getSize()) {
282  THROW(JTriggerException, "Time range [ns] " << timeRange << " bounds " << grid.getXmin() << ' ' << grid.getXmax() << " indices " << first << ' ' << second);
283  }
284 
285  return frame.subset(grid.getY(first).lpos, grid.getY(second).rpos);
286  }
T getLowerLimit() const
Get lower limit.
Definition: JRange.hh:202
std::vector< grid_type > table
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
JTOOLS::JGridCollection< element_type > grid_type
T getUpperLimit() const
Get upper limit.
Definition: JRange.hh:213
const int getAddress(const JDAQModuleIdentifier &module) const
Get address of module.
Data frame of one optical module.
JDAQFrameSubset subset(const int i1, const int i2) const
Get subset of data.
Definition: JDAQFrame.hh:178
template<class JClass_t>
virtual JClass_t* JLANG::JPointer< JClass_t >::get ( ) const
inlineoverridevirtualinherited
template<class JClass_t>
virtual void JLANG::JPointer< JClass_t >::set ( JClass_t *  p)
inlineoverridevirtualinherited

Set pointer.

Parameters
ppointer to object

Implements JLANG::JAbstractPointer< JClass_t >.

Reimplemented in JLANG::JSharedPointer< JClass_t, JMemory_t >, JLANG::JSharedPointer< JPHYSICS::JRadiation >, JLANG::JSharedPointer< JWeightEvent >, JLANG::JSharedPointer< JAccessibleObjectIterator< KM3NETDAQ::KM3NETDAQ::JDAQEvent > >, JLANG::JSharedPointer< const TFormula >, JLANG::JSharedPointer< JObjectIterator< T > >, JLANG::JSharedPointer< JFIT::JMEstimator >, JLANG::JSharedPointer< JAbstractAutoPointer< JBase_t > >, JLANG::JSharedPointer< JTRIGGER::JDAQHitSelector >, JLANG::JSharedPointer< JAccessibleObjectIterator< JNullType > >, JLANG::JSharedPointer< match_type >, JLANG::JSharedPointer< JAccessibleObjectIterator< JDAQSummaryslice > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTypeList< JDAQEvent, JTypelist_t > > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTail_t > >, JLANG::JSharedPointer< JLOGGER::JLogger >, JLANG::JSharedPointer< JAccessibleObjectIterator< T > >, JLANG::JSharedPointer< JParserElementInterface >, JLANG::JSharedPointer< JExceptionHandler >, JLANG::JSharedPointer< JObjectOutput< JHead_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JHead_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JTail_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JHead_t > >, JLANG::JSharedPointer< JObjectOutput< T > >, JLANG::JSharedPointer< JBase_t >, JLANG::JSharedPointer< JObjectOutput< JTail_t > >, JLANG::JSharedPointer< JPropertiesElementInterface >, JLANG::JSharedPointer< JTRIGGER::JMatch >, JLANG::JSharedPointer< JRewindableObjectIterator< const T > >, JLANG::JSharedPointer< JRewindableObjectIterator< T > >, JLANG::JSharedPointer< JAccessibleObjectOutput< T > >, JLANG::JSharedPointer< JNET::JControlHost >, and JLANG::JSharedPointer< JTOOLS::JMultiMapTransformer >.

Definition at line 75 of file JPointer.hh.

76  {
77  this->__p = p;
78  }
JClass_t * __p
pointer to object
Definition: JPointer.hh:136
template<class JClass_t>
template<class T >
void JLANG::JPointer< JClass_t >::set ( const JPointer< T > &  pointer)
inlineinherited

Set pointer.

Parameters
pointerpointer to object

Definition at line 96 of file JPointer.hh.

97  {
98  this->set(pointer.get());
99  }
virtual void set(JClass_t *p) override
Set pointer.
Definition: JPointer.hh:75
virtual JClass_t * get() const override
Get pointer.
Definition: JPointer.hh:64
template<class JClass_t>
virtual void JLANG::JPointer< JClass_t >::reset ( )
inlineoverridevirtualinherited

Reset pointer.

Implements JLANG::JAbstractPointer< JClass_t >.

Reimplemented in JLANG::JSharedPointer< JClass_t, JMemory_t >, JLANG::JSharedPointer< JPHYSICS::JRadiation >, JLANG::JSharedPointer< JWeightEvent >, JLANG::JSharedPointer< JAccessibleObjectIterator< KM3NETDAQ::KM3NETDAQ::JDAQEvent > >, JLANG::JSharedPointer< const TFormula >, JLANG::JSharedPointer< JObjectIterator< T > >, JLANG::JSharedPointer< JFIT::JMEstimator >, JLANG::JSharedPointer< JAbstractAutoPointer< JBase_t > >, JLANG::JSharedPointer< JTRIGGER::JDAQHitSelector >, JLANG::JSharedPointer< JAccessibleObjectIterator< JNullType > >, JLANG::JSharedPointer< match_type >, JLANG::JSharedPointer< JAccessibleObjectIterator< JDAQSummaryslice > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTypeList< JDAQEvent, JTypelist_t > > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JTail_t > >, JLANG::JSharedPointer< JLOGGER::JLogger >, JLANG::JSharedPointer< JAccessibleObjectIterator< T > >, JLANG::JSharedPointer< JParserElementInterface >, JLANG::JSharedPointer< JExceptionHandler >, JLANG::JSharedPointer< JObjectOutput< JHead_t > >, JLANG::JSharedPointer< JAccessibleObjectIterator< JHead_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JTail_t > >, JLANG::JSharedPointer< JRewindableObjectIterator< JHead_t > >, JLANG::JSharedPointer< JObjectOutput< T > >, JLANG::JSharedPointer< JBase_t >, JLANG::JSharedPointer< JObjectOutput< JTail_t > >, JLANG::JSharedPointer< JPropertiesElementInterface >, JLANG::JSharedPointer< JTRIGGER::JMatch >, JLANG::JSharedPointer< JRewindableObjectIterator< const T > >, JLANG::JSharedPointer< JRewindableObjectIterator< T > >, JLANG::JSharedPointer< JAccessibleObjectOutput< T > >, JLANG::JSharedPointer< JNET::JControlHost >, JLANG::JSharedPointer< JTOOLS::JMultiMapTransformer >, JLANG::JStorage< JClass_t, JMemory_t >, JLANG::JStorage< JDETECTOR::JK40Simulator, JNew >, JLANG::JStorage< JBuildL2_t, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JTail_t >, JNew >, JLANG::JStorage< match_type, JNew >, JLANG::JStorage< JObjectOutput< JTail_t >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JNullType >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< KM3NETDAQ::KM3NETDAQ::JDAQEvent >, JNew >, JLANG::JStorage< JDETECTOR::JCLBDefaultSimulatorInterface::JStateMachine, JNew >, JLANG::JStorage< JDETECTOR::JPMTSimulator, JNew >, JLANG::JStorage< JObjectIterator< T >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< T >, JNew >, JLANG::JStorage< JRewindableObjectIterator< JTail_t >, JNew >, JLANG::JStorage< JTOOLS::JFunction1D, JNew >, JLANG::JStorage< JDETECTOR::JCLBSimulator, JNew >, JLANG::JStorage< JModuleRouter, JNew >, JLANG::JStorage< JTOOLS::JMultiMapTransformer, JNew >, JLANG::JStorage< JTriggerNB, JNew >, JLANG::JStorage< JRewindableObjectIterator< const T >, JNew >, JLANG::JStorage< JBase_t, JNew >, JLANG::JStorage< const TFormula, JNew >, JLANG::JStorage< JWeightEvent, JNew >, JLANG::JStorage< JTrigger3DMuon, JNew >, JLANG::JStorage< JTrigger3DShower, JNew >, JLANG::JStorage< JParserElementInterface, JNew >, JLANG::JStorage< JFIT::JMEstimator, JNew >, JLANG::JStorage< JAbstractAutoPointer< JBase_t >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JHead_t >, JNew >, JLANG::JStorage< JTRIGGER::JDAQHitSelector, JNew >, JLANG::JStorage< JTRIGGER::JMatch, JNew >, JLANG::JStorage< JPHYSICS::JRadiation, JNew >, JLANG::JStorage< JDETECTOR::JCLBDefaultSimulatorInterface::JTDC, JNew >, JLANG::JStorage< JLANG::JMultiPipe< T, N >, JNew >, JLANG::JStorage< JServerSocket, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JDAQSummaryslice >, JNew >, JLANG::JStorage< JObjectOutput< JHead_t >, JNew >, JLANG::JStorage< JAccessibleObjectIterator< JTypeList< JDAQEvent, JTypelist_t > >, JNew >, JLANG::JStorage< JExceptionHandler, JNew >, JLANG::JStorage< TFile >, JLANG::JStorage< JTimesliceRouter, JNew >, JLANG::JStorage< JControlHost_t, JNew >, JLANG::JStorage< JRewindableObjectIterator< T >, JNew >, JLANG::JStorage< JPropertiesElementInterface, JNew >, JLANG::JStorage< JRewindableObjectIterator< JHead_t >, JNew >, JLANG::JStorage< JBuildL1_t, JNew >, JLANG::JStorage< JObjectOutput< T >, JNew >, JLANG::JStorage< JIO::JWriter, JNew >, JLANG::JStorage< JNET::JControlHost, JNew >, JLANG::JStorage< JAccessibleObjectOutput< T >, JNew >, JLANG::JStorage< JIO::JReader, JNew >, JLANG::JStorage< JLOGGER::JLogger, JNew >, and JLANG::JStorage< JTriggerMXShower, JNew >.

Definition at line 84 of file JPointer.hh.

85  {
86  this->__p = NULL;
87  }
JClass_t * __p
pointer to object
Definition: JPointer.hh:136
template<class JClass_t>
template<class T >
void JLANG::JPointer< JClass_t >::reset ( const JPointer< T > &  pointer)
inlineinherited

Reset pointer.

Parameters
pointerpointer to object

Definition at line 108 of file JPointer.hh.

109  {
110  this->reset(pointer.get());
111  }
virtual JClass_t * get() const override
Get pointer.
Definition: JPointer.hh:64
virtual void reset() override
Reset pointer.
Definition: JPointer.hh:84
template<class JClass_t>
void JLANG::JAbstractPointer< JClass_t >::reset ( JClass_t *  p)
inlineinherited

Reset pointer.

Parameters
ppointer to object

Definition at line 94 of file JAbstractPointer.hh.

95  {
96  if (this->get() != p) {
97 
98  this->reset();
99 
100  if (p != NULL) {
101  this->set(p);
102  }
103  }
104  }
virtual void reset()=0
Reset pointer.
virtual void set(JClass_t *p)=0
Set pointer.
template<class JClass_t>
JClass_t* const& JLANG::JPointer< JClass_t >::getReference ( ) const
inlineinherited

Get rereference to internal pointer.

Returns
reference to internal pointer

Definition at line 119 of file JPointer.hh.

120  {
121  return __p;
122  }
JClass_t * __p
pointer to object
Definition: JPointer.hh:136
template<class JClass_t>
JClass_t* & JLANG::JPointer< JClass_t >::getReference ( )
inlineinherited

Get rereference to internal pointer.

Returns
reference to internal pointer

Definition at line 130 of file JPointer.hh.

131  {
132  return __p;
133  }
JClass_t * __p
pointer to object
Definition: JPointer.hh:136
template<class JClass_t>
virtual bool JLANG::JAbstractPointer< JClass_t >::equals ( const JAbstractPointer< JClass_t > &  object) const
inlinevirtualinherited

Equals.

The equality is evaluated by comparison of the internal pointers.

Parameters
objectabstract pointer
Returns
true if equals; else false

Definition at line 50 of file JAbstractPointer.hh.

51  {
52  return this->get() == object.get();
53  }
template<class JClass_t>
bool JLANG::JAbstractPointer< JClass_t >::is_valid ( ) const
inlineinherited

Check validity of pointer.

Returns
true if pointer not null; else false

Definition at line 83 of file JAbstractPointer.hh.

84  {
85  return this->get() != NULL;
86  }
template<class JClass_t>
JClass_t* JLANG::JAbstractPointer< JClass_t >::operator-> ( ) const
inlineinherited

Smart pointer operator.

Returns
pointer to object

Definition at line 112 of file JAbstractPointer.hh.

113  {
114  if (!is_valid())
115  throw JNullPointerException("JAbstractPointer::operator->()");
116  else
117  return this->get();
118  }
bool is_valid() const
Check validity of pointer.
Exception for null pointer operation.
Definition: JException.hh:216
template<class JClass_t>
JLANG::JAbstractPointer< JClass_t >::operator JClass_t * ( ) const
inlineinherited

Type conversion operator.

Returns
pointer to object

Definition at line 126 of file JAbstractPointer.hh.

127  {
128  return this->get();
129  }

Member Data Documentation

int JTRIGGER::JTimesliceRouter::number_of_bins
private

Definition at line 289 of file JTimesliceRouter.hh.

router_type JTRIGGER::JTimesliceRouter::router
private

Definition at line 290 of file JTimesliceRouter.hh.

std::vector<grid_type> JTRIGGER::JTimesliceRouter::table
private

Definition at line 291 of file JTimesliceRouter.hh.

template<class JClass_t>
JClass_t* JLANG::JPointer< JClass_t >::__p
protectedinherited

pointer to object

Definition at line 136 of file JPointer.hh.


The documentation for this class was generated from the following file: