Jpp
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes | List of all members
JSUPPORT::JMonteCarloGZFileReader< T > Class Template Referenceabstract

Template definition of Monte Carlo object reader for gzipped ASCII formatted file (i.e. More...

#include <JMonteCarloFileReader.hh>

Inheritance diagram for JSUPPORT::JMonteCarloGZFileReader< T >:
JLANG::JAccessibleObjectIterator< T > JLANG::JNullAccess JLANG::JNullIterator< T > JLANG::JObjectIterator< T > JLANG::JAccessible JLANG::JAccessible JLANG::JObjectIterator< T > JLANG::JThrow< JAccessible > JLANG::JThrow< JAccessible >

Public Types

typedef JPointer< T > pointer_type
 Type definition of pointer_type. More...
 
typedef JObjectIterator< T >::pointer_type pointer_type
 

Public Member Functions

virtual bool hasNext ()=0
 Check availability of next element. More...
 
virtual const pointer_typenext ()=0
 Get next element. More...
 
virtual skip_type skip (const skip_type ns)
 Skip items. More...
 
virtual bool is_open () const =0
 Check is device is open. More...
 
virtual void open (const char *file_name)=0
 Open device. More...
 
virtual void close ()=0
 Close device. More...
 
virtual bool is_open () const
 Check is device is open. More...
 
virtual void open (const char *file_name)
 Open device. More...
 
virtual void close ()
 Close device. More...
 
virtual bool hasNext ()
 Check availability of next element. More...
 
virtual const pointer_typenext ()
 Get next element. More...
 

Static Public Member Functions

static void Throw (const bool option)
 Enable/disable throw option. More...
 
static int Throw (const JException &error, const int value=-1)
 Throw exception or return error. More...
 

Static Protected Attributes

static bool do_throw
 throw option More...
 

Private Attributes

pointer_type ps
 

Detailed Description

template<class T>
class JSUPPORT::JMonteCarloGZFileReader< T >

Template definition of Monte Carlo object reader for gzipped ASCII formatted file (i.e.

'.gz')

This class provides for a null implementation of the JLANG::JAccessibleObjectIterator interface. It should be specialised for the data types that will be read from a Monte Carlo file.

Definition at line 42 of file JMonteCarloFileReader.hh.

Member Typedef Documentation

◆ pointer_type [1/2]

template<class T>
typedef JPointer<T> JLANG::JObjectIterator< T >::pointer_type
inherited

Type definition of pointer_type.

Definition at line 56 of file JObjectIterator.hh.

◆ pointer_type [2/2]

template<class T >
typedef JObjectIterator<T>::pointer_type JLANG::JNullIterator< T >::pointer_type
inherited

Definition at line 329 of file JObjectIterator.hh.

Member Function Documentation

◆ hasNext() [1/2]

template<class T>
virtual bool JLANG::JObjectIterator< T >::hasNext ( )
pure virtualinherited

Check availability of next element.

Returns
true if the iteration has more elements; else false

Implemented in JSUPPORT::JMultipleFileScanner< T >, JSUPPORT::JMultipleFileScanner<>, JSUPPORT::JMultipleFileScanner< JTail_t >, JSUPPORT::JMultipleFileScanner< JHead_t >, JSUPPORT::JMultipleFileScanner< KM3NETDAQ::JDAQEvent >, JSUPPORT::JMultipleFileScanner< JDAQSummaryslice >, JSUPPORT::JMultipleFileScanner< JTypeList< JDAQEvent, JTypelist_t > >, JLANG::JNullIterator< T >, JSUPPORT::JSingleFileScanner< T >, JSUPPORT::JSingleFileScanner<>, JSUPPORT::JSingleFileScanner< JTail_t >, JSUPPORT::JSingleFileScanner< JHead_t >, JLANG::JObjectMultiplexer< JTypeList< JHead_t, JTail_t >, JBase_t >, JROOT::JRootFileReader< T, false >, JGIZMO::JMarkerAttributes, JGIZMO::JLineAttributes, JSUPPORT::JTriggeredFileScanner< JTypelist_t >, JLANG::JObjectSampler< T, JSampler_t >, JLANG::JSTDObjectIterator< T >, JLANG::JObjectSampler< JDAQSummaryslice, JRandomSampler >, JROOT::JTreeReaderObjectIterator< T >, JLANG::JPipe< T >, JLANG::JPipe< JTail_t >, JLANG::JPipe< JHead_t >, JLANG::JObjectMultiplexer< JDerived_t, JBase_t >, JLANG::JObjectMultiplexer< JHead_t, JBase_t >, JLANG::JObjectMultiplexer< JTail_t, JBase_t >, JLANG::JAbstractObjectIterator< T >, JLANG::JAbstractObjectIterator< Head >, JLANG::JAbstractObjectIterator< JTail_t >, JLANG::JAbstractObjectIterator< JHead_t >, JLANG::JAbstractObjectIterator< JTriggerParameters >, JLANG::JAbstractObjectIterator< JPhotonPath >, JLANG::JAbstractObjectReader< T >, JLANG::JConversionIterator< JInput_t, JOutput_t >, JLANG::JAbstractObjectReader< const T >, JLANG::JAbstractObjectReader< JTail_t >, JLANG::JAbstractObjectReader< JHead_t >, JLANG::JAbstractObjectReader< KM3NETDAQ::JDAQEvent >, JLANG::JAbstractObjectReader< JDAQSummaryslice >, and JLANG::JAbstractObjectReader< JTypeList< JDAQEvent, JTypelist_t > >.

◆ next() [1/2]

template<class T>
virtual const pointer_type& JLANG::JObjectIterator< T >::next ( )
pure virtualinherited

Get next element.

Returns
pointer to element

Implemented in JSUPPORT::JMultipleFileScanner< T >, JSUPPORT::JMultipleFileScanner<>, JSUPPORT::JMultipleFileScanner< JTail_t >, JSUPPORT::JMultipleFileScanner< JHead_t >, JSUPPORT::JMultipleFileScanner< KM3NETDAQ::JDAQEvent >, JSUPPORT::JMultipleFileScanner< JDAQSummaryslice >, JSUPPORT::JMultipleFileScanner< JTypeList< JDAQEvent, JTypelist_t > >, JLANG::JNullIterator< T >, JSUPPORT::JSingleFileScanner< T >, JSUPPORT::JSingleFileScanner<>, JSUPPORT::JSingleFileScanner< JTail_t >, JSUPPORT::JSingleFileScanner< JHead_t >, JLANG::JObjectMultiplexer< JTypeList< JHead_t, JTail_t >, JBase_t >, JROOT::JRootFileReader< T, false >, JGIZMO::JMarkerAttributes, JLANG::JObjectSampler< T, JSampler_t >, JLANG::JObjectSampler< JDAQSummaryslice, JRandomSampler >, JGIZMO::JLineAttributes, JLANG::JPipe< T >, JLANG::JPipe< JTail_t >, JLANG::JPipe< JHead_t >, JSUPPORT::JTriggeredFileScanner< JTypelist_t >, JROOT::JTreeReaderObjectIterator< T >, JLANG::JSTDObjectIterator< T >, JLANG::JObjectMultiplexer< JDerived_t, JBase_t >, JLANG::JObjectMultiplexer< JHead_t, JBase_t >, JLANG::JObjectMultiplexer< JTail_t, JBase_t >, JLANG::JAbstractObjectIterator< T >, JLANG::JAbstractObjectIterator< Head >, JLANG::JAbstractObjectIterator< JTail_t >, JLANG::JAbstractObjectIterator< JHead_t >, JLANG::JAbstractObjectIterator< JTriggerParameters >, JLANG::JAbstractObjectIterator< JPhotonPath >, JSUPPORT::JParallelFileScanner< JTypeList< JDAQEvent, JTypelist_t >, JMultipleFileScanner >, JLANG::JAbstractObjectReader< T >, JLANG::JConversionIterator< JInput_t, JOutput_t >, JLANG::JAbstractObjectReader< const T >, JLANG::JAbstractObjectReader< JTail_t >, JLANG::JAbstractObjectReader< JHead_t >, JLANG::JAbstractObjectReader< KM3NETDAQ::JDAQEvent >, JLANG::JAbstractObjectReader< JDAQSummaryslice >, and JLANG::JAbstractObjectReader< JTypeList< JDAQEvent, JTypelist_t > >.

◆ skip()

template<class T>
virtual skip_type JLANG::JObjectIterator< T >::skip ( const skip_type  ns)
inlinevirtualinherited

◆ is_open() [1/2]

virtual bool JLANG::JAccessible::is_open ( ) const
pure virtualinherited

◆ open() [1/2]

virtual void JLANG::JAccessible::open ( const char *  file_name)
pure virtualinherited

◆ close() [1/2]

virtual void JLANG::JAccessible::close ( )
pure virtualinherited

◆ Throw() [1/2]

static void JLANG::JThrow< JAccessible >::Throw ( const bool  option)
inlinestaticinherited

Enable/disable throw option.

Parameters
optiontrue enable; false disable

Definition at line 37 of file JThrow.hh.

38  {
39  do_throw = option;
40  }

◆ Throw() [2/2]

static int JLANG::JThrow< JAccessible >::Throw ( const JException error,
const int  value = -1 
)
inlinestaticinherited

Throw exception or return error.

Parameters
errorexception
valuereturn code
Returns
return code

Definition at line 50 of file JThrow.hh.

51  {
52  using namespace std;
53 
54  if (do_throw) {
55  throw error;
56  }
57 
58  cerr << error.what() << endl;
59 
60  return value;
61  }

◆ is_open() [2/2]

virtual bool JLANG::JNullAccess::is_open ( ) const
inlinevirtualinherited

Check is device is open.

Returns
true

Implements JLANG::JAccessible.

Definition at line 74 of file JAccessible.hh.

75  {
76  return true;
77  }

◆ open() [2/2]

virtual void JLANG::JNullAccess::open ( const char *  file_name)
inlinevirtualinherited

Open device.

Parameters
file_namefile name

Implements JLANG::JAccessible.

Definition at line 85 of file JAccessible.hh.

86  {}

◆ close() [2/2]

virtual void JLANG::JNullAccess::close ( )
inlinevirtualinherited

Close device.

Implements JLANG::JAccessible.

Definition at line 92 of file JAccessible.hh.

93  {}

◆ hasNext() [2/2]

template<class T >
virtual bool JLANG::JNullIterator< T >::hasNext ( )
inlinevirtualinherited

Check availability of next element.

Returns
false

Implements JLANG::JObjectIterator< T >.

Definition at line 337 of file JObjectIterator.hh.

338  {
339  return false;
340  }

◆ next() [2/2]

template<class T >
virtual const pointer_type& JLANG::JNullIterator< T >::next ( )
inlinevirtualinherited

Get next element.

Returns
NULL

Implements JLANG::JObjectIterator< T >.

Definition at line 348 of file JObjectIterator.hh.

349  {
350  return ps;
351  }

Member Data Documentation

◆ do_throw

bool JLANG::JThrow< JAccessible >::do_throw
staticprotectedinherited

throw option

Set default throw option to true.

Definition at line 28 of file JThrow.hh.

◆ ps

template<class T >
pointer_type JLANG::JNullIterator< T >::ps
privateinherited

Definition at line 354 of file JObjectIterator.hh.


The documentation for this class was generated from the following file:
JLANG::skip_type
unsigned int skip_type
Type definition for number of objects to skip.
Definition: JObjectIterator.hh:25
JLANG::JObjectIterator::hasNext
virtual bool hasNext()=0
Check availability of next element.
std
Definition: jaanetDictionary.h:36
JLANG::JNullIterator::ps
pointer_type ps
Definition: JObjectIterator.hh:354
JLANG::JThrow< JAccessible >::do_throw
static bool do_throw
throw option
Definition: JThrow.hh:28
JLANG::JException::what
virtual const char * what() const
Get error message.
Definition: JException.hh:65
JLANG::JObjectIterator::next
virtual const pointer_type & next()=0
Get next element.