1 #ifndef ALIMUONVSTORE_H
2 #define ALIMUONVSTORE_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONVStore
11 /// \brief Base class for MUON data stores.
13 // Author Laurent Aphecetche, Subatech
22 class AliMUONVStore : public TObject
26 virtual ~AliMUONVStore();
28 /// Add an object to the store
29 virtual Bool_t Add(TObject* object) = 0;
31 /// Clear ourselves (i.e. Reset)
32 virtual void Clear(Option_t* opt="") = 0;
34 /// Create an empty copy of this
35 virtual AliMUONVStore* Create() const = 0;
37 /// Create a store from a TTree
38 static AliMUONVStore* Create(TTree& tree, const char* what);
40 /// Return an iterator to loop over the whole store
41 virtual TIterator* CreateIterator() const = 0;
43 /// Whether the Connect(TTree&) method is implemented
44 virtual Bool_t CanConnect() const = 0;
46 /// Connect us to a TTree (only valid if CanConnect()==kTRUE)
47 virtual Bool_t Connect(TTree& tree, Bool_t alone=kTRUE) const;
49 /// Find an object by name
50 virtual TObject* FindObject(const char* name) const;
53 virtual TObject* FindObject(const TObject* object) const;
55 /// Find an object using a single id
56 virtual TObject* FindObject(UInt_t uniqueID) const;
58 /// Find an object using 2 ids
59 virtual TObject* FindObject(Int_t i, Int_t j) const;
61 /// The number of objects stored
62 virtual Int_t GetSize() const = 0;
64 /// The number of objects stored for firstid=i. Not implemented by default.
65 virtual Int_t GetSize(Int_t i) const;
67 /// Whether we are empty or not
68 virtual Bool_t IsEmpty() const { return GetSize() == 0; }
70 /// Print all objects whose name matches wildcard
71 virtual void Print(Option_t* wildcard="") const;
73 /// Print, with option, all objects whose name matches wildcard
74 virtual void Print(Option_t* wildcard, Option_t* opt) const;
76 ClassDef(AliMUONVStore,1) // Base class for a MUON data store