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 */
6 /* $Id: AliTRDSaxHandler.h 26327 2008-06-02 15:36:18Z cblume $ */
8 ////////////////////////////////////////////////////////////////////////////
10 // The SAX XML file handler used in the preprocessor //
13 // Frederick Kramer (kramer@ikf.uni-frankfurt.de) //
15 ////////////////////////////////////////////////////////////////////////////
22 class AliTRDCalDCSFEE;
23 class AliTRDCalDCSPTR;
24 class AliTRDCalDCSGTU;
26 class AliTRDSaxHandler : public TObject {
29 enum { kInsideFEE = 1, kInsidePTR = 2, kInsideGTU = 3 };
32 AliTRDSaxHandler(const AliTRDSaxHandler &sh);
33 virtual ~AliTRDSaxHandler();
34 AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh);
36 TObjArray* GetDCSFEEDataArray() { return fFEEArr; }
37 TObjArray* GetDCSPTRDataArray() { return fPTRArr; }
38 TObjArray* GetDCSGTUDataArray() { return fGTUArr; }
39 AliTRDCalDCS* GetCalDCSObj(); // to be called by the preprocessor
41 Int_t GetHandlerStatus() const { return fHandlerStatus; }
43 // functions for all possible events
44 void OnStartDocument();
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);
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 fInsideRstate; // if we are inside rstate
65 Int_t fCurrentSM; // current supermodule
66 Int_t fCurrentStack; // current stack
67 Int_t fCurrentROB; // current ROB during processing
68 Int_t fCurrentMCM; // current MCM
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.
75 ClassDef(AliTRDSaxHandler,2); // The XML file handler for the preprocessor