]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDSaxHandler.h
Additional protection in the destructor: when you have a chain of calls returning...
[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
19 class TObjArray;
20
21 class AliTRDCalDCS;
22 class AliTRDCalDCSFEE;
23 class AliTRDCalDCSPTR;
24 class AliTRDCalDCSGTU;
25
26 class AliTRDSaxHandler : public TObject {
27
28 public:
29   enum { kInsideFEE = 1, kInsidePTR = 2, kInsideGTU = 3 };
30
31   AliTRDSaxHandler();
32   AliTRDSaxHandler(const AliTRDSaxHandler &sh);
33   virtual ~AliTRDSaxHandler();
34   AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh);
35
36   TObjArray*    GetDCSFEEDataArray()  { return fFEEArr;        }
37   TObjArray*    GetDCSPTRDataArray()  { return fPTRArr;        }
38   TObjArray*    GetDCSGTUDataArray()  { return fGTUArr;        }
39   AliTRDCalDCS* GetCalDCSObj(); // to be called by the preprocessor
40
41   Int_t         GetHandlerStatus() const { return fHandlerStatus; }
42
43   // functions for all possible events
44   void          OnStartDocument();
45   void          OnEndDocument();
46   void          OnStartElement(const char *name, const TList *attributes);
47   void          OnEndElement(const char *name);
48   void          OnCharacters(const char *name);
49   void          OnComment(const char *name);
50   void          OnWarning(const char *name);
51   void          OnError(const char *name);
52   void          OnFatalError(const char *name);
53   void          OnCdataBlock(const char *name, Int_t len);
54
55  private:
56
57   Int_t            fHandlerStatus; // 0: everything OK, >0: error
58   Int_t            fNDCSPTR;       // number of current PTR unit (to be abandonned soon)
59   Int_t            fNDCSGTU;       // number of current GTU unit (to be abandonned soon)
60   TObjArray*       fFEEArr;        // array of AliTRDCalDCSFEE objects
61   TObjArray*       fPTRArr;        // array of AliTRDCalDCSPTR objects
62   TObjArray*       fGTUArr;        // array of AliTRDCalDCSGTU objects
63   Int_t            fSystem;        // current system (FEE/PTR/GTU)
64   Int_t            fCurrentSM;     // current supermodule
65   Int_t            fCurrentStack;  // current stack
66   TString          fContent;       // content of the xml element (text) 
67   AliTRDCalDCSFEE* fDCSFEEObj;     // the calib object for one FEE DCS board
68   AliTRDCalDCSPTR* fDCSPTRObj;     // the calib object for one PTR DCS board
69   AliTRDCalDCSGTU* fDCSGTUObj;     // the calib object for one GTU DCS board
70   AliTRDCalDCS*    fCalDCSObj;     // the complete calib obj containing all inform.
71
72   ClassDef(AliTRDSaxHandler,1);    // The XML file handler for the preprocessor
73
74 };
75 #endif