]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpManuStore.h
Fixed compiler warnings:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpManuStore.h
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
7 /// \ingroup management
8 /// \class AliMpManuStore
9 /// \brief The container class for manu serial numbers
10 ///
11 /// \author Ivana Hrivnacova, IPN Orsay; Christian Finck, SUBATECH Nantes
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);
54      /// Not implemented
55     AliMpManuStore();
56      /// Not implemented
57     AliMpManuStore(const AliMpManuStore& rhs);
58     /// Not implemented
59     AliMpManuStore& operator=(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      
71     static AliMpManuStore* fgInstance;      ///< Singleton instance
72     static Bool_t          fgWarnIfDoublon; ///< Option to warn about doublons
73
74     // data members     
75     mutable TExMap fManuToSerialNbs; ///< Map from manuId to serial #   
76     mutable TExMap fSerialNbToManus; ///< Map manu serial # to manuId
77     mutable TExMap fNofManusInDE;    ///< Number of manus with serial nbs in DE
78     Int_t          fNofManus;        ///< Total number of manus
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
87 /// Set option to warn if the same serial number is present for more manus
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