]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDSaxHandler.h
Avoiding warnings
[u/mrichter/AliRoot.git] / TRD / AliTRDSaxHandler.h
1 #ifndef ALITRDSAXHANDLER_H
2 #define ALITRDSAXHANDLER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * * See cxx source for full Copyright notice */
5
6 /* $Id: AliTRDSaxHandler.h 26327 2008-06-02 15:36:18Z cblume $ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  The SAX XML file handler used in the preprocessor                     //
11 //                                                                        //
12 //  Author:                                                               //
13 //    Frederick Kramer (kramer@ikf.uni-frankfurt.de)                      //
14 //                                                                        //
15 ////////////////////////////////////////////////////////////////////////////
16
17 #include "TObject.h"
18 #include "Cal/AliTRDCalDCSGTUCtpOpc.h"
19 #include "Cal/AliTRDCalDCSGTUBoardInfo.h"
20 #include "Cal/AliTRDCalDCSGTUSegment.h"
21 #include "Cal/AliTRDCalDCSGTUTmu.h"
22
23 class TObjArray;
24
25 class AliTRDCalDCS;
26 class AliTRDCalDCSFEE;
27 class AliTRDCalDCSPTR;
28 class AliTRDCalDCSGTU;
29
30 class AliTRDSaxHandler : public TObject {
31
32 public:
33   enum { 
34     kInsideFEE = 1, 
35     kInsidePTR = 2,
36     kInsideGTU = 3 
37   }; // System level
38   enum { 
39     kInsideTgu = -1,
40     kInsideNone = -2,
41     kInsideSegment = -3,
42     kInsideGainTable = -4 
43   }; // The level under system (1)
44   enum { 
45     kInsideTmu = 10,
46     kInsideSmu = 11 
47   }; // The level under that   (2)
48
49   AliTRDSaxHandler();
50   AliTRDSaxHandler(const AliTRDSaxHandler &sh);
51   virtual ~AliTRDSaxHandler();
52   AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh);
53
54   TObjArray*    GetDCSFEEDataArray() const { return fFEEArr;        }
55   TObjArray*    GetDCSPTRDataArray() const { return fPTRArr;        }
56   AliTRDCalDCS* GetCalDCSObj(); // to be called by the preprocessor
57
58   Int_t         GetHandlerStatus() const { return fHandlerStatus; }
59
60   // functions for all possible events
61   void          OnStartDocument();
62   void          OnEndDocument();
63   void          OnStartElement(const char *name, const TList *attributes);
64   void          OnEndElement(const char *name);
65   void          OnCharacters(const char *name);
66   void          OnComment(const char *name);
67   void          OnWarning(const char *name);
68   void          OnError(const char *name);
69   void          OnFatalError(const char *name);
70   void          OnCdataBlock(const char *name, Int_t len);
71
72  private:
73
74   bool           CompareString(TString str, const char *str2); 
75
76   Int_t            fHandlerStatus; // 0: everything OK, >0: error
77   Int_t            fNDCSPTR;       // number of current PTR unit (to be abandonned soon)
78   Int_t            fNDCSGTU;       // number of current GTU unit (to be abandonned soon)
79   TObjArray*       fFEEArr;        // array of AliTRDCalDCSFEE objects
80   TObjArray*       fPTRArr;        // array of AliTRDCalDCSPTR objects
81 //   TObjArray*       fGTUArr;        // array of AliTRDCalDCSGTU objects
82   Int_t            fSystem;        // current system (FEE/PTR/GTU)
83   Int_t            fInsideRstate;  // if we are inside rstate
84   Int_t            fCurrentSM;     // current supermodule
85   Int_t            fCurrentStack;  // current stack
86   Int_t            fCurrentROB;    // current ROB during processing
87   Int_t            fCurrentMCM;    // current MCM
88   Int_t            fCurrentADC;    // current ADC
89   TString          fContent;       // content of the xml element (text) 
90   AliTRDCalDCSFEE* fDCSFEEObj;     // the calib object for one FEE DCS board
91   AliTRDCalDCSPTR* fDCSPTRObj;     // the calib object for one PTR DCS board
92   AliTRDCalDCSGTU* fDCSGTUObj;     // the calib object for one GTU DCS board
93   AliTRDCalDCS*    fCalDCSObj;     // the complete calib obj containing all inform.
94   Int_t            fLevel1Tag;        // 
95   Int_t            fLevel2Tag;        // 
96   Bool_t           fInsideBoardInfo;
97
98   AliTRDCalDCSGTUTmu*       fTmu;
99   AliTRDCalDCSGTUCtpOpc*    fCtpOpc;
100   AliTRDCalDCSGTUSegment*   fSegment;
101   AliTRDCalDCSGTUBoardInfo* fBoardInfo;
102   
103
104   ClassDef(AliTRDSaxHandler,2);    // The XML file handler for the preprocessor
105 };
106 #endif
107