]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDataManager.h
Managed the 234 local boards inside the class & simplified the code
[u/mrichter/AliRoot.git] / MUON / AliMUONDataManager.h
1 #ifndef ALIMUONDATAMANAGER_H
2 #define ALIMUONDATAMANAGER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup base
10 /// \class AliMUONDataManager
11 /// \brief Utility class to ease access to data stores.
12 /// 
13 // Author Laurent Aphecetche
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18
19 class AliLoader;
20 class AliMUONVStore;
21 class TTree;
22
23 class AliMUONDataManager : public TObject
24 {
25 public:
26
27   AliMUONDataManager(const char* file="galice.root");
28   virtual ~AliMUONDataManager();
29
30   AliMUONVStore* ReadConnectable(Int_t event, const char* tree, const char* what);
31
32   /// Whether we were properly initialized or not
33   Bool_t IsValid() const { return fIsValid; }
34   
35   Int_t NumberOfEvents() const;
36   
37   Int_t Load(Int_t event);
38   void Load(const char* tree);
39   TTree* Tree(const char* tree);
40   void Unload(const char* tree);
41   
42 private:
43   /// Not implemented
44   AliMUONDataManager(const AliMUONDataManager&);
45   /// Not implemented
46   AliMUONDataManager& operator=(const AliMUONDataManager&);
47   
48   AliLoader* fLoader; //!< Our loader to access trees
49   Int_t fCurrentEvent; //!< Current loaded event
50   Bool_t fIsValid; //!< Whether we were properly initialized or not
51   static Int_t fgCount; //!< instance counter to be able to build a unique folder name
52   
53   ClassDef(AliMUONDataManager,0) // Utility class to ease data store access
54 };
55
56 #endif