AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpManuStore.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 // $MpId: AliMpManuStore.h,v 1.6 2006/05/24 13:58:16 ivana Exp $
6 
12 
13 #ifndef ALI_MP_MANU_STORE_H
14 #define ALI_MP_MANU_STORE_H
15 
16 #include <TObject.h>
17 
18 #include "AliMpPlaneType.h"
19 #include "AliMpStationType.h"
20 #include "AliMpEncodePair.h"
21 
22 #include <TString.h>
23 #include <TExMap.h>
24 
25 class AliMpDetElement;
26 class AliMpDataStreams;
27 class TString;
28 
29 class AliMpManuStore : public TObject {
30 
31  public:
32  AliMpManuStore(TRootIOCtor* ioCtor);
33  virtual ~AliMpManuStore();
34 
35  // static access method
36  static AliMpManuStore* Instance(Bool_t warn = true);
37  static AliMpManuStore* ReadData(const AliMpDataStreams& dataStreams,
38  Bool_t warn = true);
39 
40  static void SetWarnIfDoublon(Bool_t warn);
41 
42 
43  // methods
44  Bool_t AddManu(Int_t detElemId, Int_t manuId, Int_t serialNb);
45 
46  Int_t NofManus() const;
47  Int_t NofManus(Int_t detElemId) const;
48 
49  Int_t GetManuSerial(Int_t detElemId, Int_t manuId) const;
50  MpPair_t GetDetElemIdManu(Int_t manuSerial) const;
51 
52  private:
53  AliMpManuStore(const AliMpDataStreams& dataStreams);
57  AliMpManuStore(const AliMpManuStore& rhs);
60 
61  // methods
62  Bool_t ReadData(const AliMpDataStreams& dataStreams,
63  const AliMpDetElement* detElement, Int_t& nofManus);
64  Bool_t ReadManuSerial(const AliMpDataStreams& dataStreams);
65 
66  // not yet in use methods
67  void ReplaceManu(Int_t detElemId, Int_t manuId, Int_t serialNb);
68  Bool_t WriteData(const TString& outDir = "data_run_out");
69 
70  // static data members
72  static Bool_t fgWarnIfDoublon;
73 
74  // data members
75  mutable TExMap fManuToSerialNbs;
76  mutable TExMap fSerialNbToManus;
77  mutable TExMap fNofManusInDE;
78  Int_t fNofManus;
79 
80  ClassDef(AliMpManuStore,1) // The manager class for definition of detection element types
81 };
82 
83 // inline functions
84 
85 inline void AliMpManuStore::SetWarnIfDoublon(Bool_t warn)
86 {
88 
89  fgWarnIfDoublon = warn;
90 }
91 
92 
93 #endif //ALI_MP_MANU_STORE_H
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 
static AliMpManuStore * ReadData(const AliMpDataStreams &dataStreams, Bool_t warn=true)
AliMpManuStore()
Not implemented.
TExMap fSerialNbToManus
Map manu serial # to manuId.
TExMap fNofManusInDE
Number of manus with serial nbs in DE.
static AliMpManuStore * Instance(Bool_t warn=true)
Bool_t WriteData(const TString &outDir="data_run_out")
The class defines the electronics properties of detection element.
Int_t fNofManus
Total number of manus.
MpPair_t GetDetElemIdManu(Int_t manuSerial) const
Int_t GetManuSerial(Int_t detElemId, Int_t manuId) const
static Bool_t fgWarnIfDoublon
Option to warn about doublons.
AliMpManuStore & operator=(const AliMpManuStore &rhs)
Not implemented.
The container class for manu serial numbers.
Bool_t ReadManuSerial(const AliMpDataStreams &dataStreams)
Bool_t AddManu(Int_t detElemId, Int_t manuId, Int_t serialNb)
void ReplaceManu(Int_t detElemId, Int_t manuId, Int_t serialNb)
virtual ~AliMpManuStore()
Int_t MpPair_t
static AliMpManuStore * fgInstance
Singleton instance.
Int_t NofManus() const
static void SetWarnIfDoublon(Bool_t warn)
TExMap fManuToSerialNbs
Map from manuId to serial #.
Mapping data streams provider.