ROOT logo
#include "hdatasource.h"
#include "hevent.h"

//*-- Author : Manuel Sanchez
//*-- Modified : 9/10/1998 by Manuel Sanchez
//*-- Modified : 27/05/98 by Manuel Sanchez
//*-- Copyright : GENP (Univ. Santiago de Compostela)

//_HADES_CLASS_DESCRIPTION 
////////////////////////////////////
//HDataSource
// 
//  This is an abstract base class. Its derived classes provide the data needed 
// for the reconstruction, reading them from different sources.
//
//  The main method of this class is getNextEvent() which is responsible of 
// reading data from the source (file...) and put them into the event pointed 
// by fEventAddr
//
//  The return value is:
//      kDsOk --------> no error.
//      kDsEndFile ---> file's end.
//      kDsEndData ---> data's end.
//      kDsError -----> error.
//
//  Another important method is init(). In this method the data source must
// setup all what it needs to run (get pointers to the target categories, and 
// if the returned pointer is NULL, create those categories ...).
//
//
//  Within the whole framework, the data sources (classes inherited from
// HDataSource) are the responsible for reading the event's data before its
// proccessing.
////////////////////////////////

ClassImp(HDataSource)

void HDataSource::setEventAddress(HEvent **ev) {
  // Used to give the data source the address of the event it must fill in
  // Input:
  //  ev --> Address of a pointer to the event that will be filled in by the 
  //         data source
   fEventAddr=ev;
}

EDsState HDataSource::skipEvents(Int_t n) {
  enum EDsState state = kDsOk;
  for (Int_t i=0; i<n; i++) {
    (*fEventAddr)->Clear();
    state = getNextEvent(kFALSE);
    if (state == kDsEndData || state == kDsError) break;
  }
  return state;
}






 hdatasource.cc:1
 hdatasource.cc:2
 hdatasource.cc:3
 hdatasource.cc:4
 hdatasource.cc:5
 hdatasource.cc:6
 hdatasource.cc:7
 hdatasource.cc:8
 hdatasource.cc:9
 hdatasource.cc:10
 hdatasource.cc:11
 hdatasource.cc:12
 hdatasource.cc:13
 hdatasource.cc:14
 hdatasource.cc:15
 hdatasource.cc:16
 hdatasource.cc:17
 hdatasource.cc:18
 hdatasource.cc:19
 hdatasource.cc:20
 hdatasource.cc:21
 hdatasource.cc:22
 hdatasource.cc:23
 hdatasource.cc:24
 hdatasource.cc:25
 hdatasource.cc:26
 hdatasource.cc:27
 hdatasource.cc:28
 hdatasource.cc:29
 hdatasource.cc:30
 hdatasource.cc:31
 hdatasource.cc:32
 hdatasource.cc:33
 hdatasource.cc:34
 hdatasource.cc:35
 hdatasource.cc:36
 hdatasource.cc:37
 hdatasource.cc:38
 hdatasource.cc:39
 hdatasource.cc:40
 hdatasource.cc:41
 hdatasource.cc:42
 hdatasource.cc:43
 hdatasource.cc:44
 hdatasource.cc:45
 hdatasource.cc:46
 hdatasource.cc:47
 hdatasource.cc:48
 hdatasource.cc:49
 hdatasource.cc:50
 hdatasource.cc:51
 hdatasource.cc:52
 hdatasource.cc:53
 hdatasource.cc:54
 hdatasource.cc:55
 hdatasource.cc:56
 hdatasource.cc:57
 hdatasource.cc:58
 hdatasource.cc:59
 hdatasource.cc:60