Take out the XML parser for the time being
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Jun 2008 20:03:50 +0000 (20:03 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Jun 2008 20:03:50 +0000 (20:03 +0000)
TRD/AliTRDPreprocessor.cxx
TRD/AliTRDSaxHandler.cxx
TRD/AliTRDSaxHandler.h
TRD/TRDbaseLinkDef.h
TRD/libTRDbase.pkg

index 9df5084073602d51b82ae7aca2c5cf9aae692b23..7c8a44af69af540d59d9b8290d00e9bcbfb11341 100644 (file)
@@ -38,7 +38,7 @@
 #include <TString.h>
 #include <TList.h>
 #include <TCollection.h>
-#include "TSAXParser.h"
+//#include <TSAXParser.h>
 
 #include "AliCDBMetaData.h"
 #include "AliLog.h"
@@ -48,7 +48,8 @@
 #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"
@@ -709,36 +710,36 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData()
     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;
 }
index 6993104a748fef40c3d086a8da675f2b628c2c8a..2782af21f23a21a93f2da633e04479eb500714fd 100644 (file)
@@ -19,7 +19,7 @@
 //                                                                        //
 //  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()
@@ -281,7 +280,7 @@ void AliTRDSaxHandler::OnError(const char *text)
 }
 
 //_____________________________________________________________________________
-void AliTRDSaxHandler::OnFatalError(const char *text)
+vois AliTRDSaxHandler::OnFatalError(const char *text)
 {
   // process fatal errors here
   AliError(Form("Fatal error: %s",text)); // use AliFatal?
index a16f622c31271319bb197a081a8947d65867f3af..af27018b359f6dad5d1622cea418179e90b261e8 100644 (file)
@@ -1,21 +1,30 @@
-#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 };
 
@@ -43,7 +52,7 @@ public:
   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)
@@ -60,6 +69,7 @@ private:
   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
index c050816e5fe0c9fb326fb722e746eff8b4a4140e..2e78ddea38e6f14ba78a2972a6afef058c39c4b7 100644 (file)
@@ -69,7 +69,6 @@
 #pragma link C++ class  AliTRDCalibPadStatus+;
 
 #pragma link C++ class  AliTRDPreprocessor+;
-#pragma link C++ class  AliTRDSaxHandler+;
 
 #pragma link C++ class  AliTRDDataDCS+;
 #pragma link C++ class  AliTRDSensor+;
index 6e7be5ccf078a46c4e974f1ed8da41a9cee3c70e..b95d8c678545a2eb80b422bd355b0c728489427e 100644 (file)
@@ -47,7 +47,6 @@ SRCS= AliTRDarrayI.cxx \
       AliTRDCalibPadStatus.cxx \
       AliTRDQAChecker.cxx \
       AliTRDPreprocessor.cxx \
-      AliTRDSaxHandler.cxx \
       AliTRDDataDCS.cxx \
       AliTRDSensor.cxx \
       AliTRDSensorArray.cxx \