]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDSaxHandler.h
Modifications by Thomas
[u/mrichter/AliRoot.git] / TRD / AliTRDSaxHandler.h
CommitLineData
c893147d 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"
3821ce70 18#include "Cal/AliTRDCalDCSGTUCtpOpc.h"
19#include "Cal/AliTRDCalDCSGTUBoardInfo.h"
20#include "Cal/AliTRDCalDCSGTUSegment.h"
21#include "Cal/AliTRDCalDCSGTUTmu.h"
197b835e 22
3d8c1d84 23class TObjArray;
24
25class AliTRDCalDCS;
26class AliTRDCalDCSFEE;
27class AliTRDCalDCSPTR;
28class AliTRDCalDCSGTU;
197b835e 29
30class AliTRDSaxHandler : public TObject {
3d8c1d84 31
197b835e 32public:
3821ce70 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)
197b835e 48
49 AliTRDSaxHandler();
50 AliTRDSaxHandler(const AliTRDSaxHandler &sh);
51 virtual ~AliTRDSaxHandler();
52 AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh);
53
c893147d 54 TObjArray* GetDCSFEEDataArray() const { return fFEEArr; }
55 TObjArray* GetDCSPTRDataArray() const { return fPTRArr; }
197b835e 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
3d8c1d84 72 private:
197b835e 73
3821ce70 74 bool CompareString(TString str, const char *str2);
75
197b835e 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
3821ce70 81// TObjArray* fGTUArr; // array of AliTRDCalDCSGTU objects
197b835e 82 Int_t fSystem; // current system (FEE/PTR/GTU)
6af58a56 83 Int_t fInsideRstate; // if we are inside rstate
197b835e 84 Int_t fCurrentSM; // current supermodule
85 Int_t fCurrentStack; // current stack
6af58a56 86 Int_t fCurrentROB; // current ROB during processing
87 Int_t fCurrentMCM; // current MCM
3821ce70 88 Int_t fCurrentADC; // current ADC
197b835e 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.
3821ce70 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
197b835e 103
6af58a56 104 ClassDef(AliTRDSaxHandler,2); // The XML file handler for the preprocessor
197b835e 105};
106#endif
6af58a56 107