The present commit corresponds to an important change in the way the
[u/mrichter/AliRoot.git] / TRD / AliTRDSaxHandler.h
CommitLineData
3d8c1d84 1#ifndef AliTRDSAXHANDLER_H
2#define AliTRDSAXHANDLER_H
197b835e 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * * See cxx source for full Copyright notice */
197b835e 5
3d8c1d84 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////////////////////////////////////////////////////////////////////////////
197b835e 16
17#include "TObject.h"
197b835e 18
3d8c1d84 19class TObjArray;
20
21class AliTRDCalDCS;
22class AliTRDCalDCSFEE;
23class AliTRDCalDCSPTR;
24class AliTRDCalDCSGTU;
197b835e 25
26class AliTRDSaxHandler : public TObject {
3d8c1d84 27
197b835e 28public:
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
3d8c1d84 55 private:
197b835e 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)
6af58a56 64 Int_t fInsideRstate; // if we are inside rstate
197b835e 65 Int_t fCurrentSM; // current supermodule
66 Int_t fCurrentStack; // current stack
6af58a56 67 Int_t fCurrentROB; // current ROB during processing
68 Int_t fCurrentMCM; // current MCM
197b835e 69 TString fContent; // content of the xml element (text)
70 AliTRDCalDCSFEE* fDCSFEEObj; // the calib object for one FEE DCS board
71 AliTRDCalDCSPTR* fDCSPTRObj; // the calib object for one PTR DCS board
72 AliTRDCalDCSGTU* fDCSGTUObj; // the calib object for one GTU DCS board
73 AliTRDCalDCS* fCalDCSObj; // the complete calib obj containing all inform.
74
6af58a56 75 ClassDef(AliTRDSaxHandler,2); // The XML file handler for the preprocessor
197b835e 76};
77#endif
6af58a56 78