]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fix coding violations
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Oct 2009 21:58:08 +0000 (21:58 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 29 Oct 2009 21:58:08 +0000 (21:58 +0000)
TRD/AliTRDSaxHandler.cxx
TRD/AliTRDSaxHandler.h

index 8da77435527f48720db28d8a6bffd1027703274d..76d7be4e699ea40493f27eec89b6dfc1097effdf 100644 (file)
 \r
 ////////////////////////////////////////////////////////////////////////////\r
 //                                                                        //\r
-//  The SAX XML file handler used in the preprocessor                     //\r
+//  The SAX XML file handler used in the TRD preprocessor                 //\r
 //                                                                        //\r
-//  Author                                                              //\r
+//  Authors:                                                              //\r
 //    Frederick Kramer (kramer@ikf.uni-frankfurt.de)                      //\r
+//    Thomas Bird      (thomas@thomasbird.com)                            //\r
 //                                                                        //\r
 ////////////////////////////////////////////////////////////////////////////\r
 \r
+\r
 #include <TList.h>\r
-#include <TXMLAttr.h>\r
-#include <TObjArray.h>\r
 #include <TMath.h>\r
-\r
 #include "AliLog.h"\r
+#include "Cal/AliTRDCalDCSGTUTgu.h"\r
+#include "Cal/AliTRDCalDCSPTR.h"\r
 \r
+#include <TXMLAttr.h>\r
+#include <TObjArray.h>\r
 #include "AliTRDSaxHandler.h"\r
 #include "AliTRDgeometry.h"\r
-\r
 #include "Cal/AliTRDCalDCS.h"\r
-#include "Cal/AliTRDCalDCSGTUTgu.h"\r
 #include "Cal/AliTRDCalDCSFEE.h"\r
-#include "Cal/AliTRDCalDCSPTR.h"\r
 #include "Cal/AliTRDCalDCSGTU.h"\r
 \r
 ClassImp(AliTRDSaxHandler)\r
@@ -70,9 +70,7 @@ AliTRDSaxHandler::AliTRDSaxHandler()
   ,fSegment(0)\r
   ,fBoardInfo(0)\r
 {\r
-  //\r
   // AliTRDSaxHandler default constructor\r
-  //\r
   fFEEArr->SetOwner();\r
   fPTRArr->SetOwner();\r
 }\r
@@ -105,19 +103,14 @@ AliTRDSaxHandler::AliTRDSaxHandler(const AliTRDSaxHandler &sh)
   ,fSegment(0)\r
   ,fBoardInfo(0)\r
 {\r
-  //\r
   // AliTRDSaxHandler copy constructor\r
-  //\r
 }\r
 \r
 //_____________________________________________________________________________\r
 AliTRDSaxHandler &AliTRDSaxHandler::operator=(const AliTRDSaxHandler &sh)\r
 {\r
-  //\r
   // Assignment operator\r
-  //\r
   if (&sh == this) return *this;\r
-\r
   new (this) AliTRDSaxHandler(sh);\r
   return *this;\r
 }\r
@@ -125,10 +118,7 @@ AliTRDSaxHandler &AliTRDSaxHandler::operator=(const AliTRDSaxHandler &sh)
 //_____________________________________________________________________________\r
 AliTRDSaxHandler::~AliTRDSaxHandler()\r
 {\r
-  //\r
   // AliTRDSaxHandler destructor\r
-  //\r
-\r
   if (fFEEArr) {\r
     delete fFEEArr;\r
     fFEEArr    = 0x0;\r
@@ -145,7 +135,6 @@ AliTRDSaxHandler::~AliTRDSaxHandler()
     delete fCalDCSObj;\r
     fCalDCSObj = 0x0;\r
   }\r
-\r
 }\r
 \r
 //_____________________________________________________________________________\r
@@ -159,14 +148,14 @@ AliTRDCalDCS* AliTRDSaxHandler::GetCalDCSObj()
 }\r
 \r
 //_____________________________________________________________________________\r
-void AliTRDSaxHandler::OnStartDocument()\r
+void AliTRDSaxHandler::OnStartDocument() const\r
 {\r
   // if something should happen right at the beginning of the\r
   // XML document, this must happen here\r
 }\r
 \r
 //_____________________________________________________________________________\r
