Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

LATcomponentIterator Class Reference

Class for iterating over components in a LATcontribution. More...

#include <LATcomponentIterator.h>

Inheritance diagram for LATcomponentIterator:

Inheritance graph
[legend]
Collaboration diagram for LATcomponentIterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LATcomponentIterator (EBFevent *)
 Constructor initializing the iterator with an EBFevent.
 LATcomponentIterator ()
 Do nothing constructor.
unsigned iterate (EBFevent *event)
 Class for iterating over a EBF event contributions Iterate over the EBF contributions in an event.
virtual int handleError (EBFcontribution *contribution, unsigned code, unsigned p1=0, unsigned p2=0) const
 Handle all errors possible in LATcomponentIterator.
virtual int handleError (EBFevent *event, unsigned code, unsigned p1=0, unsigned p2=0) const
 Handle all errors possible in LATcomponentIterator.
int OSW (EBFevent *event, EBFcontribution *contribution)
 Method to call back the application with an OSWcontribution.
int GLT (EBFevent *event, EBFcontribution *contribution)
 Method to call back the application with an GLTcontribution.
int GEM (EBFevent *event, EBFcontribution *contribution)
 Method to call back the application with an GEMcontribution.
int AEM (EBFevent *event, EBFcontribution *contribution)
 Method to call back the application with an AEMcontribution.
int TEM (EBFevent *event, EBFcontribution *contribution)
 Method that iterates over TEMcontributions, calling the application back.
int UDF (EBFevent *event, EBFcontribution *contribution)
 Method to call back the application with an EBFcontribution when the contribution is unrecognized.
int CAL (EBFevent *event, TEMcontribution *contribution)
 Method to call back the application with an CALcontribution.
int TKR (EBFevent *event, TEMcontribution *contribution)
 Method to call back the application with an TKRcontribution.
virtual int UDFcomponent (EBFevent *event, EBFcontribution *contribution)
 Default method called when the application doesn't supply a method to handle undefined EBFcontributions.
virtual int OSWcomponent (EBFevent *event, OSWcontribution *contribution)
 Default method called when the application doesn't supply a method to handle OSWcontributions.
virtual int GLTcomponent (EBFevent *event, GLTcontribution *contribution)
 Default method called when the application doesn't supply a method to handle GLTcontributions.
virtual int GEMcomponent (EBFevent *event, GEMcontribution *contribution)
 Default method called when the application doesn't supply a method to handle GEMcontributions.
virtual int ACDcomponent (EBFevent *event, AEMcontribution *contribution)
 Default method called when the application doesn't supply a method to handle AEMcontributions.
virtual int CALcomponent (EBFevent *event, CALcontribution *contribution)
 Default method called when the application doesn't supply a method to handle CALcontributions.
virtual int TKRcomponent (EBFevent *event, TKRcontribution *contribution)
 Default method called when the application doesn't supply a method to handle TKRcontributions.
virtual int diagnostic (EBFevent *event, TEMcontribution *contribution)
 Default method called when the application doesn't supply a method to handle diagnostic contributions.
virtual int error (EBFevent *event, TEMcontribution *contribution)
 Default method called when the application doesn't supply a method to handle error contributions.
virtual int cleanup (EBFevent *event, TEMcontribution *contribution)
 Default method called when the application doesn't supply a "cleanup" method.

Detailed Description

Class for iterating over components in a LATcontribution.

The idea behind this class was to make one iterator that runs over all components of the event, calling all the subiterators necessary to parse the event in the finest detail. The user of this class only had to provide the virtual methods for those leaf iterators in which his application is interested. Those in which he is not intersted are defaulted to no-op methods to make this a concrete class.

Another consideration is that it appears that having the CPU cross the C++/Python boundary is an expensive operation, so in order to minimize the impact of this, as much as possible was done on the C++ side.

The conflict is that each time additional iterators are created the class interface changes, causing backward compatibility problems. For the moment (March 10, 2004), this class is set up to only do the first layers of iteration, leaving iteration down to the leaf items up to the application.

Author:
R. Claus -- GLAST LAT I&T/Online - (claus@slac.stanford.edu)
Revision
1.12
Date:
January 30, 2003 -- Created
Id
LATcomponentIterator.h,v 1.12 2005/03/18 05:20:37 panetta Exp

Copyright: Copyright 2004 by The Board of Trustees of the Leland Stanford Junior University. All rights reserved.


Constructor & Destructor Documentation

LATcomponentIterator::LATcomponentIterator EBFevent event  )  [inline]
 

Constructor initializing the iterator with an EBFevent.

Parameters:
event - The EBFevent to iterate over


Member Function Documentation

int LATcomponentIterator::ACDcomponent EBFevent event,
AEMcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle AEMcontributions.

Parameters:
event - The EBFevent containing the AEMcontribution
contribution - The AEMcontribution
Returns:
Zero for success

int LATcomponentIterator::AEM EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Method to call back the application with an AEMcontribution.

With this example class, this method is called by the EBFcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as an AEMcontribution
Returns:
An application defined status value.

Implements EBFcontributionIterator.

int LATcomponentIterator::CAL EBFevent event,
TEMcontribution contribution
[inline, virtual]
 

Method to call back the application with an CALcontribution.

With this example class, this method is called by the TEMcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as an CALcontribution
Returns:
An application defined status value.

Implements TEMcontributionIterator.

int LATcomponentIterator::CALcomponent EBFevent event,
CALcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle CALcontributions.

