]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDSaxHandler.h
Removal of old raw reader calls (Raphaelle)
[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
18 #include "TObject.h"
19 #include "Cal/AliTRDCalDCSGTUCtpOpc.h"
20 #include "Cal/AliTRDCalDCSGTUBoardInfo.h"
21 #include "Cal/AliTRDCalDCSGTUSegment.h"
22 #include "Cal/AliTRDCalDCSGTUTmu.h" 
23
24 class TObjArray;
25 class AliTRDCalDCS;
26 class AliTRDCalDCSFEE;
27 class AliTRDCalDCSPTR;
28 class AliTRDCalDCSGTU;
29
30
31 class AliTRDSaxHandler : public TObject {
32
33 public:
34   enum { 
35     kInsideFEE = 1, 
36     kInsidePTR = 2,
37     kInsideGTU = 3 
38   }; // System level
39   enum { 
40     kInsideTgu = -1,
41     kInsideNone = -2,
42     kInsideSegment = -3,
43     kInsideGainTable = -4 
44   }; // The level under system (1)
45   enum { 
46     kInsideTmu = 10,
47     kInsideSmu = 11 
48   }; // The level under that   (2)
49
50   AliTRDSaxHandler();
51   AliTRDSaxHandler(const AliTRDSaxHandler &sh);
52   virtual ~AliTRDSaxHandler();
53   AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh);
54
55   TObjArray*    GetDCSFEEDataArray() const { return fFEEArr;        }
56   TObjArray*    GetDCSPTRDataArray() const { return fPTRArr;        }
57   AliTRDCalDCS* GetCalDCSObj(); // to be called by the preprocessor
58
59   Int_t         GetHandlerStatus() const { return fHandlerStatus; }
60
61   // functions for all possible events
62   void          OnStartDocument() const;
63   void          OnEndDocument() const;
64   void          OnStartElement(const char *name, const TList *attributes);
65   void          OnEndElement(const char *name);
66   void          OnCharacters(const char *name);
67   void          OnComment(const char *name) const;
68   void          OnWarning(const char *name);
69   void          OnError(const char *name);
70   void          OnFatalError(const char *name);
71   void          OnCdataBlock(const char *name, Int_t len) const;
72
73  private:
74
75   bool           CompareString(TString str, const char *str2); 
76
77   Int_t            fHandlerStatus;      // 0: everything OK, >0: error
78   Int_t            fNDCSPTR;            // number of current PTR unit (to be abandonned soon)
79   Int_t            fNDCSGTU;            // number of current GTU unit (to be abandonned soon)
80   TObjArray*       fFEEArr;             // array of AliTRDCalDCSFEE objects
81   TObjArray*       fPTRArr;             // array of AliTRDCalDCSPTR objects
82 //   TObjArray*       fGTUArr;        // array of AliTRDCalDCSGTU objects
83   Int_t            fSystem;             // current system (FEE/PTR/GTU) (while parsing)
84   Int_t            fInsideRstate;       // if we are inside rstate (while parsing)
85   Int_t            fCurrentSM;          // current supermodule (while parsing)
86   Int_t            fCurrentStack;       // current stack (while parsing)
87   Int_t            fCurrentROB;         // current ROB (while parsing)
88   Int_t            fCurrentMCM;         // current MCM (while parsing)
89   Int_t            fCurrentADC;         // current ADC (while parsing)
90   TString          fContent;            // content of the xml element (text)
91   AliTRDCalDCSFEE* fDCSFEEObj;          // the calib object for one FEE DCS board
92   AliTRDCalDCSPTR* fDCSPTRObj;          // the calib object for one PTR DCS board
93   AliTRDCalDCSGTU* fDCSGTUObj;          // the calib object for one GTU DCS board
94   AliTRDCalDCS*    fCalDCSObj;          // the complete calib obj containing all info
95   Int_t            fLevel1Tag;          // 1st level in XML (while parsing)
96   Int_t            fLevel2Tag;          // 2nd level in XML (while parsing)
97   Bool_t           fInsideBoardInfo;    // if we are inside BoardInfo (while parsing)
98
99   AliTRDCalDCSGTUTmu*       fTmu;       // GTU calibration data: pattern generator
100   AliTRDCalDCSGTUCtpOpc*    fCtpOpc;    // GTU calibration data: OPC
101   AliTRDCalDCSGTUSegment*   fSegment;   // GTU calibration data: SMU tracklets/tracks/triggers
102   AliTRDCalDCSGTUBoardInfo* fBoardInfo; // GTU calibration data: hard-/software and type
103   
104
105   ClassDef(AliTRDSaxHandler,2);         // The XML file handler for the preprocessor
106 };
107 #endif
108