]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTriggerCrateStore.h
Functionality restored and adapted to default and new trigger code
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerCrateStore.h
1 #ifndef ALIMUONTRIGGERCRATESTORE_H
2 #define ALIMUONTRIGGERCRATESTORE_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 AliMUONTriggerCrateStore
11 /// \brief A container for AliMUONTriggerCrate objects.
12 /// 
13 //  Author Laurent Aphecetche
14
15 #ifndef ROOT_TObject
16 #  include "TObject.h"
17 #endif
18
19 class AliMUONLocalTriggerBoard;
20 class AliMUONTriggerCrate;
21 class AliMpExMap;
22 class TExMapIter;
23
24 class AliMUONTriggerCrateStore : public TObject
25 {
26 public:
27   AliMUONTriggerCrateStore();
28   virtual ~AliMUONTriggerCrateStore();
29   
30   Int_t NumberOfCrates() const;
31   void FirstCrate();
32   AliMUONTriggerCrate* NextCrate();
33   AliMUONTriggerCrate* Crate(const char* crateName) const;
34   
35   Int_t NumberOfLocalBoards() const;
36   void FirstLocalBoard();
37   AliMUONLocalTriggerBoard* NextLocalBoard();
38   AliMUONLocalTriggerBoard* LocalBoard(Int_t boardNumber) const;
39   
40   void ReadFromFile(const char* crateFile =
41                     "$ALICE_ROOT/MUON/mapping/data/stationTrigger/crate.dat");
42
43 protected:
44   AliMUONTriggerCrateStore(const AliMUONTriggerCrateStore& rhs);
45   AliMUONTriggerCrateStore& operator = (const AliMUONTriggerCrateStore& rhs);
46
47 private:
48   void AddCrate(const char* crateName); 
49   
50 private:
51   AliMpExMap* fCrates; ///< list of crates
52   AliMpExMap* fLocalBoards; ///< local boards (indexed by their number)
53   TExMapIter* fCrateIterator; //!< iterator for the crate map above
54   TExMapIter* fLBIterator; //!< iterator for boards (through crates)
55   AliMUONTriggerCrate* fCurrentCrate; //!< used for iterating on local board
56   Int_t fCurrentLocalBoard; //!< used for iterating on local board
57
58   ClassDef(AliMUONTriggerCrateStore,1) // Reader for CRATE.TXT file
59 };
60
61 #endif