#include <TString.h>
#include <TList.h>
#include <TCollection.h>
-#include "TSAXParser.h"
+//#include <TSAXParser.h>
#include "AliCDBMetaData.h"
#include "AliLog.h"
#include "AliTRDCalibraFit.h"
#include "AliTRDCalibraMode.h"
#include "AliTRDCalibPadStatus.h"
-#include "AliTRDSaxHandler.h"
+//#include "AliTRDSaxHandler.h"
+
#include "Cal/AliTRDCalDet.h"
#include "Cal/AliTRDCalPadStatus.h"
#include "Cal/AliTRDCalDCS.h"
Log(Form("File %s not found!",nameFile));
}
- // create parser and parse
- TSAXParser saxParser;
- AliTRDSaxHandler saxHandler;
- saxParser.ConnectToHandler("AliTRDSaxHandler", &saxHandler);
- saxParser.ParseFile(nameFile);
-
- // report errors if present
- if (saxParser.GetParseCode() == 0) {
- Log("XML file validation OK");
- } else {
- Log(Form("ERROR in XML file validation. Parsecode: %s", saxParser.GetParseCode()));
- return 6;
- }
- if (saxHandler.GetHandlerStatus() != 0) {
- Log(Form("ERROR while creating calibration objects. Error code: %s", saxHandler.GetHandlerStatus()));
- return 7;
- }
-
- // get the calibration object storing the data from the handler
- AliTRDCalDCS* fCalDCSObj = saxHandler.GetCalDCSObj();
-
- // store the DCS calib data in the CDB
- AliCDBMetaData metaData1;
- metaData1.SetBeamPeriod(0);
- metaData1.SetResponsible("Frederick Kramer");
- metaData1.SetComment("DCS configuration data in one AliTRDCalDCS object.");
- if (!Store("Calib", "DCSCONFIG", fCalDCSObj, &metaData1, 0, kTRUE)) {
- Log("problems while storing DCS config data object");
- return 8;
- }
+// // create parser and parse
+// TSAXParser saxParser;
+// AliTRDSaxHandler saxHandler;
+// saxParser.ConnectToHandler("AliTRDSaxHandler", &saxHandler);
+// saxParser.ParseFile(nameFile);
+
+// // report errors if present
+// if (saxParser.GetParseCode() == 0) {
+// Log("XML file validation OK");
+// } else {
+// Log(Form("ERROR in XML file validation. Parsecode: %s", saxParser.GetParseCode()));
+// return 6;
+// }
+// if (saxHandler.GetHandlerStatus() != 0) {
+// Log(Form("ERROR while creating calibration objects. Error code: %s", saxHandler.GetHandlerStatus()));
+// return 7;
+// }
+
+// // get the calibration object storing the data from the handler
+// AliTRDCalDCS* fCalDCSObj = saxHandler.GetCalDCSObj();
+
+// // store the DCS calib data in the CDB
+// AliCDBMetaData metaData1;
+// metaData1.SetBeamPeriod(0);
+// metaData1.SetResponsible("Frederick Kramer");
+// metaData1.SetComment("DCS configuration data in one AliTRDCalDCS object.");
+// if (!Store("Calib", "DCSCONFIG", fCalDCSObj, &metaData1, 0, kTRUE)) {
+// Log("problems while storing DCS config data object");
+// return 8;
+// }
return 0;
}
// //
// The SAX XML file handler used in the preprocessor //
// //
-// Authors: //
+// Author: //
// Frederick Kramer (kramer@ikf.uni-frankfurt.de) //
// //
////////////////////////////////////////////////////////////////////////////
#include <Riostream.h>
#include <TList.h>
#include <TObjArray.h>
-#include <TXMLParser.h>
-#include <TSAXParser.h>
-#include "AliTRDSaxHandler.h"
#include <TXMLAttr.h>
+#include <TObject.h>
+
+#include "AliLog.h"
+
+#include "AliTRDSaxHandler.h"
+#include "AliTRDgeometry.h"
+
#include "Cal/AliTRDCalDCS.h"
#include "Cal/AliTRDCalDCSFEE.h"
#include "Cal/AliTRDCalDCSPTR.h"
#include "Cal/AliTRDCalDCSGTU.h"
-#include "AliTRDgeometry.h"
-#include <AliLog.h>
-
ClassImp(AliTRDSaxHandler)
-
-
//_____________________________________________________________________________
AliTRDSaxHandler::AliTRDSaxHandler()
:TObject()
}
//_____________________________________________________________________________
-void AliTRDSaxHandler::OnFatalError(const char *text)
+vois AliTRDSaxHandler::OnFatalError(const char *text)
{
// process fatal errors here
AliError(Form("Fatal error: %s",text)); // use AliFatal?
-#ifndef AliTRDSaxHandler_H
-#define AliTRDSaxHandler_H
-
+#ifndef AliTRDSAXHANDLER_H
+#define AliTRDSAXHANDLER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* * See cxx source for full Copyright notice */
-/* $Id$ */
+/* $Id: AliTRDSaxHandler.h 26327 2008-06-02 15:36:18Z cblume $ */
+
+////////////////////////////////////////////////////////////////////////////
+// //
+// The SAX XML file handler used in the preprocessor //
+// //
+// Author: //
+// Frederick Kramer (kramer@ikf.uni-frankfurt.de) //
+// //
+////////////////////////////////////////////////////////////////////////////
#include "TObject.h"
-#include "Cal/AliTRDCalDCS.h"
-#include "Cal/AliTRDCalDCSFEE.h"
-#include "Cal/AliTRDCalDCSPTR.h"
-#include "Cal/AliTRDCalDCSGTU.h"
-#include <TObjArray.h>
-#include <TList.h>
+class TObjArray;
+
+class AliTRDCalDCS;
+class AliTRDCalDCSFEE;
+class AliTRDCalDCSPTR;
+class AliTRDCalDCSGTU;
class AliTRDSaxHandler : public TObject {
+
public:
enum { kInsideFEE = 1, kInsidePTR = 2, kInsideGTU = 3 };
void OnFatalError(const char *name);
void OnCdataBlock(const char *name, Int_t len);
-private:
+ private:
Int_t fHandlerStatus; // 0: everything OK, >0: error
Int_t fNDCSPTR; // number of current PTR unit (to be abandonned soon)
AliTRDCalDCSGTU* fDCSGTUObj; // the calib object for one GTU DCS board
AliTRDCalDCS* fCalDCSObj; // the complete calib obj containing all inform.
- ClassDef(AliTRDSaxHandler,1);
+ ClassDef(AliTRDSaxHandler,1); // The XML file handler for the preprocessor
+
};
#endif