-void AliTRDSaxHandler::OnEndDocument()\r
+void AliTRDSaxHandler::OnEndDocument() const\r
 {\r
   // if something should happen at the end of the XML document\r
   // this must be done here\r
@@ -176,8 +165,8 @@ void AliTRDSaxHandler::OnEndDocument()
 bool AliTRDSaxHandler::CompareString(TString str, const char *str2)\r
 {\r
   // compre strings, ignoring case\r
-  return !(bool)str.CompareTo(str2,str.kIgnoreCase);\r
   // returns true if they are the same, else false\r
+  return !(bool)str.CompareTo(str2,str.kIgnoreCase);\r
 }\r
 \r
 \r
@@ -199,7 +188,6 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
   }\r
 \r
   if (fSystem == kInsideGTU) {\r
-//     cout << "Start: " << tagName << " " << fLevel1Tag << " " << fLevel2Tag << " " << fInsideBoardInfo << "\n";\r
     if (CompareString(tagName, "tgu")) fLevel1Tag = kInsideTgu;\r
     if (CompareString(tagName, "board_info")) {\r
       fInsideBoardInfo = true;\r
@@ -225,7 +213,6 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
   } else if (fSystem == kInsideFEE) {\r
     if (CompareString(tagName, "gaintbl")) fLevel1Tag = kInsideGainTable;\r
   }\r
-  \r
 \r
   // set if we are inside rstate \r
   // (in principle not necessary - just to be more safe against stupid tags)\r
@@ -322,7 +309,6 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
     }\r
     \r
     if (fInsideBoardInfo) {\r
-//       cout << tagName << ": " << attribName << "=" << attribValue  << "\n";\r
       if (CompareString(tagName, "board_info") && CompareString(attribName, "board_id"))    fBoardInfo->SetId(attribValue);\r
       if (CompareString(tagName, "board_info") && CompareString(attribName, "design_type")) fBoardInfo->SetType(attribValue.Atoi());\r
       if (CompareString(tagName, "board_info") && CompareString(attribName, "pci_ga"))      fBoardInfo->SetPciGa(attribValue.Atoi());\r
@@ -451,8 +437,6 @@ void AliTRDSaxHandler::OnEndElement(const char *name)
   }\r
 \r
   if (fSystem == kInsideGTU) {\r
-//     cout << "Close: " << tagName << " " << fLevel1Tag << " " << fLevel2Tag << " " << fInsideBoardInfo << "\n";\r
-\r
 //     if (CompareString(tagName, "run")) { \r
 //       fDCSGTUObj->SetSORFlag(TString(fContent(fContent.Length()-1,1)).Atoi());\r
 //       fDCSGTUObj->SetRunNumber(TString(fContent(0,fContent.Length()-2)).Atoi());\r
@@ -505,7 +489,7 @@ void AliTRDSaxHandler::OnCharacters(const char *characters)
 }\r
 \r
 //_____________________________________________________________________________\r
-void AliTRDSaxHandler::OnComment(const char* /*text*/)\r
+void AliTRDSaxHandler::OnComment(const char* /*text*/) const\r
 {\r
   // comments within the XML file are ignored\r
 }\r
@@ -532,7 +516,7 @@ void AliTRDSaxHandler::OnFatalError(const char *text)
 }\r
 \r
 //_____________________________________________________________________________\r
