TOF + macros to each detector folder
[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
389a42fd 17
5b7ccf04 18#include <TObject.h>
3821ce70 19#include "Cal/AliTRDCalDCSGTUCtpOpc.h"
20#include "Cal/AliTRDCalDCSGTUBoardInfo.h"
21#include "Cal/AliTRDCalDCSGTUSegment.h"
389a42fd 22#include "Cal/AliTRDCalDCSGTUTmu.h"
197b835e 23
3d8c1d84 24class TObjArray;
d6a1ec13 25class AliTRDCalDCSv2;
26class AliTRDCalDCSFEEv2;
3d8c1d84 27class AliTRDCalDCSPTR;
28class AliTRDCalDCSGTU;
197b835e 29
389a42fd 30
197b835e 31class AliTRDSaxHandler : public TObject {
3d8c1d84 32
197b835e 33public:
3821ce70 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)
197b835e 49
50 AliTRDSaxHandler();
51 AliTRDSaxHandler(const AliTRDSaxHandler &sh);
52 virtual ~AliTRDSaxHandler();
53 AliTRDSaxHandler &operator=(const AliTRDSaxHandler &sh);
54
d6a1ec13 55 TObjArray* GetDCSFEEDataArray() const { return fFEEArr; }
56 TObjArray* GetDCSPTRDataArray() const { return fPTRArr; }
57 AliTRDCalDCSv2* GetCalDCSObj(); // to be called by the preprocessor
5b7ccf04 58 void ParseConfigName(TString cfgname) const;
59
197b835e 60
d6a1ec13 61 Int_t GetHandlerStatus() const { return fHandlerStatus; }
197b835e 62
63 // functions for all possible events
d6a1ec13 64 void OnStartDocument() const;
65 void OnEndDocument() const;
66 void OnStartElement(const char *name, const TList *attributes);
67 void OnEndElement(const char *name);
68 void OnCharacters(const char *name);
69 void OnComment(const char *name) const;
70 void OnWarning(const char *name);
71 void OnError(const char *name);
72 void OnFatalError(const char *name);
73 void OnCdataBlock(const char *name, Int_t len) const;
197b835e 74
3d8c1d84 75 private:
197b835e 76
d6a1ec13 77 bool CompareString(TString str, const char *str2);
78
79 Int_t fHandlerStatus; // 0: everything OK, >0: error
80 Int_t fNDCSPTR; // number of current PTR unit (to be abandonned soon)
81 Int_t fNDCSGTU; // number of current GTU unit (to be abandonned soon)
82 TObjArray* fFEEArr; // array of AliTRDCalDCSFEEv2 objects
83 TObjArray* fPTRArr; // array of AliTRDCalDCSPTR objects
84 // TObjArray* fGTUArr; // array of AliTRDCalDCSGTU objects
85 Int_t fSystem; // current system (FEE/PTR/GTU) (while parsing)
86 Int_t fInsideRstate; // if we are inside rstate (while parsing)
87 Int_t fCurrentSM; // current supermodule (while parsing)
88 Int_t fCurrentStack; // current stack (while parsing)
89 Int_t fCurrentROB; // current ROB (while parsing)
90 Int_t fCurrentMCM; // current MCM (while parsing)
91 Int_t fCurrentADC; // current ADC (while parsing)
92 TString fContent; // content of the xml element (text)
93 AliTRDCalDCSFEEv2* fDCSFEEObj; // the calib object for one FEE DCS board
94 AliTRDCalDCSPTR* fDCSPTRObj; // the calib object for one PTR DCS board
95 AliTRDCalDCSGTU* fDCSGTUObj; // the calib object for one GTU DCS board
96 AliTRDCalDCSv2* fCalDCSObj; // the complete calib obj containing all info
97 Int_t fLevel1Tag; // 1st level in XML (while parsing)
98 Int_t fLevel2Tag; // 2nd level in XML (while parsing)
99 Bool_t fInsideBoardInfo; // if we are inside BoardInfo (while parsing)
389a42fd 100
101 AliTRDCalDCSGTUTmu* fTmu; // GTU calibration data: pattern generator
102 AliTRDCalDCSGTUCtpOpc* fCtpOpc; // GTU calibration data: OPC
103 AliTRDCalDCSGTUSegment* fSegment; // GTU calibration data: SMU tracklets/tracks/triggers
104 AliTRDCalDCSGTUBoardInfo* fBoardInfo; // GTU calibration data: hard-/software and type
197b835e 105
d6a1ec13 106 ClassDef(AliTRDSaxHandler,3); // The XML file handler for the preprocessor
197b835e 107};
108#endif
6af58a56 109