Include informations from rstate module
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Sep 2008 16:10:01 +0000 (16:10 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Sep 2008 16:10:01 +0000 (16:10 +0000)
TRD/AliTRDPreprocessor.cxx
TRD/AliTRDSaxHandler.cxx
TRD/AliTRDSaxHandler.h

index 506b34c6167e306cc303e1d609e83cda0884a991..e158bd3b6d6a57b36e45bc2d71b77a39d72e4279 100644 (file)
@@ -950,7 +950,8 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData()
 
   // get the calibration object storing the data from the handler
   AliTRDCalDCS* fCalDCSObj = saxHandler.GetCalDCSObj();
-
+  fCalDCSObj->EvaluateGlobalParameters();
+  
   // store the DCS calib data in the CDB
   AliCDBMetaData metaData1;
   metaData1.SetBeamPeriod(0);
index d495c34a044da994bef345b9b6941faab7ce86e3..859663be195742f0481bcbed659f66c10d919973 100644 (file)
@@ -43,6 +43,7 @@
 \r
 ClassImp(AliTRDSaxHandler)\r
 \r
+  \r
 //_____________________________________________________________________________\r
 AliTRDSaxHandler::AliTRDSaxHandler()\r
   :TObject()\r
@@ -53,8 +54,11 @@ AliTRDSaxHandler::AliTRDSaxHandler()
   ,fPTRArr(new TObjArray(6))\r
   ,fGTUArr(new TObjArray(19))\r
   ,fSystem(0)\r
+  ,fInsideRstate(0)\r
   ,fCurrentSM(0)\r
   ,fCurrentStack(0)\r
+  ,fCurrentROB(-1)\r
+  ,fCurrentMCM(-1)\r
   ,fContent(0)\r
   ,fDCSFEEObj(0)\r
   ,fDCSPTRObj(0)\r
@@ -79,8 +83,11 @@ AliTRDSaxHandler::AliTRDSaxHandler(const AliTRDSaxHandler &sh)
   ,fPTRArr(0)\r
   ,fGTUArr(0)\r
   ,fSystem(0)\r
+  ,fInsideRstate(0)\r
   ,fCurrentSM(0)\r
   ,fCurrentStack(0)\r
+  ,fCurrentROB(-1)\r
+  ,fCurrentMCM(-1)\r
   ,fContent(0)\r
   ,fDCSFEEObj(0)\r
   ,fDCSPTRObj(0)\r
@@ -134,7 +141,6 @@ AliTRDSaxHandler::~AliTRDSaxHandler()
 AliTRDCalDCS* AliTRDSaxHandler::GetCalDCSObj()\r
 {\r
   // put the arrays in the global calibration object and return this\r
-  fCalDCSObj->SetNumberOfTimeBins(0); //test test test\r
   fCalDCSObj->SetFEEArr(fFEEArr);\r
   fCalDCSObj->SetPTRArr(fPTRArr);\r
   fCalDCSObj->SetGTUArr(fGTUArr);\r
@@ -169,6 +175,10 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
   if (strName.Contains("PTR")) fSystem = kInsidePTR;\r
   if (strName.Contains("GTU")) fSystem = kInsideGTU;\r
 \r
+  // set if we are inside rstate \r
+  // (in principle not necessary - just to be more safe against stupid tags)\r
+  if (strName.Contains("rstate")) fInsideRstate = 1;\r
+\r
   // get the attributes of the element\r
   TXMLAttr *attr;\r
   TIter next(attributes);\r
@@ -182,6 +192,12 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
       if (atoi(attr->GetValue()) != fDCSFEEObj->GetDCSid())\r
        fDCSFEEObj->SetStatusBit(3); // consistence check\r
     }\r
+    if (attribName.Contains("rob") && (fInsideRstate == 1)) {\r
+      fCurrentROB = atoi(attr->GetValue());\r
+    }\r
+    if (attribName.Contains("mcm") && (fInsideRstate == 1)) {\r
+      fCurrentMCM = atoi(attr->GetValue());\r
+    }\r
     if (attribName.Contains("sm") && strName.Contains("DCS")) {\r
       fCurrentSM = atoi(attr->GetValue()); // only for GTU/PTR\r
     }\r
@@ -250,30 +266,46 @@ void AliTRDSaxHandler::OnEndElement(const char *name)
     fCurrentStack = 99; // 99 for no stack set\r
   }\r
 \r
