New class. Container of trigger crates from CRATE.TXT
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerCrateStore.h
CommitLineData
30dd09e2 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 sim
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
19class AliMUONLocalTriggerBoard;
20class AliMUONTriggerCrate;
21class AliMpExMap;
22class TExMapIter;
23
24class AliMUONTriggerCrateStore : public TObject
25{
26public:
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 = "$ALICE_ROOT/MUON/data/CRATE.TXT");
41
42private:
43 void AddCrate(const char* crateName);
44
45private:
46 AliMpExMap* fCrates; // list of crates
47 AliMpExMap* fLocalBoards; // local boards (indexed by their number)
48 TExMapIter* fCrateIterator; //! iterator for the crate map above
49 TExMapIter* fLBIterator; //! iterator for boards (through crates)
50 AliMUONTriggerCrate* fCurrentCrate; //! used for iterating on local board
51 Int_t fCurrentLocalBoard; //! used for iterating on local board
52
53 ClassDef(AliMUONTriggerCrateStore,1) // Reader for CRATE.TXT file
54};
55
56#endif