ROOT logo
#ifndef ALIMUONVSTORE_H
#define ALIMUONVSTORE_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice                               */

// $Id$

/// \ingroup core
/// \class AliMUONVStore
/// \brief Base class for MUON data stores.
/// 
// Author Laurent Aphecetche, Subatech

#ifndef ROOT_TObject
#  include "TObject.h"
#endif

class TIterator;
class TTree;

class AliMUONVStore : public TObject
{
public:
  AliMUONVStore();
  virtual ~AliMUONVStore();
  
  /// Add an object to the store
  virtual Bool_t Add(TObject* object) = 0;
  
  /// Clear ourselves (i.e. Reset)
  virtual void Clear(Option_t* opt="") = 0;
  
  /// Create an empty copy of this
  virtual AliMUONVStore* Create() const = 0;

  /// Create a store from a TTree
  static AliMUONVStore* Create(TTree& tree, const char* what);

  /// Return an iterator to loop over the whole store
  virtual TIterator* CreateIterator() const = 0;
  
  /// Whether the Connect(TTree&) method is implemented
  virtual Bool_t CanConnect() const = 0;
  
  /// Connect us to a TTree (only valid if CanConnect()==kTRUE)
  virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const;

  /// Find an object by name
  virtual TObject* FindObject(const char* name) const;
  
  /// Find an object
  virtual TObject* FindObject(const TObject* object) const;

  /// Find an object using a single id
	virtual TObject* FindObject(UInt_t uniqueID) const;
  
  /// Find an object using 2 ids
  virtual TObject* FindObject(Int_t i, Int_t j) const;
  
  /// The number of objects stored
  virtual Int_t GetSize() const = 0;

  /// The number of objects stored for firstid=i. Not implemented by default.
  virtual Int_t GetSize(Int_t i) const;

  /// Whether we are empty or not
  virtual Bool_t IsEmpty() const { return GetSize() == 0; }
  
  /// Print all objects whose name matches wildcard
  virtual void Print(Option_t* wildcard="") const;

  /// Print, with option, all objects whose name matches wildcard
  virtual void Print(Option_t* wildcard, Option_t* opt) const;
  
  ClassDef(AliMUONVStore,1) // Base class for a MUON data store
};

#endif
 AliMUONVStore.h:1
 AliMUONVStore.h:2
 AliMUONVStore.h:3
 AliMUONVStore.h:4
 AliMUONVStore.h:5
 AliMUONVStore.h:6
 AliMUONVStore.h:7
 AliMUONVStore.h:8
 AliMUONVStore.h:9
 AliMUONVStore.h:10
 AliMUONVStore.h:11
 AliMUONVStore.h:12
 AliMUONVStore.h:13
 AliMUONVStore.h:14
 AliMUONVStore.h:15
 AliMUONVStore.h:16
 AliMUONVStore.h:17
 AliMUONVStore.h:18
 AliMUONVStore.h:19
 AliMUONVStore.h:20
 AliMUONVStore.h:21
 AliMUONVStore.h:22
 AliMUONVStore.h:23
 AliMUONVStore.h:24
 AliMUONVStore.h:25
 AliMUONVStore.h:26
 AliMUONVStore.h:27
 AliMUONVStore.h:28
 AliMUONVStore.h:29
 AliMUONVStore.h:30
 AliMUONVStore.h:31
 AliMUONVStore.h:32
 AliMUONVStore.h:33
 AliMUONVStore.h:34
 AliMUONVStore.h:35
 AliMUONVStore.h:36
 AliMUONVStore.h:37
 AliMUONVStore.h:38
 AliMUONVStore.h:39
 AliMUONVStore.h:40
 AliMUONVStore.h:41
 AliMUONVStore.h:42
 AliMUONVStore.h:43
 AliMUONVStore.h:44
 AliMUONVStore.h:45
 AliMUONVStore.h:46
 AliMUONVStore.h:47
 AliMUONVStore.h:48
 AliMUONVStore.h:49
 AliMUONVStore.h:50
 AliMUONVStore.h:51
 AliMUONVStore.h:52
 AliMUONVStore.h:53
 AliMUONVStore.h:54
 AliMUONVStore.h:55
 AliMUONVStore.h:56
 AliMUONVStore.h:57
 AliMUONVStore.h:58
 AliMUONVStore.h:59
 AliMUONVStore.h:60
 AliMUONVStore.h:61
 AliMUONVStore.h:62
 AliMUONVStore.h:63
 AliMUONVStore.h:64
 AliMUONVStore.h:65
 AliMUONVStore.h:66
 AliMUONVStore.h:67
 AliMUONVStore.h:68
 AliMUONVStore.h:69
 AliMUONVStore.h:70
 AliMUONVStore.h:71
 AliMUONVStore.h:72
 AliMUONVStore.h:73
 AliMUONVStore.h:74
 AliMUONVStore.h:75
 AliMUONVStore.h:76
 AliMUONVStore.h:77
 AliMUONVStore.h:78
 AliMUONVStore.h:79