+  // outside of rstate again?\r
+  if (strName.Contains("rstate")) {\r
+    fInsideRstate = 0;\r
+    fCurrentROB   = -1;\r
+    fCurrentMCM   = -1;\r
+  }\r
+  if (strName.Contains("ro-board")) fCurrentROB = -1;\r
+  \r
   // store informations of the FEE DCS-Board\r
   if (fSystem == kInsideFEE) {\r
-    if (strName.Contains("DNR")) fDCSFEEObj->SetStatusBit(fContent.Atoi());\r
-    if (strName.Contains("CFGNME")) fDCSFEEObj->SetConfigName(fContent);\r
-    if (strName.Contains("CFGTAG")) fDCSFEEObj->SetConfigTag(fContent.Atoi());\r
-    if (strName.Contains("CFGVRSN")) fDCSFEEObj->SetConfigVersion(fContent);\r
-    if (strName.Contains("NTB")) fDCSFEEObj->SetNumberOfTimeBins(fContent.Atoi());\r
-    if (strName.Contains("SM-ID")) fDCSFEEObj->SetSM(fContent.Atoi());\r
-    if (strName.Contains("STACK-ID")) fDCSFEEObj->SetStack(fContent.Atoi());\r
-    if (strName.Contains("LAYER-ID")) fDCSFEEObj->SetLayer(fContent.Atoi());\r
+    if (strName.Contains("DNR"))            fDCSFEEObj->SetStatusBit(fContent.Atoi());\r
+    if (strName.Contains("CFGNME"))         fDCSFEEObj->SetConfigName(fContent);\r
+    if (strName.Contains("CFGTAG"))         fDCSFEEObj->SetConfigTag(fContent.Atoi());\r
+    if (strName.Contains("CFGVRSN"))        fDCSFEEObj->SetConfigVersion(fContent);\r
+    if (strName.Contains("NTB"))            fDCSFEEObj->SetNumberOfTimeBins(fContent.Atoi());\r
+    if (strName.Contains("SM-ID"))          fDCSFEEObj->SetSM(fContent.Atoi());\r
+    if (strName.Contains("STACK-ID"))       fDCSFEEObj->SetStack(fContent.Atoi());\r
+    if (strName.Contains("LAYER-ID"))       fDCSFEEObj->SetLayer(fContent.Atoi());\r
     if (strName.Contains("SINGLEHITTHRES")) fDCSFEEObj->SetSingleHitThres(fContent.Atoi());\r
-    if (strName.Contains("THRPADCLSTHRS")) fDCSFEEObj->SetThreePadClustThres(fContent.Atoi());\r
-    if (strName.Contains("SELNOZS")) fDCSFEEObj->SetSelectiveNoZS(fContent.Atoi());\r
-    if (strName.Contains("FASTSTATNOISE")) fDCSFEEObj->SetFastStatNoise(fContent.Atoi());\r
-    if (strName.Contains("FILTWEIGHT")) fDCSFEEObj->SetTCFilterWeight(fContent.Atoi());\r
+    if (strName.Contains("THRPADCLSTHRS"))  fDCSFEEObj->SetThreePadClustThres(fContent.Atoi());\r
+    if (strName.Contains("SELNOZS"))        fDCSFEEObj->SetSelectiveNoZS(fContent.Atoi());\r
+    if (strName.Contains("FASTSTATNOISE"))  fDCSFEEObj->SetFastStatNoise(fContent.Atoi());\r
+    if (strName.Contains("FILTWEIGHT"))     fDCSFEEObj->SetTCFilterWeight(fContent.Atoi());\r
     if (strName.Contains("FILTSHRTDCYPRM")) fDCSFEEObj->SetTCFilterShortDecPar(fContent.Atoi());\r
-    if (strName.Contains("FILTLNGDCYPRM")) fDCSFEEObj->SetTCFilterLongDecPar(fContent.Atoi());\r
-    if (strName.Contains("FLTR")) fDCSFEEObj->SetFilterType(fContent);\r
-    if (strName.Contains("READOUTPAR")) fDCSFEEObj->SetReadoutParam(fContent);\r
-    if (strName.Contains("TESTPATTERN")) fDCSFEEObj->SetTestPattern(fContent);\r
-    if (strName.Contains("TRCKLTMODE")) fDCSFEEObj->SetTrackletMode(fContent);\r
-    if (strName.Contains("TRCKLTDEF")) fDCSFEEObj->SetTrackletDef(fContent);\r
-    if (strName.Contains("TRIGGERSETUP")) fDCSFEEObj->SetTriggerSetup(fContent);\r
-    if (strName.Contains("ADDOPTIONS")) fDCSFEEObj->SetAddOptions(fContent);\r
+    if (strName.Contains("FILTLNGDCYPRM"))  fDCSFEEObj->SetTCFilterLongDecPar(fContent.Atoi());\r
+    if (strName.Contains("FLTR"))           fDCSFEEObj->SetFilterType(fContent);\r
+    if (strName.Contains("READOUTPAR"))     fDCSFEEObj->SetReadoutParam(fContent);\r
+    if (strName.Contains("TESTPATTERN"))    fDCSFEEObj->SetTestPattern(fContent);\r
+    if (strName.Contains("TRCKLTMODE"))     fDCSFEEObj->SetTrackletMode(fContent);\r
+    if (strName.Contains("TRCKLTDEF"))      fDCSFEEObj->SetTrackletDef(fContent);\r
+    if (strName.Contains("TRIGGERSETUP"))   fDCSFEEObj->SetTriggerSetup(fContent);\r
+    if (strName.Contains("ADDOPTIONS"))     fDCSFEEObj->SetAddOptions(fContent);\r
+    if (fInsideRstate == 1) {\r
+      if (fCurrentROB>=0 && fCurrentMCM>=0) {\r
+       if (strName.Contains("gsm")) fDCSFEEObj->SetMCMGlobalState(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+       if (strName.Contains("ni")) fDCSFEEObj->SetMCMStateNI(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+       if (strName.Contains("ev")) fDCSFEEObj->SetMCMEventCnt(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+       if (strName.Contains("ptrg")) fDCSFEEObj->SetMCMPtCnt(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+      }\r
+    }\r
   }\r
 \r
   \r
index af27018b359f6dad5d1622cea418179e90b261e8..ff7aea8d11c91479217e4ae86f7312f253655794 100644 (file)
@@ -61,15 +61,18 @@ public:
   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
   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.
 
-  ClassDef(AliTRDSaxHandler,1);    // The XML file handler for the preprocessor
-
+  ClassDef(AliTRDSaxHandler,2);    // The XML file handler for the preprocessor
 };
 #endif
+