-void AliTRDSaxHandler::OnCdataBlock(const char* /*text*/, Int_t /*len*/)\r
+void AliTRDSaxHandler::OnCdataBlock(const char* /*text*/, Int_t /*len*/) const\r
 {\r
   // process character data blocks here\r
   // not implemented and should not be used here\r
index 8c29dd7115355c9e89c0142f96136fbc5fab37ea..a9653c29d3a09a35270a4580fddd0538319de1ba 100644 (file)
 //                                                                        //
 ////////////////////////////////////////////////////////////////////////////
 
+
 #include "TObject.h"
 #include "Cal/AliTRDCalDCSGTUCtpOpc.h"
 #include "Cal/AliTRDCalDCSGTUBoardInfo.h"
 #include "Cal/AliTRDCalDCSGTUSegment.h"
-#include "Cal/AliTRDCalDCSGTUTmu.h"
+#include "Cal/AliTRDCalDCSGTUTmu.h" 
 
 class TObjArray;
-
 class AliTRDCalDCS;
 class AliTRDCalDCSFEE;
 class AliTRDCalDCSPTR;
 class AliTRDCalDCSGTU;
 
+
 class AliTRDSaxHandler : public TObject {
 
 public:
@@ -58,50 +59,50 @@ public:
   Int_t         GetHandlerStatus() const { return fHandlerStatus; }
 
   // functions for all possible events
-  void          OnStartDocument();
-  void          OnEndDocument();
+  void          OnStartDocument() const;
+  void          OnEndDocument() const;
   void          OnStartElement(const char *name, const TList *attributes);
   void          OnEndElement(const char *name);
   void          OnCharacters(const char *name);
-  void          OnComment(const char *name);
+  void          OnComment(const char *name) const;
   void          OnWarning(const char *name);
   void          OnError(const char *name);
   void          OnFatalError(const char *name);
-  void          OnCdataBlock(const char *name, Int_t len);
+  void          OnCdataBlock(const char *name, Int_t len) const;
 
  private:
 
   bool           CompareString(TString str, const char *str2); 
 
-  Int_t            fHandlerStatus; // 0: everything OK, >0: error
-  Int_t            fNDCSPTR;       // number of current PTR unit (to be abandonned soon)
-  Int_t            fNDCSGTU;       // number of current GTU unit (to be abandonned soon)
-  TObjArray*       fFEEArr;        // array of AliTRDCalDCSFEE objects
-  TObjArray*       fPTRArr;        // array of AliTRDCalDCSPTR objects
+  Int_t            fHandlerStatus;      // 0: everything OK, >0: error
+  Int_t            fNDCSPTR;            // number of current PTR unit (to be abandonned soon)
+  Int_t            fNDCSGTU;            // number of current GTU unit (to be abandonned soon)
+  TObjArray*       fFEEArr;             // array of AliTRDCalDCSFEE objects
+  TObjArray*       fPTRArr;             // array of AliTRDCalDCSPTR objects
 //   TObjArray*       fGTUArr;        // array of AliTRDCalDCSGTU objects
-  Int_t            fSystem;        // current system (FEE/PTR/GTU)
-  Int_t            fInsideRstate;  // if we are inside rstate
-  Int_t            fCurrentSM;     // current supermodule
-  Int_t            fCurrentStack;  // current stack
-  Int_t            fCurrentROB;    // current ROB during processing
-  Int_t            fCurrentMCM;    // current MCM
-  Int_t            fCurrentADC;    // current ADC
-  TString          fContent;       // content of the xml element (text) 
-  AliTRDCalDCSFEE* fDCSFEEObj;     // the calib object for one FEE DCS board
-  AliTRDCalDCSPTR* fDCSPTRObj;     // the calib object for one PTR DCS board
-  AliTRDCalDCSGTU* fDCSGTUObj;     // the calib object for one GTU DCS board
-  AliTRDCalDCS*    fCalDCSObj;     // the complete calib obj containing all inform.
-  Int_t            fLevel1Tag;        // 
-  Int_t            fLevel2Tag;        // 
-  Bool_t           fInsideBoardInfo;
-
-  AliTRDCalDCSGTUTmu*       fTmu;
-  AliTRDCalDCSGTUCtpOpc*    fCtpOpc;
-  AliTRDCalDCSGTUSegment*   fSegment;
-  AliTRDCalDCSGTUBoardInfo* fBoardInfo;
+  Int_t            fSystem;             // current system (FEE/PTR/GTU) (while parsing)
+  Int_t            fInsideRstate;       // if we are inside rstate (while parsing)
+  Int_t            fCurrentSM;          // current supermodule (while parsing)
+  Int_t            fCurrentStack;       // current stack (while parsing)
+  Int_t            fCurrentROB;         // current ROB (while parsing)
+  Int_t            fCurrentMCM;         // current MCM (while parsing)
+  Int_t            fCurrentADC;         // current ADC (while parsing)
+  TString          fContent;            // content of the xml element (text)
+  AliTRDCalDCSFEE* fDCSFEEObj;          // the calib object for one FEE DCS board
+  AliTRDCalDCSPTR* fDCSPTRObj;          // the calib object for one PTR DCS board
+  AliTRDCalDCSGTU* fDCSGTUObj;          // the calib object for one GTU DCS board
+  AliTRDCalDCS*    fCalDCSObj;          // the complete calib obj containing all info
+  Int_t            fLevel1Tag;          // 1st level in XML (while parsing)
+  Int_t            fLevel2Tag;          // 2nd level in XML (while parsing)
+  Bool_t           fInsideBoardInfo;    // if we are inside BoardInfo (while parsing)
+
+  AliTRDCalDCSGTUTmu*       fTmu;       // GTU calibration data: pattern generator
+  AliTRDCalDCSGTUCtpOpc*    fCtpOpc;    // GTU calibration data: OPC
+  AliTRDCalDCSGTUSegment*   fSegment;   // GTU calibration data: SMU tracklets/tracks/triggers
+  AliTRDCalDCSGTUBoardInfo* fBoardInfo; // GTU calibration data: hard-/software and type
   
 
-  ClassDef(AliTRDSaxHandler,2);    // The XML file handler for the preprocessor
+  ClassDef(AliTRDSaxHandler,2);         // The XML file handler for the preprocessor
 };
 #endif