Parameters:
event - The EBFevent containing the CALcontribution
contribution - The CALcontribution
Returns:
Zero for success

int LATcomponentIterator::cleanup EBFevent event,
TEMcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a "cleanup" method.

The "cleanup" method is used to do additional checking on data following the last contribution in the event. In some examples, it is used to verify that the event is padded out to a LATp cell boundary with zeros.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as an EBFcontribution
Returns:
Zero for success

Implements TEMcontributionIterator.

int LATcomponentIterator::diagnostic EBFevent event,
TEMcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle diagnostic contributions.

Parameters:
event - The EBFevent containing the diagnostic contribution
contribution - The TEMcontribution
Returns:
Zero for success

Implements TEMcontributionIterator.

int LATcomponentIterator::error EBFevent event,
TEMcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle error contributions.

Parameters:
event - The EBFevent containing the error contribution
contribution - The TEMcontribution
Returns:
Zero for success

Implements TEMcontributionIterator.

int LATcomponentIterator::GEM EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Method to call back the application with an GEMcontribution.

With this example class, this method is called by the EBFcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as a GEMcontribution
Returns:
An application defined status value.

Implements EBFcontributionIterator.

int LATcomponentIterator::GEMcomponent EBFevent event,
GEMcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle GEMcontributions.

Parameters:
event - The EBFevent containing the GEMcontribution
contribution - The GEMcontribution
Returns:
Zero for success

int LATcomponentIterator::GLT EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Method to call back the application with an GLTcontribution.

With this example class, this method is called by the EBFcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as a GLTcontribution
Returns:
An application defined status value.

Implements EBFcontributionIterator.

int LATcomponentIterator::GLTcomponent EBFevent event,
GLTcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle GLTcontributions.

Parameters:
event - The EBFevent containing the GLTcontribution
contribution - The GLTcontribution
Returns:
Zero for success

int LATcomponentIterator::handleError EBFevent event,
unsigned  code,
unsigned  p1 = 0,
unsigned  p2 = 0
const [inline, virtual]
 

Handle all errors possible in LATcomponentIterator.

This method is used to handle errors occurring during the iteration over an LATcomponent. By default it does nothing, however it is virtual and is able to be overridden by the user.

Parameters:
event The event in error
code The error code
p1 a parameter associated with the error code
p2 a parameter associated with the error code

Reimplemented from EBFcontributionIterator.

int LATcomponentIterator::handleError EBFcontribution contribution,
unsigned  code,
unsigned  p1 = 0,
unsigned  p2 = 0
const [inline, virtual]
 

Handle all errors possible in LATcomponentIterator.

This method is used to handle errors occurring during the iteration over an LATcomponent. By default it does nothing, however it is virtual and is able to be overridden by the user.

Parameters:
contribution The contribution in error
code The error code
p1 a parameter associated with the error code
p2 a parameter associated with the error code

unsigned LATcomponentIterator::iterate EBFevent event  )  [inline]
 

Class for iterating over a EBF event contributions Iterate over the EBF contributions in an event.

This method calls back a virtual contribution handlers for each contribution it finds. Which handler is called back is determined by the contribution source ID and the _map method. Contribution handlers take the event and the contribution as arguments.

Parameters:
event A pointer to the EBFevent to be iterated over
Returns:
The number of contributions handled.

Reimplemented from EBFcontributionIterator.

int LATcomponentIterator::OSW EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Method to call back the application with an OSWcontribution.

With this example class, this method is called by the EBFcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as an OSWcontribution
Returns:
An application defined status value.

Implements EBFcontributionIterator.

int LATcomponentIterator::OSWcomponent EBFevent event,
OSWcontribution *  contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle OSWcontributions.

Parameters:
event - The EBFevent containing the OSWcontribution
contribution - The OSWcontribution
Returns:
Zero for success

int LATcomponentIterator::TEM EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Method that iterates over TEMcontributions, calling the application back.

With this example class, this method is called by the EBFcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as a TEMcontribution
Returns:
A TEMcontributionIterator::iterate() defined status value.

Implements EBFcontributionIterator.

int LATcomponentIterator::TKR EBFevent event,
TEMcontribution contribution
[inline, virtual]
 

Method to call back the application with an TKRcontribution.

With this example class, this method is called by the TEMcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The EBFcontribution to handle as an TKRcontribution
Returns:
An application defined status value.

Implements TEMcontributionIterator.

int LATcomponentIterator::TKRcomponent EBFevent event,
TKRcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle TKRcontributions.

Parameters:
event - The EBFevent containing the TKRcontribution
contribution - The TKRcontribution
Returns:
Zero for success

int LATcomponentIterator::UDF EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Method to call back the application with an EBFcontribution when the contribution is unrecognized.

With this example class, this method is called by the EBFcontributionIterator. It should not be called from the application that instantiates this class.

Parameters:
event - The EBFevent containing the contribution
contribution - The undefined EBFcontribution
Returns:
An application defined status value.

Implements EBFcontributionIterator.

int LATcomponentIterator::UDFcomponent EBFevent event,
EBFcontribution contribution
[inline, virtual]
 

Default method called when the application doesn't supply a method to handle undefined EBFcontributions.

Parameters:
event - The EBFevent containing the EBFcontribution
contribution - The EBFcontribution
Returns:
Zero for success


The documentation for this class was generated from the following file:
Generated on Thu Sep 29 12:13:40 2005 for LDF v05-07-00 by doxygen 1.3.9.1