]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Modifications by Thomas
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Sep 2009 19:23:02 +0000 (19:23 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Sep 2009 19:23:02 +0000 (19:23 +0000)
30 files changed:
TRD/AliTRDPreprocessor.cxx
TRD/AliTRDSaxHandler.cxx
TRD/AliTRDSaxHandler.h
TRD/Cal/AliTRDCalDCS.cxx
TRD/Cal/AliTRDCalDCS.h
TRD/Cal/AliTRDCalDCSFEE.cxx
TRD/Cal/AliTRDCalDCSFEE.h
TRD/Cal/AliTRDCalDCSGTU.cxx
TRD/Cal/AliTRDCalDCSGTU.h
TRD/Cal/AliTRDCalDCSGTUBoardInfo.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUBoardInfo.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUCtpOpc.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUCtpOpc.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUSegment.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUSegment.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUTgu.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUTgu.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUTmu.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSGTUTmu.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRCba.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRCba.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRCbb.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRCbb.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRFeb.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRFeb.h [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRTlmu.cxx [new file with mode: 0644]
TRD/Cal/AliTRDCalDCSPTRTlmu.h [new file with mode: 0644]
TRD/Cal/AliTRDcheckConfigSimple.C [new file with mode: 0644]
TRD/TRDbaseLinkDef.h
TRD/libTRDbase.pkg

index deeddd352bc9e8836ae6c12e301a86fd98b44e95..8b2bf56a9c85f677f73c553f1606cd5ef2428df3 100644 (file)
@@ -106,7 +106,8 @@ UInt_t AliTRDPreprocessor::Process(TMap* dcsAliasMap)
   Log(Form("runtype %s\n",runType.Data()));
   
   // always process the configuration data
- if(ProcessDCSConfigData()) return 1; 
+  Int_t DCSConfigReturn = ProcessDCSConfigData();
+  if(DCSConfigReturn) return DCSConfigReturn; 
   
   if (runType=="PEDESTAL"){
     if(ExtractPedestals()) return 1;
@@ -903,17 +904,14 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData()
   // parse it/them and store TObjArrays in the CDB
   //
   // return 0 for success, otherwise:
-  //  5 : could not get the SOR file from the FXS
-  //  6 : could not get the EOR file from the FXS
-  //  7 : 
-  //  8 : something wrong with the SOR file
-  //  9 : something wrong with the EOR file
+  //  5 : Could not get the SOR and EOR file from the FXS
+  //  8 : Something wrong with the SOR file
+  //  9 : Something wrong with the EOR file
   // 10 : SOR XML is not well-formed
   // 11 : EOR XML is not well-formed
   // 12 : ERROR in XML SAX validation: something wrong with the content
-  // 13 :
   // 14 : ERROR while creating calibration objects in the handler
-  // 15 : error while storing data in the CDB
+  // 15 : ERROR while storing data in the CDB
   //
 
   Log("Processing the DCS config summary files.");
@@ -922,88 +920,121 @@ UInt_t AliTRDPreprocessor::ProcessDCSConfigData()
   Log("Requesting the 2 summaryfiles from the FXS..");
   const char *xmlFileS = GetFile(kDCS,"CONFIGSUMMARYSOR","");
   const char *xmlFileE = GetFile(kDCS,"CONFIGSUMMARYEOR","");
-  // for the time being just request BOTH files from the FXS
-  // THEN it can be created online (otherwise the FXS would be messed up)
-  // the next step is to actually read BOTH files and store their informations
-  if (xmlFileS == NULL) {
-    Log(Form("ERROR: SOR File %s not found!",xmlFileS));
+  // Request EOR and SOR files from the fxs, if both are not found exit
+
+  if (xmlFileS == NULL && xmlFileE == NULL) {
+    Log(Form("ERROR: SOR and EOR Files %s and %s not found!",xmlFileS,xmlFileE));
     return 5;
+  } 
+
+  Bool_t fileExistE = true, fileExistS = true;
+
+  if (xmlFileS == NULL) {
+    Log(Form("Warning: SOR File %s not found!",xmlFileS));
+    fileExistE = false;
   } else if (xmlFileE == NULL) {
-    Log(Form("ERROR: EOR File %s not found!",xmlFileE));
-    return 6;
+    Log(Form("Warning: EOR File %s not found!",xmlFileE));
+    fileExistS = false;
   } else {
     Log(Form("Both Files (%s and %s) found.",xmlFileS,xmlFileE));
   }
-  
-  // test the files
-  std::ifstream fileTestS, fileTestE;
-  fileTestS.open(xmlFileS, std::ios_base::binary | std::ios_base::in);
-  fileTestE.open(xmlFileE, std::ios_base::binary | std::ios_base::in);
-  if (!fileTestS.good() || fileTestS.eof() || !fileTestS.is_open()) {
-    Log(Form("ERROR: File %s not valid!",xmlFileS));
-    return 8;
-  }
-  if (!fileTestE.good() || fileTestE.eof() || !fileTestE.is_open()) {
-    Log(Form("ERROR: File %s not valid!",xmlFileE));
-    return 9;
-  }
-  fileTestS.seekg(0, std::ios_base::end);
-  fileTestE.seekg(0, std::ios_base::end);
-  if (static_cast<int>(fileTestS.tellg()) < 2) {
-    Log(Form("ERROR: File %s is empty!",xmlFileS));
-    return 8;
-  }
-  if (static_cast<int>(fileTestE.tellg()) < 2) {
-    Log(Form("ERROR: File %s is empty!",xmlFileE));
-    return 9;
-  }
-  Log("Files are tested valid.");   
+
+  if (fileExistS) {
+    // test the files
+    std::ifstream fileTestS;
+    fileTestS.open(xmlFileS, std::ios_base::binary | std::ios_base::in);
+    if (!fileTestS.good() || fileTestS.eof() || !fileTestS.is_open()) {
+      Log(Form("ERROR: File %s not valid!",xmlFileS));
+      return 8;
+    }
+    fileTestS.seekg(0, std::ios_base::end);
+    if (static_cast<int>(fileTestS.tellg()) < 2) {
+      Log(Form("ERROR: File %s is empty!",xmlFileS));
+      return 8;
+    }
+  }
+
+  if (fileExistE) {
+    std::ifstream fileTestE;
+    fileTestE.open(xmlFileE, std::ios_base::binary | std::ios_base::in);
+    if (!fileTestE.good() || fileTestE.eof() || !fileTestE.is_open()) {
+      Log(Form("ERROR: File %s not valid!",xmlFileE));
+      return 9;
+    }
+    fileTestE.seekg(0, std::ios_base::end);
+    if (static_cast<int>(fileTestE.tellg()) < 2) {
+      Log(Form("ERROR: File %s is empty!",xmlFileE));
+      return 9;
+    }
+  }
+
+  Log("Tested files are valid.");   
 
   // make a robust XML validation
   TSAXParser testParser;
-  if (testParser.ParseFile(xmlFileS) < 0 ) {
+  if (fileExistS && testParser.ParseFile(xmlFileS) < 0 ) {
     Log("ERROR: XML content (SOR) is not well-formed.");
     return 10;
-  } else if (testParser.ParseFile(xmlFileE) < 0 ) {
+  } else if (fileExistE && testParser.ParseFile(xmlFileE) < 0 ) {
     Log("ERROR: XML content (EOR) is not well-formed.");
     return 11;
   }
   Log("XML contents are well-formed.");
-      
+
   // create parser and parse
   TSAXParser saxParserS, saxParserE;
   AliTRDSaxHandler saxHandlerS, saxHandlerE;
-  saxParserS.ConnectToHandler("AliTRDSaxHandler", &saxHandlerS);
-  saxParserS.ParseFile(xmlFileS);
-  saxParserE.ConnectToHandler("AliTRDSaxHandler", &saxHandlerE);
-  saxParserE.ParseFile(xmlFileE);
 
-  // report errors if present
-  if ((saxParserS.GetParseCode() == 0) && (saxParserE.GetParseCode() == 0)) {
+  if (fileExistS) {
+    saxParserS.ConnectToHandler("AliTRDSaxHandler", &saxHandlerS);
+    saxParserS.ParseFile(xmlFileS);
+  }
+  if (fileExistE) {
+    saxParserE.ConnectToHandler("AliTRDSaxHandler", &saxHandlerE);
+    saxParserE.ParseFile(xmlFileE);
+  }
+
+  // report errors if present 
+  if (((fileExistS && saxParserS.GetParseCode() == 0) || !fileExistS) && (!fileExistE || (fileExistE && saxParserE.GetParseCode() == 0))) {
     Log("XML file validation OK.");
   } else {
-    Log(Form("ERROR in XML file validation. Parsecodes: SOR: %s, EOR: %s", saxParserS.GetParseCode(), saxParserE.GetParseCode()));
+    if (fileExistS) {
+      Log(Form("ERROR in XML file validation. SOR Parse Code: %s", saxParserS.GetParseCode()));
+    }
+    if (fileExistE) {
+      Log(Form("ERROR in XML file validation. EOR Parse Code: %s", saxParserE.GetParseCode()));
+    }
     return 12;
   }
-  if ((saxHandlerS.GetHandlerStatus() == 0) && (saxHandlerE.GetHandlerStatus() == 0)) {
+  if (((fileExistS && saxHandlerS.GetHandlerStatus() == 0) || !fileExistS) && (!fileExistE || (saxHandlerE.GetHandlerStatus() == 0))) {
     Log("SAX handler reports no errors.");
   } else  {
-    Log(Form("ERROR while creating calibration objects. Error codes: SOR: %s, EOR: %s", saxHandlerS.GetHandlerStatus(), saxHandlerE.GetHandlerStatus()));
+    if (fileExistS) {
+      Log(Form("ERROR while creating calibration objects. SOR Error code: %s", saxHandlerS.GetHandlerStatus()));
+    }
+    if (fileExistE) {
+      Log(Form("ERROR while creating calibration objects. EOR Error code: %s", saxHandlerE.GetHandlerStatus()));
+    }
     return 14;
   }
 
-  // get the calibration object storing the data from the handler
-  AliTRDCalDCS* fCalDCSObjSOR = saxHandlerS.GetCalDCSObj();
-  AliTRDCalDCS* fCalDCSObjEOR = saxHandlerE.GetCalDCSObj();
-  fCalDCSObjSOR->EvaluateGlobalParameters();
-  fCalDCSObjEOR->EvaluateGlobalParameters();
-  
   // put both objects in one TObjArray to store them
   TObjArray* fCalObjArray = new TObjArray(2);
   fCalObjArray->SetOwner();
-  fCalObjArray->AddAt(fCalDCSObjSOR,0);
-  fCalObjArray->AddAt(fCalDCSObjEOR,1);
-  
+
+  // get the calibration object storing the data from the handler
+  if (fileExistS) {
+    AliTRDCalDCS* fCalDCSObjSOR = saxHandlerS.GetCalDCSObj();
+    fCalDCSObjSOR->EvaluateGlobalParameters();
+    fCalObjArray->AddAt(fCalDCSObjSOR,0);
+  }
+
+  if (fileExistE) {
+    AliTRDCalDCS* fCalDCSObjEOR = saxHandlerE.GetCalDCSObj();
+    fCalDCSObjEOR->EvaluateGlobalParameters();
+    fCalObjArray->AddAt(fCalDCSObjEOR,1);
+  }
+
   // store the DCS calib data in the CDB
   AliCDBMetaData metaData1;
   metaData1.SetBeamPeriod(0);
index 35d8e1ea2c61b79848fc45e36158b2b3bda9baa5..27bfcab0da1070401bacc8cd6f7b480d2ae7980c 100644 (file)
@@ -49,25 +49,31 @@ AliTRDSaxHandler::AliTRDSaxHandler()
   ,fNDCSGTU(0)\r
   ,fFEEArr(new TObjArray(540))\r
   ,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
+  ,fCurrentADC(-1)\r
   ,fContent(0)\r
   ,fDCSFEEObj(0)\r
   ,fDCSPTRObj(0)\r
   ,fDCSGTUObj(0)\r
   ,fCalDCSObj(new AliTRDCalDCS())\r
+  ,fLevel1Tag(-2)\r
+  ,fLevel2Tag(-2)\r
+  ,fInsideBoardInfo(false)\r
+  ,fTmu(0)\r
+  ,fCtpOpc(0)\r
+  ,fSegment(0)\r
+  ,fBoardInfo(0)\r
 {\r
   //\r
   // AliTRDSaxHandler default constructor\r
   //\r
   fFEEArr->SetOwner();\r
   fPTRArr->SetOwner();\r
-  fGTUArr->SetOwner();\r
 }\r
 \r
 //_____________________________________________________________________________\r
@@ -78,18 +84,25 @@ AliTRDSaxHandler::AliTRDSaxHandler(const AliTRDSaxHandler &sh)
   ,fNDCSGTU(0)\r
   ,fFEEArr(0)\r
   ,fPTRArr(0)\r
-  ,fGTUArr(0)\r
   ,fSystem(0)\r
   ,fInsideRstate(0)\r
   ,fCurrentSM(0)\r
   ,fCurrentStack(0)\r
   ,fCurrentROB(-1)\r
   ,fCurrentMCM(-1)\r
+  ,fCurrentADC(-1)\r
   ,fContent(0)\r
   ,fDCSFEEObj(0)\r
   ,fDCSPTRObj(0)\r
   ,fDCSGTUObj(0)\r
   ,fCalDCSObj(0)\r
+  ,fLevel1Tag(-2)\r
+  ,fLevel2Tag(-2)\r
+  ,fInsideBoardInfo(false)\r
+  ,fTmu(0)\r
+  ,fCtpOpc(0)\r
+  ,fSegment(0)\r
+  ,fBoardInfo(0)\r
 {\r
   //\r
   // AliTRDSaxHandler copy constructor\r
@@ -123,9 +136,9 @@ AliTRDSaxHandler::~AliTRDSaxHandler()
     delete fPTRArr;\r
     fPTRArr    = 0x0;\r
   }\r
-  if (fGTUArr) {\r
-    delete fGTUArr;\r
-    fGTUArr    = 0x0;\r
+  if (fDCSGTUObj) {\r
+    delete fDCSGTUObj;\r
+    fDCSGTUObj    = 0x0;\r
   }\r
   if (fCalDCSObj) {\r
     delete fCalDCSObj;\r
@@ -140,7 +153,7 @@ AliTRDCalDCS* AliTRDSaxHandler::GetCalDCSObj()
   // put the arrays in the global calibration object and return this\r
   fCalDCSObj->SetFEEArr(fFEEArr);\r
   fCalDCSObj->SetPTRArr(fPTRArr);\r
-  fCalDCSObj->SetGTUArr(fGTUArr);\r
+  fCalDCSObj->SetGTUObj(fDCSGTUObj);\r
   return fCalDCSObj;\r
 }\r
 \r
@@ -158,64 +171,182 @@ void AliTRDSaxHandler::OnEndDocument()
   // this must be done here\r
 }\r
 \r
+//_____________________________________________________________________________\r
+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
+}\r
+\r
+\r
 //_____________________________________________________________________________\r
 void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)\r
 {\r
   // when a new XML element is found, it is processed here\r
-  fContent    = "";\r
+  fContent    = ""; // Technically <p> This <em>is</em> ok but would be a problem here</p>\r
   Int_t dcsId = 0;\r
-  TString strName  = name;\r
+  TString tagName  = name;\r
   TString dcsTitle = "";\r
 \r
   // set the current system if necessary\r
-  if (strName.Contains("FEE")) fSystem = kInsideFEE;\r
-  if (strName.Contains("PTR")) fSystem = kInsidePTR;\r
-  if (strName.Contains("GTU")) fSystem = kInsideGTU;\r
+  if (CompareString(tagName, "FEE")) fSystem = kInsideFEE;\r
+  if (CompareString(tagName, "PTR")) fSystem = kInsidePTR;\r
+  if (CompareString(tagName, "GTU")) {\r
+    fSystem = kInsideGTU;\r
+    fDCSGTUObj = new AliTRDCalDCSGTU(tagName,tagName);\r
+  }\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
+      fBoardInfo = new AliTRDCalDCSGTUBoardInfo(tagName,tagName);\r
+    }\r
+    if (CompareString(tagName(0,tagName.Length()-3), "segment")) { \r
+      fSegment = new AliTRDCalDCSGTUSegment(tagName,tagName);\r
+      fSegment->SetId(TString(tagName(8,2)).Atoi());\r
+      fLevel1Tag = kInsideSegment;\r
+    }\r
+    if (fLevel1Tag == kInsideTgu) {\r
+      if (CompareString(tagName, "ctp_opc"))   fCtpOpc = new AliTRDCalDCSGTUCtpOpc(tagName,tagName);\r
+    } else if (fLevel1Tag == kInsideSegment) {\r
+      if (CompareString(tagName, "smu")) {\r
+       fLevel2Tag = kInsideSmu;\r
+      }\r
+      if (CompareString(tagName(0,3), "tmu")) {\r
+       fTmu = new AliTRDCalDCSGTUTmu(tagName,tagName);\r
+       fTmu->SetId(TString(tagName(4,2)).Atoi());\r
+       fLevel2Tag = kInsideTmu;\r
+      }\r
+    }\r
+  } 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
-  if (strName.Contains("rstate")) fInsideRstate = 1;\r
+  if (CompareString(tagName, "rstate")) fInsideRstate = 1;\r
 \r
   // get the attributes of the element\r
   TXMLAttr *attr;\r
   TIter next(attributes);\r
   while ((attr = (TXMLAttr*) next())) {\r
     TString attribName = attr->GetName();\r
-    if (attribName.Contains("id") && strName.Contains("DCS")) {\r
-      dcsTitle = name;\r
-      dcsId = atoi(attr->GetValue());\r
-    }\r
-    if (attribName.Contains("roc") && strName.Contains("ack")) {\r
-      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
+    TString attribValue = attr->GetValue();\r
+    if (fSystem == kInsideFEE && fLevel1Tag == kInsideNone) {\r
+      if (CompareString(attribName, "id") && CompareString(tagName, "DCS")) {\r
+       dcsTitle = name;\r
+       dcsId = atoi(attr->GetValue());\r
+      }\r
+      if (CompareString(attribName, "roc") && CompareString(tagName, "ack")) {\r
+       if (attribValue.Atoi() != fDCSFEEObj->GetDCSid())\r
+         fDCSFEEObj->SetStatusBit(3); // consistency check\r
+      }\r
+      if (CompareString(attribName, "rob") && CompareString(tagName, "ro-board") && (fInsideRstate == 1)) {\r
+       fCurrentROB = attribValue.Atoi();\r
+      }\r
+      if (CompareString(attribName, "mcm") && CompareString(tagName, "m") && (fInsideRstate == 1)) {\r
+       fCurrentMCM = attribValue.Atoi();\r
+      }\r
+      if (CompareString(attribName, "sm") && CompareString(tagName, "DCS")) {\r
+       fCurrentSM = attribValue.Atoi(); // only for GTU/PTR\r
+      }\r
+      if (CompareString(attribName, "id") && CompareString(tagName, "STACK")) {// hmmmm not exist?\r
+       fCurrentStack = attribValue.Atoi(); // only for GTU/PTR\r
+      }\r
+    } else if (fSystem == kInsideFEE && fLevel1Tag == kInsideGainTable) {\r
+      if (CompareString(tagName, "roc") && CompareString(attribName, "type"))    fDCSFEEObj->SetGainTableRocType(attribValue);\r
+      if (CompareString(tagName, "roc") && CompareString(attribName, "serial"))  fDCSFEEObj->SetGainTableRocSerial(attribValue.Atoi());\r
+      if (CompareString(tagName, "mcm") && CompareString(attribName, "rob"))     fCurrentROB = attribValue.Atoi();\r
+      if (CompareString(tagName, "mcm") && CompareString(attribName, "pos"))     fCurrentMCM = attribValue.Atoi();\r
+      if (CompareString(tagName, "adc") && CompareString(attribName, "id"))      fCurrentADC = attribValue.Atoi();\r
+      \r
+    } else if (fSystem == kInsideGTU && fLevel1Tag == kInsideNone) {\r
+      if (CompareString(tagName, "publisher")) {\r
+       if (CompareString(attribName, "at"))         fDCSGTUObj->SetSORFlag(attribValue.Atoi());\r
+       if (CompareString(attribName, "serial"))     fDCSGTUObj->SetSerial(attribValue.Atoi());\r
+       if (CompareString(attribName, "runnr"))      fDCSGTUObj->SetRunNumber(attribValue.Atoi());\r
+      }\r
+    } else if (fSystem == kInsideGTU && fLevel1Tag == kInsideTgu) {\r
+      if (CompareString(tagName, "from")) {\r
+       if (CompareString(attribName, "at"))         fDCSGTUObj->GetTgu()->SetFromSORFlag(attribValue.Atoi());\r
+       if (CompareString(attribName, "runnr"))      fDCSGTUObj->GetTgu()->SetFromRunNumber(attribValue.Atoi());\r
+       if (CompareString(attribName, "child"))      fDCSGTUObj->GetTgu()->SetFromChild(attribValue.Atoi());\r
+      }\r
+      if (CompareString(tagName, "segmentmask") && CompareString(attribName, "value"))  fDCSGTUObj->GetTgu()->SetSegmentMask(attribValue);\r
+      if (CompareString(tagName, "busymask") && CompareString(attribName, "value"))     fDCSGTUObj->GetTgu()->SetBusyMask(attribValue);\r
+      if (CompareString(tagName, "contribmask") && CompareString(attribName, "value"))  fDCSGTUObj->GetTgu()->SetContribMask(attribValue);\r
+      \r
+      if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "id"))         fCtpOpc->SetId(attribValue.Atoi());\r
+      if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "opcode"))     fCtpOpc->SetOpcode(attribValue.Atoi());\r
+      if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "direction"))  fCtpOpc->SetDirection(attribValue.Atoi());\r
+      if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "inverted"))   fCtpOpc->SetInverted(attribValue.Atoi());\r
+      if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "delay"))      fCtpOpc->SetDelay(attribValue.Atoi());\r
+      if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "connected"))  fCtpOpc->SetConnected(attribValue.Atoi());\r
+      \r
+    } else if (fSystem == kInsideGTU && fLevel1Tag == kInsideSegment) {\r
+      if (CompareString(tagName, "from")) {\r
+       if (CompareString(attribName, "at"))         fSegment->SetFromSORFlag(attribValue.Atoi());\r
+       if (CompareString(attribName, "runnr"))      fSegment->SetFromRunNumber(attribValue.Atoi());\r
+       if (CompareString(attribName, "child"))      fSegment->SetFromChild(attribValue.Atoi());\r
+      }\r
+      if (fLevel2Tag == kInsideSmu) {\r
+       if (CompareString(tagName, "stackmask") && CompareString(attribName, "value"))     fSegment->SetSmuStackMask(attribValue);\r
+       if (CompareString(tagName, "tracklets") && CompareString(attribName, "send"))      fSegment->SetSmuTracklets(attribValue.Atoi());\r
+       if (CompareString(tagName, "tracks") && CompareString(attribName, "send"))         fSegment->SetSmuTracks(attribValue.Atoi());\r
+       if (CompareString(tagName, "idelay") && CompareString(attribName, "value"))        fSegment->SetSmuIdelay(attribValue.Atoi());\r
+       if (CompareString(tagName, "ttc_emulator") && CompareString(attribName, "enable")) fSegment->SetSmuTtcEmulatorEnable(attribValue.Atoi());\r
+       \r
+       if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l1_low"))  \r
+         fSegment->SetSmuTriggerWindowL1Low(attribValue.Atoi());\r
+       if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l1_high"))  \r
+         fSegment->SetSmuTriggerWindowL1High(attribValue.Atoi());\r
+       if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l2_low"))  \r
+         fSegment->SetSmuTriggerWindowL2Low(attribValue.Atoi());\r
+       if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l2_high"))  \r
+         fSegment->SetSmuTriggerWindowL2High(attribValue.Atoi());\r
+       \r
+      } else if (fLevel2Tag == kInsideTmu) {\r
+       if (CompareString(tagName, "linkmask") && CompareString(attribName, "value"))      fTmu->SetLinkMask(attribValue);\r
+       if (CompareString(tagName, "pattern_generator") && CompareString(attribName, "enable")) \r
+         fTmu->SetPatternGeneratorEnable(attribValue.Atoi());\r
+       if (CompareString(tagName, "pattern_generator") && CompareString(attribName, "datawords")) \r
+         fTmu->SetPatternGeneratorDataWords(attribValue.Atoi());\r
+       if (CompareString(tagName, "pattern_generator") && CompareString(attribName, "trackletwords")) \r
+         fTmu->SetPatternGeneratorTrackletWords(attribValue.Atoi());\r
+      }\r
     }\r
-    if (attribName.Contains("id") && strName.Contains("STACK")) {\r
-      fCurrentStack = atoi(attr->GetValue()); // only for GTU/PTR\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
+      if (CompareString(tagName, "hardware") && CompareString(attribName, "date"))          fBoardInfo->SetHwDate(attribValue);\r
+      if (CompareString(tagName, "hardware") && CompareString(attribName, "rev"))           fBoardInfo->SetHwRev(attribValue.Atoi());\r
+      if (CompareString(tagName, "hardware") && CompareString(attribName, "clean"))         fBoardInfo->SetHwClean(attribValue.Atoi());\r
+      if (CompareString(tagName, "software") && CompareString(attribName, "date"))          fBoardInfo->SetSwDate(attribValue);\r
+      if (CompareString(tagName, "software") && CompareString(attribName, "rev"))           fBoardInfo->SetSwRev(attribValue.Atoi());\r
+      if (CompareString(tagName, "software") && CompareString(attribName, "clean"))         fBoardInfo->SetSwClean(attribValue.Atoi());\r
     }\r
   }\r
 \r
   // if there is a new DCS element put it in the correct array\r
-  if (strName.Contains("DCS")) {\r
+  if (CompareString(tagName, "DCS")) {\r
     if (fSystem == kInsideFEE) {\r
       fDCSFEEObj = new AliTRDCalDCSFEE(name,dcsTitle);\r
       fDCSFEEObj->SetDCSid(dcsId);\r
     }\r
     if (fSystem == kInsidePTR) {\r
-      fDCSPTRObj = new AliTRDCalDCSPTR(name,dcsTitle);\r
-      fDCSPTRObj->SetDCSid(dcsId);\r
+//       fDCSPTRObj = new AliTRDCalDCSPTR(name,dcsTitle);\r
+//       fDCSPTRObj->SetDCSid(dcsId);\r
     }\r
     if (fSystem == kInsideGTU) {\r
-      fDCSGTUObj = new AliTRDCalDCSGTU(name,dcsTitle);\r
-      fDCSGTUObj->SetDCSid(dcsId);\r
+//       fDCSGTUObj = new AliTRDCalDCSGTU(name,dcsTitle);\r
+//       fDCSGTUObj->SetDCSid(dcsId);\r
     }\r
   }\r
 }\r
@@ -224,11 +355,11 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes)
 void AliTRDSaxHandler::OnEndElement(const char *name)\r
 {\r
   // do everything that needs to be done when an end tag of an element is found\r
-  TString strName = name;\r
+  TString tagName = name;\r
   \r
   // if done with this DCS board, put it in the correct array\r
   // no check for </ack> necessary since this check is done during XML validation\r
-  if (strName.Contains("DCS")) {\r
+  if (CompareString(tagName, "DCS")) {\r
     if (fSystem == kInsideFEE) {\r
       Int_t detID = 0;\r
       if (fDCSFEEObj->GetStatusBit() == 0) {\r
@@ -249,58 +380,102 @@ void AliTRDSaxHandler::OnEndElement(const char *name)
       fPTRArr->AddAt(fDCSPTRObj,fNDCSPTR);\r
       fNDCSPTR++;\r
     }\r
-    if (fSystem == kInsideGTU) {\r
-      fGTUArr->AddAt(fDCSGTUObj,fNDCSGTU);\r
-      fNDCSGTU++;\r
-    }\r
+//     if (fSystem == kInsideGTU) {\r
+//       fGTUArr->AddAt(fDCSGTUObj,fNDCSGTU);\r
+//       fNDCSGTU++;\r
+//     }\r
     fCurrentSM = 99; // 99 for no SM set\r
     fDCSFEEObj = 0;  // just to be sure\r
     return;\r
   }\r
 \r
-  // done with this stack?\r
-  if (strName.Contains("STACK")) {\r
+  // done with this stack? \r
+  if (CompareString(tagName, "STACK")) {// TODO: errrrm ???? always 99?\r
     fCurrentStack = 99; // 99 for no stack set\r
   }\r
 \r
   // outside of rstate again?\r
-  if (strName.Contains("rstate")) {\r
+  if (CompareString(tagName, "rstate")) {\r
     fInsideRstate = 0;\r
     fCurrentROB   = -1;\r
     fCurrentMCM   = -1;\r
   }\r
-  if (strName.Contains("ro-board")) fCurrentROB = -1;\r
+  if (CompareString(tagName, "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("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("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 (CompareString(tagName, "DNR"))            fDCSFEEObj->SetStatusBit(fContent.Atoi());\r
+    if (CompareString(tagName, "CFGNME"))         fDCSFEEObj->SetConfigName(fContent);\r
+    if (CompareString(tagName, "CFGTAG"))         fDCSFEEObj->SetConfigTag(fContent.Atoi());\r
+    if (CompareString(tagName, "CFGVRSN"))        fDCSFEEObj->SetConfigVersion(fContent);\r
+    if (CompareString(tagName, "NTB"))            fDCSFEEObj->SetNumberOfTimeBins(fContent.Atoi());\r
+    if (CompareString(tagName, "SM-ID"))          fDCSFEEObj->SetSM(fContent.Atoi());\r
+    if (CompareString(tagName, "STACK-ID"))       fDCSFEEObj->SetStack(fContent.Atoi());\r
+    if (CompareString(tagName, "LAYER-ID"))       fDCSFEEObj->SetLayer(fContent.Atoi());\r
+    if (CompareString(tagName, "SINGLEHITTHRES")) fDCSFEEObj->SetSingleHitThres(fContent.Atoi());\r
+    if (CompareString(tagName, "THRPADCLSTHRS"))  fDCSFEEObj->SetThreePadClustThres(fContent.Atoi());\r
+    if (CompareString(tagName, "SELNOZS"))        fDCSFEEObj->SetSelectiveNoZS(fContent.Atoi());\r
+    if (CompareString(tagName, "FASTSTATNOISE"))  fDCSFEEObj->SetFastStatNoise(fContent.Atoi());\r
+    if (CompareString(tagName, "FILTWEIGHT"))     fDCSFEEObj->SetTCFilterWeight(fContent.Atoi());\r
+    if (CompareString(tagName, "FILTSHRTDCYPRM")) fDCSFEEObj->SetTCFilterShortDecPar(fContent.Atoi());\r
+    if (CompareString(tagName, "FILTLNGDCYPRM"))  fDCSFEEObj->SetTCFilterLongDecPar(fContent.Atoi());\r
+    if (CompareString(tagName, "FLTR"))           fDCSFEEObj->SetFilterType(fContent);\r
+    if (CompareString(tagName, "READOUTPAR"))     fDCSFEEObj->SetReadoutParam(fContent);\r
+    if (CompareString(tagName, "TESTPATTERN"))    fDCSFEEObj->SetTestPattern(fContent);\r
+    if (CompareString(tagName, "TRCKLTMODE"))     fDCSFEEObj->SetTrackletMode(fContent);\r
+    if (CompareString(tagName, "TRCKLTDEF"))      fDCSFEEObj->SetTrackletDef(fContent);\r
+    if (CompareString(tagName, "TRIGGERSETUP"))   fDCSFEEObj->SetTriggerSetup(fContent);\r
+    if (CompareString(tagName, "ADDOPTIONS"))     fDCSFEEObj->SetAddOptions(fContent);\r
+    if (CompareString(tagName, "gaintbl")) {\r
+      fLevel1Tag = kInsideNone;\r
+      fCurrentROB = -1;\r
+      fCurrentMCM = -1;\r
+      fCurrentADC = -1;\r
+    }\r
+    if (fLevel1Tag == kInsideGainTable) {\r
+      if (CompareString(tagName, "name"))   fDCSFEEObj->SetGainTableName(fContent);\r
+      if (CompareString(tagName, "desc"))   fDCSFEEObj->SetGainTableDesc(fContent);\r
+      if (CompareString(tagName, "adcdac")) fDCSFEEObj->SetGainTableAdcdac(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+      if (CompareString(tagName, "fgfn"))   fDCSFEEObj->SetGainTableFgfn(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi());\r
+      if (CompareString(tagName, "fgan"))   fDCSFEEObj->SetGainTableFgan(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi());\r
+    }\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
+       if (CompareString(tagName, "gsm")) fDCSFEEObj->SetMCMGlobalState(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+        if (CompareString(tagName, "ni")) fDCSFEEObj->SetMCMStateNI(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+       if (CompareString(tagName, "ev")) fDCSFEEObj->SetMCMEventCnt(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+       if (CompareString(tagName, "ptrg")) fDCSFEEObj->SetMCMPtCnt(fCurrentROB, fCurrentMCM, fContent.Atoi());\r
+      }\r
+    }\r
+  }\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
+//     }\r
+//     if (CompareString(tagName, "serial"))         fDCSGTUObj->SetSerial(fContent.Atoi());\r
+    if (CompareString(tagName, "board_info")) {\r
+      fInsideBoardInfo = false;\r
+      if (fLevel1Tag == kInsideTgu)                                  fDCSGTUObj->GetTgu()->SetBoardInfo(fBoardInfo);\r
+      if (fLevel1Tag == kInsideSegment && fLevel2Tag == kInsideSmu)  fSegment->SetSmuBoardInfo(fBoardInfo);\r
+      if (fLevel1Tag == kInsideSegment && fLevel2Tag == kInsideTmu)  fTmu->SetBoardInfo(fBoardInfo);\r
+    }\r
+    if (CompareString(tagName, "dnr"))            fDCSGTUObj->SetDNR(fContent.Atoi());\r
+    if (CompareString(tagName, "tgu"))            fLevel1Tag = kInsideNone;\r
+    if (CompareString(tagName(0,tagName.Length()-3), "segment")) { \r
+      fDCSGTUObj->GetSegmentArray()->Add(fSegment);\r
+      fLevel1Tag = kInsideNone;\r
+    }\r
+    if (fLevel1Tag == kInsideTgu) {\r
+      if (CompareString(tagName, "ctp_opc"))        fDCSGTUObj->GetTgu()->GetCtpOpcArray()->Add(fCtpOpc);\r
+    } else if (fLevel1Tag == kInsideSegment) {\r
+      if (CompareString(tagName, "smu"))          fLevel2Tag = kInsideNone;\r
+      if (CompareString(tagName(0,3), "tmu")) {\r
+       fSegment->GetTmuArray()->Add(fTmu);\r
+       fLevel2Tag = kInsideNone;\r
       }\r
     }\r
   }\r
@@ -310,15 +485,15 @@ void AliTRDSaxHandler::OnEndElement(const char *name)
   if (fSystem == kInsidePTR) {\r
     // no informations available yet\r
   }\r
-  // store GTU informations\r
-  if (fSystem == kInsideGTU) {\r
-    if (strName.Contains("SMMASK"))\r
-      fHandlerStatus = fDCSGTUObj->SetSMMask(fContent);\r
-    if (strName.Contains("LINKMASK")) \r
-      fHandlerStatus = fDCSGTUObj->SetLinkMask(fCurrentSM, fCurrentStack, fContent);\r
-    if (strName.Contains("STMASK"))\r
-      fDCSGTUObj->SetStackMaskBit(fCurrentSM, fCurrentStack, fContent.Atoi());\r
-  }\r
+//   // store GTU informations\r
+//   if (fSystem == kInsideGTU) {\r
+//     if (CompareString(tagName, "SMMASK"))\r
+//       fHandlerStatus = fDCSGTUObj->SetSMMask(fContent);\r
+//     if (CompareString(tagName, "LINKMASK")) \r
+//       fHandlerStatus = fDCSGTUObj->SetLinkMask(fCurrentSM, fCurrentStack, fContent);\r
+//     if (CompareString(tagName, "STMASK"))\r
+//       fDCSGTUObj->SetStackMaskBit(fCurrentSM, fCurrentStack, fContent.Atoi());\r
+//   }\r
 }\r
 \r
 //_____________________________________________________________________________\r
index 180c71d4509e1e88746cb01822685a3efaff6b63..8c29dd7115355c9e89c0142f96136fbc5fab37ea 100644 (file)
 ////////////////////////////////////////////////////////////////////////////
 
 #include "TObject.h"
+#include "Cal/AliTRDCalDCSGTUCtpOpc.h"
+#include "Cal/AliTRDCalDCSGTUBoardInfo.h"
+#include "Cal/AliTRDCalDCSGTUSegment.h"
+#include "Cal/AliTRDCalDCSGTUTmu.h"
 
 class TObjArray;
 
@@ -26,7 +30,21 @@ class AliTRDCalDCSGTU;
 class AliTRDSaxHandler : public TObject {
 
 public:
-  enum { kInsideFEE = 1, kInsidePTR = 2, kInsideGTU = 3 };
+  enum { 
+    kInsideFEE = 1, 
+    kInsidePTR = 2,
+    kInsideGTU = 3 
+  }; // System level
+  enum { 
+    kInsideTgu = -1,
+    kInsideNone = -2,
+    kInsideSegment = -3,
+    kInsideGainTable = -4 
+  }; // The level under system (1)
+  enum { 
+    kInsideTmu = 10,
+    kInsideSmu = 11 
+  }; // The level under that   (2)
 
   AliTRDSaxHandler();
   AliTRDSaxHandler(const AliTRDSaxHandler &sh);
@@ -35,7 +53,6 @@ public:
 
   TObjArray*    GetDCSFEEDataArray() const { return fFEEArr;        }
   TObjArray*    GetDCSPTRDataArray() const { return fPTRArr;        }
-  TObjArray*    GetDCSGTUDataArray() const { return fGTUArr;        }
   AliTRDCalDCS* GetCalDCSObj(); // to be called by the preprocessor
 
   Int_t         GetHandlerStatus() const { return fHandlerStatus; }
@@ -54,23 +71,35 @@ public:
 
  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
-  TObjArray*       fGTUArr;        // array of AliTRDCalDCSGTU 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;
+  
 
   ClassDef(AliTRDSaxHandler,2);    // The XML file handler for the preprocessor
 };
index c313d099c767f88bb950f4f90d0ff686ab6da59b..9969a1980a0a00a67afd22a84cbabfeb30052192 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "AliTRDCalDCS.h"
 #include "AliTRDCalDCSFEE.h"
+#include "AliTRDCalDCSGTU.h"
 
 ClassImp(AliTRDCalDCS)
   
@@ -49,7 +50,7 @@ AliTRDCalDCS::AliTRDCalDCS()
   ,fGAddOptions(0)
   ,fFEEArr(new TObjArray(540))
   ,fPTRArr(new TObjArray(6))
-  ,fGTUArr(new TObjArray(19))
+  ,fGTUObj(new AliTRDCalDCSGTU())
 {
   //
   // AliTRDCalDCS default constructor
@@ -79,7 +80,7 @@ AliTRDCalDCS::AliTRDCalDCS(const Text_t *name, const Text_t *title)
   ,fGAddOptions(0)
   ,fFEEArr(new TObjArray(540))
   ,fPTRArr(new TObjArray(6))
-  ,fGTUArr(new TObjArray(19))
+  ,fGTUObj(new AliTRDCalDCSGTU())
 {
   //
   // AliTRDCalDCS constructor
@@ -107,9 +108,9 @@ AliTRDCalDCS::AliTRDCalDCS(const AliTRDCalDCS &cd)
   ,fGTrackletDef(0)
   ,fGTriggerSetup(0)
   ,fGAddOptions(0)
-  ,fFEEArr(0)
-  ,fPTRArr(0)
-  ,fGTUArr(0)
+  ,fFEEArr(new TObjArray(540))
+  ,fPTRArr(new TObjArray(6))
+  ,fGTUObj(new AliTRDCalDCSGTU())
 {
   //
   // AliTRDCalDCS copy constructor
index 496d343a91afa7aa178df9dc508730dd3b3f94bf..68c421d07fbb086b3bc007912daf3b77d18331a7 100644 (file)
@@ -33,7 +33,7 @@ class AliTRDCalDCS : public TNamed {
   void    EvaluateGlobalParameters();
   void    SetFEEArr(TObjArray * const fa)      { fFEEArr              = fa;    }
   void    SetPTRArr(TObjArray * const pa)      { fPTRArr              = pa;    }
-  void    SetGTUArr(TObjArray * const ga)      { fGTUArr              = ga;    }
+  void    SetGTUObj(AliTRDCalDCSGTU *go)       { fGTUObj              = go;    }
   
   Int_t   GetGlobalNumberOfTimeBins() const    { return fGNumberOfTimeBins;    }
   Int_t   GetGlobalConfigTag() const           { return fGConfigTag;           }
@@ -52,16 +52,15 @@ class AliTRDCalDCS : public TNamed {
   TString GetGlobalTrackletMode() const        { return fGTrackletMode;        }
   TString GetGlobalTrackletDef() const         { return fGTrackletDef;         }
   TString GetGlobalTriggerSetup() const        { return fGTriggerSetup;        }
-  TString GetGlobalAddOptions() const          { return fGAddOptions;           } 
+  TString GetGlobalAddOptions() const          { return fGAddOptions;          }
   TObjArray*       GetFEEArr() const           { return fFEEArr;               }
   TObjArray*       GetPTRArr() const           { return fPTRArr;               }
-  TObjArray*       GetGTUArr() const           { return fGTUArr;               }
   AliTRDCalDCSFEE* GetCalDCSFEEObj(Int_t det) 
                                  { return (AliTRDCalDCSFEE*)fFEEArr->At(det); }
   AliTRDCalDCSPTR* GetCalDCSPTRObj(Int_t det) 
                                  { return (AliTRDCalDCSPTR*)fPTRArr->At(det); }
-  AliTRDCalDCSGTU* GetCalDCSGTUObj(Int_t det
-                                 { return (AliTRDCalDCSGTU*)fGTUArr->At(det); }
+  AliTRDCalDCSGTU* GetGTUObj(
+                                 { return (AliTRDCalDCSGTU*)fGTUObj;          }
 
  protected:
 
@@ -84,11 +83,13 @@ class AliTRDCalDCS : public TNamed {
   TString fGTrackletDef;         // definition for tracklet mode trk (empty if diverse)
   TString fGTriggerSetup;        // trigger setup (ptrg, autotrg, autol0) (empty if diverse)
   TString fGAddOptions;          // additional options (nopm, nion) (empty if diverse)
+
   
   //individual configuration parameters
   TObjArray *fFEEArr; // config param of the individual chambers
   TObjArray *fPTRArr; // config param of the pretrigger
-  TObjArray *fGTUArr; // config param of the GTU
+
+  AliTRDCalDCSGTU *fGTUObj;
 
   ClassDef(AliTRDCalDCS,2)         //  TRD calibration class for TRD DCS parameters
 
index bde523091e4ac9cd5c167b928e2ee5783e285f5c..ae9e9b632ec8a1750dbdc580b9448c04607f24bf 100644 (file)
@@ -50,6 +50,8 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE()
   ,fTCFilterShortDecPar(-1)\r
   ,fTCFilterLongDecPar(-1)\r
   ,fFastStatNoise(-1)\r
+  ,fGainTableRocType("")\r
+  ,fGainTableRocSerial(0)\r
   ,fFilterType(0)\r
   ,fReadoutParam(0)\r
   ,fTestPattern(0)\r
@@ -59,6 +61,8 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE()
   ,fAddOptions(0) \r
   ,fConfigName(0)\r
   ,fConfigVersion(0)\r
+  ,fGainTableName("")\r
+  ,fGainTableDesc("")\r
 {\r
   //\r
   // AliTRDCalDCSFEE default constructor\r
@@ -69,6 +73,11 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE()
       fRStateNI[i][j]   = -1;\r
       fRStateEV[i][j]   = -1;\r
       fRStatePTRG[i][j] = -1;\r
+      fGainTableAdcdac[i][j] = -1;\r
+      for(Int_t k=0; k<fgkADC; k++) {\r
+       fGainTableFgfn[i][j][k] = -1;\r
+       fGainTableFgan[i][j][k] = -1;\r
+      }\r
     }\r
   }\r
 }\r
@@ -76,30 +85,34 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE()
 \r
 //_____________________________________________________________________________\r
 AliTRDCalDCSFEE::AliTRDCalDCSFEE(const char *name, const char *title)\r
-  :TNamed(name,title)\r
-  ,fStatusBit(0)\r
-  ,fDCSID(-1)\r
-  ,fSM(-1)\r
-  ,fStack(-1)\r
-  ,fLayer(-1)\r
-  ,fNumberOfTimeBins(-1)\r
-  ,fConfigTag(-1)\r
-  ,fSingleHitThres(-1)\r
-  ,fThrPdClsThres(-1)\r
-  ,fSelNoZS(-1)\r
-  ,fTCFilterWeight(-1)\r
-  ,fTCFilterShortDecPar(-1)\r
-  ,fTCFilterLongDecPar(-1)\r
-  ,fFastStatNoise(-1)\r
-  ,fFilterType(0)\r
-  ,fReadoutParam(0)\r
-  ,fTestPattern(0)\r
-  ,fTrackletMode(0)\r
-  ,fTrackletDef(0)\r
-  ,fTriggerSetup(0)\r
-  ,fAddOptions(0) \r
-  ,fConfigName(0)\r
-  ,fConfigVersion(0)\r
+:TNamed(name,title)\r
+,fStatusBit(0)\r
+,fDCSID(-1)\r
+,fSM(-1)\r
+,fStack(-1)\r
+,fLayer(-1)\r
+,fNumberOfTimeBins(-1)\r
+,fConfigTag(-1)\r
+,fSingleHitThres(-1)\r
+,fThrPdClsThres(-1)\r
+,fSelNoZS(-1)\r
+,fTCFilterWeight(-1)\r
+,fTCFilterShortDecPar(-1)\r
+,fTCFilterLongDecPar(-1)\r
+,fFastStatNoise(-1)\r
+,fGainTableRocType("")\r
+,fGainTableRocSerial(0)\r
+,fFilterType(0)\r
+,fReadoutParam(0)\r
+,fTestPattern(0)\r
+,fTrackletMode(0)\r
+,fTrackletDef(0)\r
+,fTriggerSetup(0)\r
+,fAddOptions(0) \r
+,fConfigName(0)\r
+,fConfigVersion(0)\r
+,fGainTableName("")\r
+,fGainTableDesc("")\r
 {\r
   //\r
   // AliTRDCalDCSFEE constructor\r
@@ -110,6 +123,11 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE(const char *name, const char *title)
       fRStateNI[i][j]   = -1;\r
       fRStateEV[i][j]   = -1;\r
       fRStatePTRG[i][j] = -1;\r
+      fGainTableAdcdac[i][j] = -1;\r
+      for(Int_t k=0; k<fgkADC; k++) {\r
+       fGainTableFgfn[i][j][k] = -1;\r
+       fGainTableFgan[i][j][k] = -1;\r
+      }\r
     }\r
   }\r
 }\r
index 248e90889556e938dad8e7d3ae27a64e083e4798..f79ce4b643b7c64fbe22543e944111ec1a66d5fc 100644 (file)
@@ -37,6 +37,7 @@ class AliTRDCalDCSFEE : public TNamed {
   void    SetTCFilterWeight(Int_t tcfw)              { fTCFilterWeight      = tcfw;  }\r
   void    SetTCFilterShortDecPar(Int_t sdp)          { fTCFilterShortDecPar = sdp;   }\r
   void    SetTCFilterLongDecPar(Int_t ldp)           { fTCFilterLongDecPar  = ldp;   }\r
+  void    SetGainTableRocSerial(Int_t gts)           { fGainTableRocSerial  = gts;   }\r
   void    SetFilterType(TString fity)                { fFilterType          = fity;  }\r
   void    SetReadoutParam(TString rpar)              { fReadoutParam        = rpar;  }\r
   void    SetTestPattern(TString tpat)               { fTestPattern         = tpat;  }\r
@@ -46,10 +47,16 @@ class AliTRDCalDCSFEE : public TNamed {
   void    SetAddOptions(TString adop)                { fAddOptions          = adop;  }\r
   void    SetConfigName(TString cfgn)                { fConfigName          = cfgn;  }\r
   void    SetConfigVersion(TString cfgv)             { fConfigVersion       = cfgv;  }\r
+  void    SetGainTableName(TString gt)               { fGainTableName       = gt;    }\r
+  void    SetGainTableDesc(TString gd)               { fGainTableDesc       = gd;    }\r
+  void    SetGainTableRocType(TString gr)            { fGainTableRocType    = gr;    }\r
   void    SetMCMGlobalState(Int_t r,Int_t m,Int_t g) { fRStateGSM[r][m]     = g;     }\r
   void    SetMCMStateNI(Int_t r,Int_t m,Int_t v)     { fRStateNI[r][m]      = v;     }\r
   void    SetMCMEventCnt(Int_t r,Int_t m,Int_t v)    { fRStateEV[r][m]      = v;     }\r
   void    SetMCMPtCnt(Int_t r,Int_t m,Int_t v)       { fRStatePTRG[r][m]    = v;     }\r
+  void    SetGainTableAdcdac(Int_t r,Int_t m,Int_t v){ fGainTableAdcdac[r][m]    = v;}\r
+  void    SetGainTableFgfn(Int_t r,Int_t m,Int_t a,Int_t v) { fGainTableFgfn[r][m][a] = v; }\r
+  void    SetGainTableFgan(Int_t r,Int_t m,Int_t a,Int_t v) { fGainTableFgan[r][m][a] = v; }\r
 \r
   Int_t   GetStatusBit() const                       { return fStatusBit;            }\r
   Int_t   GetDCSid() const                           { return fDCSID;                }\r
@@ -65,6 +72,7 @@ class AliTRDCalDCSFEE : public TNamed {
   Int_t   GetTCFilterShortDecPar() const             { return fTCFilterShortDecPar;  }\r
   Int_t   GetTCFilterLongDecPar() const              { return fTCFilterLongDecPar;   }\r
   Int_t   GetFastStatNoise() const                   { return fFastStatNoise;        }\r
+  Int_t   GetGainTableRocSerial() const              { return fGainTableRocSerial;   }\r
   TString GetFilterType() const                      { return fFilterType;           }\r
   TString GetReadoutParam() const                    { return fReadoutParam;         }\r
   TString GetTestPattern() const                     { return fTestPattern;          }\r
@@ -74,15 +82,22 @@ class AliTRDCalDCSFEE : public TNamed {
   TString GetAddOptions() const                      { return fAddOptions;           }\r
   TString GetConfigName() const                      { return fConfigName;           }\r
   TString GetConfigVersion() const                   { return fConfigVersion;        }\r
+  TString GetGainTableName() const                   { return fGainTableName;        }\r
+  TString GetGainTableDesc() const                   { return fGainTableDesc;        }\r
+  TString GetGainTableRocType() const                { return fGainTableRocType;     }\r
   Int_t   GetMCMGlobalState(Int_t r,Int_t m) const   { return fRStateGSM[r][m];      }\r
   Int_t   GetMCMStateNI(Int_t r,Int_t m) const       { return fRStateNI[r][m];       }\r
   Int_t   GetMCMEventCnt(Int_t r,Int_t m) const      { return fRStateEV[r][m];       }\r
   Int_t   GetMCMPtCnt(Int_t r,Int_t m) const         { return fRStatePTRG[r][m];     }\r
+  Int_t   GetGainTableAdcdac(Int_t r,Int_t m) const  { return fGainTableAdcdac[r][m];}\r
+  Int_t   GetGainTableFgfn(Int_t r,Int_t m,Int_t a) const  { return fGainTableFgfn[r][m][a]; }\r
+  Int_t   GetGainTableFgan(Int_t r,Int_t m,Int_t a) const  { return fGainTableFgan[r][m][a]; }\r
 \r
  protected:\r
 \r
   static const Int_t fgkROB = 8;       // Number of readout boards\r
   static const Int_t fgkMCM = 18;      // Number of MCMs\r
+  static const Int_t fgkADC = 21;      // Number of ADC channels\r
   \r
   Int_t   fStatusBit;                  // 0 if everything is OK, otherwise !=0 (see impl. file)\r
   Int_t   fDCSID;                      // ID of the DCS-Board\r
@@ -102,6 +117,11 @@ class AliTRDCalDCSFEE : public TNamed {
   Int_t   fRStateNI[fgkROB][fgkMCM];   // array of the network interface states of the MCMs\r
   Int_t   fRStateEV[fgkROB][fgkMCM];   // array of the event counters of the MCMs\r
   Int_t   fRStatePTRG[fgkROB][fgkMCM]; // array of the pretrigger counters of the MCMs\r
+  TString fGainTableRocType;           // the roc type from the gain table\r
+  Int_t   fGainTableRocSerial;         // the roc serial of the chamber from the gain table\r
+  Int_t   fGainTableAdcdac[fgkROB][fgkMCM];       // array of gain table adcdac values\r
+  Int_t   fGainTableFgfn[fgkROB][fgkMCM][fgkADC]; // array of gain table fgfn values\r
+  Int_t   fGainTableFgan[fgkROB][fgkMCM][fgkADC]; // array of gain table fgan values\r
   TString fFilterType;                 // filter type (p, pgt, nf)\r
   TString fReadoutParam;               // readout parameter (zs, nozs, testpattern)\r
   TString fTestPattern;                // value of testpattern (for readout param)\r
@@ -111,6 +131,8 @@ class AliTRDCalDCSFEE : public TNamed {
   TString fAddOptions;                 // additional options (nopm, nion)\r
   TString fConfigName;                 // Configuration name\r
   TString fConfigVersion;              // Configuration version\r
+  TString fGainTableName;              // the name of the gain table\r
+  TString fGainTableDesc;              // the description of the gain table\r
 \r
   ClassDef(AliTRDCalDCSFEE,3)          // TRD calibration class for TRD FEE parameters\r
 };\r
index 3e69eb91a0e77d92a893bdfe0e92b0aeda16207c..a89e25c569d2d1b7b7cc68f04646190cce689272 100644 (file)
@@ -28,84 +28,60 @@ ClassImp(AliTRDCalDCSGTU)
 //_____________________________________________________________________________
 AliTRDCalDCSGTU::AliTRDCalDCSGTU()
   :TNamed()
-  ,fDCSID(0)
-  ,fSMMask()
-  ,fStackMask()
-  ,fLinkMask()
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+    ,fDNR(-1)
+    ,fSegmentsArr(new TObjArray())
+    ,fTgu(new AliTRDCalDCSGTUTgu())
 {
   //
   // AliTRDCalDCSGTU default constructor
   //
-
-  // link not active: 0, link active: 1, bit not set: 2
-  for (Int_t i=0;i<18;i++) {
-    fSMMask[i] = 2;
-    for (Int_t j=0;j<5;j++) {
-      fStackMask[i][j] = 2;
-      for (Int_t k=0;k<12;k++) {
-       fLinkMask[i][j][k] = 2;
-      }
-    }
-  }
-
+  fSegmentsArr->SetOwner();
 }
 
 //_____________________________________________________________________________
 AliTRDCalDCSGTU::AliTRDCalDCSGTU(const char *name, const char *title)
   :TNamed(name,title)
-  ,fDCSID(0)
-  ,fSMMask()
-  ,fStackMask()
-  ,fLinkMask()
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+    ,fDNR(-1)
+    ,fSegmentsArr(new TObjArray())
+    ,fTgu(new AliTRDCalDCSGTUTgu())
 {
   //
   // AliTRDCalDCSGTU constructor
   //
-
-  // link not active: 0, link active: 1, bit not set: 2
-  for(int i=0;i<18;i++) {
-    fSMMask[i] = 2;
-    for(int j=0;j<5;j++) {
-      fStackMask[i][j] = 2;
-      for(int k=0;k<12;k++) {
-       fLinkMask[i][j][k] = 2;
-      }
-    }
-  }
-
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDCalDCSGTU::SetSMMask(const char* smmask)
+AliTRDCalDCSGTU::AliTRDCalDCSGTU(const AliTRDCalDCSGTU&)
+  :TNamed("","")
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+    ,fDNR(-1)
+    ,fSegmentsArr(new TObjArray())
+    ,fTgu(new AliTRDCalDCSGTUTgu())
 {
-  // if something goes wrong here, the errorcode is 10x
-  TString smMaskStr = smmask;
-  // return false in case of wrong length
-  if (smMaskStr.Length() != 18) return 101;
-
-  for (Int_t i=0;i<18;i++) {
-    TString bit = smMaskStr[i];
-    if (!bit.IsDigit()) return 102; // must be 0 or 1 -> a digit!
-    fSMMask[i] = bit.Atoi();
-  }
-  return 0;
+  //
+  // AliTRDCalDCSGTU constructor
+  //
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDCalDCSGTU::SetLinkMask(Int_t smid, Int_t stid, const char* lkmask)
+AliTRDCalDCSGTU& AliTRDCalDCSGTU::operator=(const AliTRDCalDCSGTU& sh)
 {
-  // if something goes wrong here, the errorcode is 11x
-  if (smid == 99 || stid == 99) return 111; // 99: missing assignment
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+  if (&sh == this) return *this;
+  
+  new (this) AliTRDCalDCSGTU(sh);
+  return *this;
+}
 
-  TString lkMaskStr = lkmask;
-  // return false in case of wrong length
-  if (lkMaskStr.Length() != 12) return 112;
 
-  for (Int_t i=0;i<12;i++) {
-    TString bit = lkMaskStr[i];
-    if (!bit.IsDigit()) return 113; // must be 0 or 1
-    fLinkMask[smid][stid][i] = bit.Atoi();
-  }
-  return 0;
-}
 
index 7c075950056ae442f9f45ebbf1e9594b194bd1b0..d1042eb508dd8ec14c62a5e336e06c1c3dab7e6e 100644 (file)
@@ -12,6 +12,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "TNamed.h"
+#include "TObjArray.h"
+#include "AliTRDCalDCSGTUTgu.h"
 
 class TString;
 
@@ -21,30 +23,35 @@ class AliTRDCalDCSGTU : public TNamed {
 
   AliTRDCalDCSGTU();
   AliTRDCalDCSGTU(const char *name, const char *title);
+  AliTRDCalDCSGTU(const AliTRDCalDCSGTU &);
+  AliTRDCalDCSGTU& operator=(const AliTRDCalDCSGTU& sh);
   virtual ~AliTRDCalDCSGTU() { };
 
-  void    SetDCSid(Int_t dcsid)                    { fDCSID                     = dcsid; }  
-  void    SetSMMaskBit(Int_t smid, Int_t mbit)     { fSMMask[smid]               = mbit; }
-  void    SetStackMaskBit(Int_t smid, Int_t stid, Int_t mbit)
-                                                   { fStackMask[smid][stid]      = mbit; }
-  void    SetLinkMaskBit(Int_t smid, Int_t stid, Int_t lkid, Int_t mbit)
-                                                   { fLinkMask[smid][stid][lkid] = mbit; }
-  Int_t   SetSMMask(const char *smmask);
-  Int_t   SetLinkMask(Int_t smid, Int_t stid, const char *lkmask);
-
-  Int_t   GetDCSid() const                         { return fDCSID;                      }
-  char    GetSMMaskBit(Int_t smid) const           { return fSMMask[smid];               }
-  char    GetStackMaskBit(Int_t smid, Int_t stid) const
-                                                   { return fStackMask[smid][stid];      }
-  char    GetLinkMaskBit(Int_t smid, Int_t stid, Int_t lkid) const
-                                                   { return fLinkMask[smid][stid][lkid]; }
+  Int_t   GetRunNumber()                              { return fRunNumber;                    }
+  Int_t   GetSORFlag()                                { return fSORFlag;                      }
+  Int_t   GetSerial()                                 { return fSerial;                       }
+  Int_t   GetDNR()                                    { return fDNR;                          }
+
+  void    SetRunNumber(Int_t rn)                      { fRunNumber = rn;                      }
+  void    SetSORFlag(Int_t fg)                        { fSORFlag = fg;                        }
+  void    SetSerial(Int_t se)                         { fSerial = se;                         }
+  void    SetDNR(Int_t dn)                            { fDNR = dn;                            }
+
+  TObjArray* GetSegmentArray() const                  { return fSegmentsArr;                  }
+  void SetSegmentArray(TObjArray *sa)                 { fSegmentsArr = sa;                    }
+
+  AliTRDCalDCSGTUTgu* GetTgu() const                  { return fTgu;                          }
+  void SetTgu(AliTRDCalDCSGTUTgu* tg)                 { fTgu = tg;                            }
 
  protected:
-  
-  Int_t   fDCSID;                  //  ID of the DCS-Board
-  Int_t          fSMMask[18];             //  supermodule mask [SM-ID]
-  Int_t          fStackMask[18][5];       //  stack mask [SM-ID][Stack-ID]
-  Int_t   fLinkMask[18][5][12];           //  link mask [SM-ID][Stack-ID][Link-ID]
+  Int_t   fRunNumber;
+  Int_t   fSORFlag;
+  Int_t   fSerial;
+  Int_t   fDNR;
+
+  TObjArray *fSegmentsArr;
+
+  AliTRDCalDCSGTUTgu* fTgu;
 
   ClassDef(AliTRDCalDCSGTU,1)      //  TRD calibration class for TRD GTU parameters
 
diff --git a/TRD/Cal/AliTRDCalDCSGTUBoardInfo.cxx b/TRD/Cal/AliTRDCalDCSGTUBoardInfo.cxx
new file mode 100644 (file)
index 0000000..464c150
--- /dev/null
@@ -0,0 +1,70 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSGTU.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSGTUBoardInfo.h"
+
+ClassImp(AliTRDCalDCSGTUBoardInfo)
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUBoardInfo::AliTRDCalDCSGTUBoardInfo()
+  :TNamed()
+    ,fId("")
+    ,fType(0)
+    ,fPciGa(0)
+    ,fHwDate("")
+    ,fHwRev(0)
+    ,fHwClean(0)
+    ,fSwDate("")
+    ,fSwRev(0)
+    ,fSwClean(0)
+{
+  //
+  // AliTRDCalDCSGTUBoardInfo default constructor
+  //
+
+
+
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUBoardInfo::AliTRDCalDCSGTUBoardInfo(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fId("")
+    ,fType(0)
+    ,fPciGa(0)
+    ,fHwDate("")
+    ,fHwRev(0)
+    ,fHwClean(0)
+    ,fSwDate("")
+    ,fSwRev(0)
+    ,fSwClean(0)
+{
+  //
+  // AliTRDCalDCSGTUBoardInfo constructor
+  //
+
+
+
+}
+
+
diff --git a/TRD/Cal/AliTRDCalDCSGTUBoardInfo.h b/TRD/Cal/AliTRDCalDCSGTUBoardInfo.h
new file mode 100644 (file)
index 0000000..eab78ad
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef AliTRDCALDCSGTUBoardInfo_H
+#define AliTRDCALDCSGTUBoardInfo_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSGTUBoardInfo.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+
+class TString;
+
+class AliTRDCalDCSGTUBoardInfo : public TNamed {
+
+ public:
+
+  AliTRDCalDCSGTUBoardInfo();
+  AliTRDCalDCSGTUBoardInfo(const char *name, const char *title);
+  virtual ~AliTRDCalDCSGTUBoardInfo() { };
+
+  TString GetId()                                     { return fId;                           }
+  Int_t   GetType()                                   { return fType;                         }
+  Int_t   GetPciGa()                                  { return fPciGa;                        }
+
+  void    SetId(TString id)                           { fId = id;                             }
+  void    SetType(Int_t ty)                           { fType = ty;                           }
+  void    SetPciGa(Int_t ga)                          { fPciGa = ga;                          }
+
+  TString GetHwDate()                                 { return fHwDate;                       }
+  Int_t   GetHwRev()                                  { return fHwRev;                        }
+  Int_t   GetHwClean()                                { return fHwClean;                      }
+
+  void    SetHwDate(TString hd)                       { fHwDate = hd;                         }
+  void    SetHwRev(Int_t hr)                          { fHwRev = hr;                          }
+  void    SetHwClean(Int_t hc)                        { fHwClean = hc;                        }
+
+  TString GetSwDate()                                 { return fSwDate;                       }
+  Int_t   GetSwRev()                                  { return fSwRev;                        }
+  Int_t   GetSwClean()                                { return fSwClean;                      }
+
+  void    SetSwDate(TString sd)                       { fSwDate = sd;                         }
+  void    SetSwRev(Int_t sr)                          { fSwRev = sr;                          }
+  void    SetSwClean(Int_t sc)                        { fSwClean = sc;                        }
+
+  protected:
+  TString fId;
+  Int_t   fType;
+  Int_t   fPciGa;
+
+  TString fHwDate;
+  Int_t   fHwRev;
+  Int_t   fHwClean;
+
+  TString fSwDate;
+  Int_t   fSwRev;
+  Int_t   fSwClean;
+
+  ClassDef(AliTRDCalDCSGTUBoardInfo,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSGTUCtpOpc.cxx b/TRD/Cal/AliTRDCalDCSGTUCtpOpc.cxx
new file mode 100644 (file)
index 0000000..9b29ece
--- /dev/null
@@ -0,0 +1,64 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSGTUCtpOpc.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSGTUCtpOpc.h"
+
+ClassImp(AliTRDCalDCSGTUCtpOpc)
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUCtpOpc::AliTRDCalDCSGTUCtpOpc()
+  :TNamed()  
+    ,fId(0)
+    ,fOpcode(0)
+    ,fDirection(0)
+    ,fInverted(0)
+    ,fDelay(0)
+    ,fConnected(0)
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+
+
+
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUCtpOpc::AliTRDCalDCSGTUCtpOpc(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fId(0)
+    ,fOpcode(0)
+    ,fDirection(0)
+    ,fInverted(0)
+    ,fDelay(0)
+    ,fConnected(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+
+
+
+}
+
+
diff --git a/TRD/Cal/AliTRDCalDCSGTUCtpOpc.h b/TRD/Cal/AliTRDCalDCSGTUCtpOpc.h
new file mode 100644 (file)
index 0000000..332d38e
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef AliTRDCALDCSGTUCtpOpc_H
+#define AliTRDCALDCSGTUCtpOpc_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSGTUCtpOpc.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+
+class TString;
+
+class AliTRDCalDCSGTUCtpOpc : public TNamed {
+
+ public:
+
+  AliTRDCalDCSGTUCtpOpc();
+  AliTRDCalDCSGTUCtpOpc(const char *name, const char *title);
+  virtual ~AliTRDCalDCSGTUCtpOpc() { };
+
+  Int_t   GetId()                                     { return fId;                           }
+  Int_t   GetOpcode()                                 { return fOpcode;                       }
+  Int_t   GetDirection()                              { return fDirection;                    }
+  Int_t   GetInverted()                               { return fInverted;                     }
+  Int_t   GetDelay()                                  { return fDelay;                        }
+  Int_t   GetConnected()                              { return fConnected;                    }
+
+  void    SetId(Int_t id)                             { fId = id;                             }
+  void    SetOpcode(Int_t op)                         { fOpcode = op;                         }
+  void    SetDirection(Int_t di)                      { fDirection = di;                      }
+  void    SetInverted(Int_t in)                       { fInverted = in;                       }
+  void    SetDelay(Int_t de)                          { fDelay = de;                          }
+  void    SetConnected(Int_t co)                      { fConnected = co;                      }
+
+  protected:
+  Int_t   fId;
+  Int_t   fOpcode;
+  Int_t   fDirection;
+  Int_t   fInverted;
+  Int_t   fDelay;
+  Int_t   fConnected;
+
+  ClassDef(AliTRDCalDCSGTUCtpOpc,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSGTUSegment.cxx b/TRD/Cal/AliTRDCalDCSGTUSegment.cxx
new file mode 100644 (file)
index 0000000..7bb3b5b
--- /dev/null
@@ -0,0 +1,115 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSGTUSegment.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSGTUSegment.h"
+
+ClassImp(AliTRDCalDCSGTUSegment)
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUSegment::AliTRDCalDCSGTUSegment()
+  :TNamed()
+    ,fId(0)
+    ,fFromRunNumber(0)
+    ,fFromSORFlag(0)
+    ,fChild(0)
+    ,fTmuArr(new TObjArray(5))
+    ,fSmuStackMask(0)
+    ,fSmuTracklets(0)
+    ,fSmuTracks(0)
+    ,fSmuIdelay(0)
+    ,fSmuTriggerWindowL1Low(0)
+    ,fSmuTriggerWindowL1High(0)
+    ,fSmuTriggerWindowL2Low(0)
+    ,fSmuTriggerWindowL2High(0)
+    ,fSmuTtcEmulatorEnable(0)
+    ,fSmuBoardInfo()
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+  fTmuArr->SetOwner();
+
+
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUSegment::AliTRDCalDCSGTUSegment(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fId(0)
+    ,fFromRunNumber(0)
+    ,fFromSORFlag(0)
+    ,fChild(0)
+    ,fTmuArr(new TObjArray(5))
+    ,fSmuStackMask(0)
+    ,fSmuTracklets(0)
+    ,fSmuTracks(0)
+    ,fSmuIdelay(0)
+    ,fSmuTriggerWindowL1Low(0)
+    ,fSmuTriggerWindowL1High(0)
+    ,fSmuTriggerWindowL2Low(0)
+    ,fSmuTriggerWindowL2High(0)
+    ,fSmuTtcEmulatorEnable(0)
+    ,fSmuBoardInfo()
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUSegment::AliTRDCalDCSGTUSegment(const AliTRDCalDCSGTUSegment&)
+  :TNamed("","")
+    ,fId(0)
+    ,fFromRunNumber(0)
+    ,fFromSORFlag(0)
+    ,fChild(0)
+    ,fTmuArr(new TObjArray(5))
+    ,fSmuStackMask(0)
+    ,fSmuTracklets(0)
+    ,fSmuTracks(0)
+    ,fSmuIdelay(0)
+    ,fSmuTriggerWindowL1Low(0)
+    ,fSmuTriggerWindowL1High(0)
+    ,fSmuTriggerWindowL2Low(0)
+    ,fSmuTriggerWindowL2High(0)
+    ,fSmuTtcEmulatorEnable(0)
+    ,fSmuBoardInfo()
+{
+  //
+  // AliTRDCalDCSGTUSegment constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUSegment& AliTRDCalDCSGTUSegment::operator=(const AliTRDCalDCSGTUSegment& sh)
+{
+  //
+  // AliTRDCalDCSGTUSegment constructor
+  //
+  if (&sh == this) return *this;
+  
+  new (this) AliTRDCalDCSGTUSegment(sh);
+  return *this;
+}
+
+
diff --git a/TRD/Cal/AliTRDCalDCSGTUSegment.h b/TRD/Cal/AliTRDCalDCSGTUSegment.h
new file mode 100644 (file)
index 0000000..cf13508
--- /dev/null
@@ -0,0 +1,89 @@
+#ifndef AliTRDCALDCSGTUSegment_H
+#define AliTRDCALDCSGTUSegment_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSGTUSegment.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+#include "TObjArray.h"
+#include "AliTRDCalDCSGTUBoardInfo.h"
+
+class TString;
+
+class AliTRDCalDCSGTUSegment : public TNamed {
+
+ public:
+
+  AliTRDCalDCSGTUSegment();
+  AliTRDCalDCSGTUSegment(const char *name, const char *title);
+  AliTRDCalDCSGTUSegment(const AliTRDCalDCSGTUSegment &);
+  AliTRDCalDCSGTUSegment& operator=(const AliTRDCalDCSGTUSegment& sh);
+  virtual ~AliTRDCalDCSGTUSegment() { };
+
+  Int_t   GetId()                                     { return fId;                           }
+  Int_t   GetFromRunNumber()                          { return fFromRunNumber;                }
+  Int_t   GetFromSORFlag()                            { return fFromSORFlag;                  }
+  Int_t   GetFromChild()                                  { return fChild;                        }
+
+  void    SetId(Int_t id)                             { fId = id;                             }
+  void    SetFromRunNumber(Int_t rn)                      { fFromRunNumber = rn;                  }
+  void    SetFromSORFlag(Int_t fg)                    { fFromSORFlag = fg;                    }
+  void    SetFromChild(Int_t ch)                          { fChild = ch;                          }
+
+  TObjArray* GetTmuArray() const                      { return fTmuArr;                       }
+  void SetTmuArray(TObjArray *ta)                     { fTmuArr = ta;                         }
+
+  TString GetSmuStackMask()                           { return fSmuStackMask;                 }
+  Int_t   GetSmuTracklets()                           { return fSmuTracklets;                 }
+  Int_t   GetSmuTracks()                              { return fSmuTracks;                    }
+  Int_t   GetSmuIdelay()                              { return fSmuIdelay;                    }
+  Int_t   GetSmuTriggerWindowL1Low()                  { return fSmuTriggerWindowL1Low;        }
+  Int_t   GetSmuTriggerWindowL1High()                 { return fSmuTriggerWindowL1High;       }
+  Int_t   GetSmuTriggerWindowL2Low()                  { return fSmuTriggerWindowL2Low;        }
+  Int_t   GetSmuTriggerWindowL2High()                 { return fSmuTriggerWindowL2High;       }
+  Int_t   GetSmuTtcEmulatorEnable()                   { return fSmuTtcEmulatorEnable;         }
+
+  void    SetSmuStackMask(TString sm)                 { fSmuStackMask = sm;                   }
+  void    SetSmuTracklets(Int_t ts)                   { fSmuTracklets = ts;                   }
+  void    SetSmuTracks(Int_t tk)                      { fSmuTracks = tk;                      }
+  void    SetSmuIdelay(Int_t id)                      { fSmuIdelay = id;                      }
+  void    SetSmuTriggerWindowL1Low(Int_t ll)          { fSmuTriggerWindowL1Low = ll;          }
+  void    SetSmuTriggerWindowL1High(Int_t lh)         { fSmuTriggerWindowL1High = lh;         }
+  void    SetSmuTriggerWindowL2Low(Int_t ml)          { fSmuTriggerWindowL2Low = ml;          }
+  void    SetSmuTriggerWindowL2High(Int_t mh)         { fSmuTriggerWindowL2High = mh;         }
+  void    SetSmuTtcEmulatorEnable(Int_t te)           { fSmuTtcEmulatorEnable = te;           }
+
+  AliTRDCalDCSGTUBoardInfo* GetSmuBoardInfo()         { return fSmuBoardInfo;                 }
+  void SetSmuBoardInfo(AliTRDCalDCSGTUBoardInfo *bi)  { fSmuBoardInfo = bi;                   }
+
+  protected:
+  Int_t   fId;
+  Int_t   fFromRunNumber;
+  Int_t   fFromSORFlag;
+  Int_t   fChild;
+
+  TObjArray *fTmuArr;
+
+  TString fSmuStackMask;
+  Int_t   fSmuTracklets;
+  Int_t   fSmuTracks;
+  Int_t   fSmuIdelay;
+  Int_t   fSmuTriggerWindowL1Low;
+  Int_t   fSmuTriggerWindowL1High;
+  Int_t   fSmuTriggerWindowL2Low;
+  Int_t   fSmuTriggerWindowL2High;
+  Int_t   fSmuTtcEmulatorEnable;
+
+  AliTRDCalDCSGTUBoardInfo *fSmuBoardInfo;
+
+  ClassDef(AliTRDCalDCSGTUSegment,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSGTUTgu.cxx b/TRD/Cal/AliTRDCalDCSGTUTgu.cxx
new file mode 100644 (file)
index 0000000..dd3ba31
--- /dev/null
@@ -0,0 +1,93 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSGTUTgu.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSGTUTgu.h"
+
+ClassImp(AliTRDCalDCSGTUTgu)
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTgu::AliTRDCalDCSGTUTgu()
+  :TNamed()
+    ,fFromRunNum(0)
+    ,fFromSORFlag(0)
+    ,fFromChild(0)
+    ,fSegmentMask("")
+    ,fBusyMask("")
+    ,fContribMask("")
+    ,fBoardInfo(new AliTRDCalDCSGTUBoardInfo())
+    ,fCtpOpcArr(new TObjArray())
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+  fCtpOpcArr->SetOwner();
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTgu::AliTRDCalDCSGTUTgu(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fFromRunNum(0)
+    ,fFromSORFlag(0)
+    ,fFromChild(0)
+    ,fSegmentMask("")
+    ,fBusyMask("")
+    ,fContribMask("")
+    ,fBoardInfo(new AliTRDCalDCSGTUBoardInfo())
+    ,fCtpOpcArr(new TObjArray())
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTgu::AliTRDCalDCSGTUTgu(const AliTRDCalDCSGTUTgu&)
+  :TNamed("","")
+    ,fFromRunNum(0)
+    ,fFromSORFlag(0)
+    ,fFromChild(0)
+    ,fSegmentMask("")
+    ,fBusyMask("")
+    ,fContribMask("")
+    ,fBoardInfo(0)
+    ,fCtpOpcArr(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTgu& AliTRDCalDCSGTUTgu::operator=(const AliTRDCalDCSGTUTgu& sh)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+  if (&sh == this) return *this;
+
+  new (this) AliTRDCalDCSGTUTgu(sh);
+  return *this;
+}
+
+
+
diff --git a/TRD/Cal/AliTRDCalDCSGTUTgu.h b/TRD/Cal/AliTRDCalDCSGTUTgu.h
new file mode 100644 (file)
index 0000000..14cef41
--- /dev/null
@@ -0,0 +1,66 @@
+#ifndef AliTRDCALDCSGTUTgu_H
+#define AliTRDCALDCSGTUTgu_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSGTUTgu.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+#include "TObjArray.h"
+#include "AliTRDCalDCSGTUBoardInfo.h"
+
+class TString;
+
+class AliTRDCalDCSGTUTgu : public TNamed {
+
+ public:
+
+  AliTRDCalDCSGTUTgu();
+  AliTRDCalDCSGTUTgu(const char *name, const char *title);
+  AliTRDCalDCSGTUTgu(const AliTRDCalDCSGTUTgu&);
+  AliTRDCalDCSGTUTgu &operator=(const AliTRDCalDCSGTUTgu &sh);
+  virtual ~AliTRDCalDCSGTUTgu() { };
+//   ~AliTRDCalDCSGTUTgu() { };
+
+  Int_t   GetFromRunNumber()                          { return fFromRunNum;                   }
+  Int_t   GetFromSORFlag()                            { return fFromSORFlag;                  }
+  Int_t   GetFromChild()                              { return fFromChild;                    }
+  TString GetSegmentMask()                            { return fSegmentMask;                  }
+  TString GetBusyMask()                               { return fBusyMask;                     }
+  TString GetContribMask()                            { return fContribMask;                  }
+
+  void    SetFromRunNumber(Int_t rn)                  { fFromRunNum = rn;                     }
+  void    SetFromSORFlag(Int_t fs)                    { fFromSORFlag = fs;                    }
+  void    SetFromChild(Int_t ch)                      { fFromChild = ch;                      }
+  void    SetSegmentMask(TString sm)                  { fSegmentMask = sm;                    }
+  void    SetBusyMask(TString bm)                     { fBusyMask = bm;                       }
+  void    SetContribMask(TString cm)                  { fContribMask = cm;                    }
+
+  AliTRDCalDCSGTUBoardInfo* GetBoardInfo()            { return fBoardInfo;                    }
+  void SetBoardInfo(AliTRDCalDCSGTUBoardInfo *bi)     { fBoardInfo = bi;                      }
+
+  TObjArray* GetCtpOpcArray() const                   { return fCtpOpcArr;                    }
+  void SetCtpOpcArray(TObjArray *ca)                  { fCtpOpcArr = ca;                      }
+
+  protected:
+  Int_t   fFromRunNum;
+  Int_t   fFromSORFlag;
+  Int_t   fFromChild;
+  TString fSegmentMask;
+  TString fBusyMask;
+  TString fContribMask;
+
+  AliTRDCalDCSGTUBoardInfo *fBoardInfo;
+
+  TObjArray *fCtpOpcArr;
+  
+  ClassDef(AliTRDCalDCSGTUTgu,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSGTUTmu.cxx b/TRD/Cal/AliTRDCalDCSGTUTmu.cxx
new file mode 100644 (file)
index 0000000..b209cd4
--- /dev/null
@@ -0,0 +1,93 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSGTUTmu.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSGTUTmu.h"
+
+ClassImp(AliTRDCalDCSGTUTmu)
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTmu::AliTRDCalDCSGTUTmu()
+  :TNamed()
+    ,fLinkMask("")
+    ,fId(0)
+    ,fPatternGeneratorEnable(0)
+    ,fPatternGeneratorDataWords(0)
+    ,fPatternGeneratorTrackletWords(0)
+    ,fBoardInfo(new AliTRDCalDCSGTUBoardInfo())
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+
+
+
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTmu::AliTRDCalDCSGTUTmu(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fLinkMask("")
+    ,fId(0)
+    ,fPatternGeneratorEnable(0)
+    ,fPatternGeneratorDataWords(0)
+    ,fPatternGeneratorTrackletWords(0)
+    ,fBoardInfo(new AliTRDCalDCSGTUBoardInfo())
+{
+  //
+  // AliTRDCalDCSGTUTmu constructor
+  //
+
+
+
+}
+
+
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTmu::AliTRDCalDCSGTUTmu(const AliTRDCalDCSGTUTmu &)
+  :TNamed("","")
+    ,fLinkMask("")
+    ,fId(0)
+    ,fPatternGeneratorEnable(0)
+    ,fPatternGeneratorDataWords(0)
+    ,fPatternGeneratorTrackletWords(0)
+    ,fBoardInfo(new AliTRDCalDCSGTUBoardInfo())
+{
+  //
+  // AliTRDCalDCSGTUTmu constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSGTUTmu& AliTRDCalDCSGTUTmu::operator=(const AliTRDCalDCSGTUTmu& sh)
+{
+  //
+  // AliTRDCalDCSGTUTmu constructor
+  //
+  if (&sh == this) return *this;
+  
+  new (this) AliTRDCalDCSGTUTmu(sh);
+  return *this;
+}
+
+
diff --git a/TRD/Cal/AliTRDCalDCSGTUTmu.h b/TRD/Cal/AliTRDCalDCSGTUTmu.h
new file mode 100644 (file)
index 0000000..2224b0d
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef AliTRDCALDCSGTUTmu_H
+#define AliTRDCALDCSGTUTmu_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSGTU.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+#include "AliTRDCalDCSGTUBoardInfo.h"
+
+class TString;
+
+class AliTRDCalDCSGTUTmu : public TNamed {
+
+ public:
+
+  AliTRDCalDCSGTUTmu();
+  AliTRDCalDCSGTUTmu(const char *name, const char *title);
+  AliTRDCalDCSGTUTmu(const AliTRDCalDCSGTUTmu&);       
+  AliTRDCalDCSGTUTmu &operator=(const AliTRDCalDCSGTUTmu &sh);
+  virtual ~AliTRDCalDCSGTUTmu() { };
+
+  TString GetLinkMask()                               { return fLinkMask;                     }
+  Int_t   GetId()                                     { return fId;                           }
+  Int_t   GetPatternGeneratorEnable()                 { return fPatternGeneratorEnable;       }
+  Int_t   GetPatternGeneratorDataWords()              { return fPatternGeneratorDataWords;    }
+  Int_t   GetPatternGeneratorTrackletWordsl()         { return fPatternGeneratorTrackletWords;}
+
+  void    SetLinkMask(TString lm)                     { fLinkMask = lm;                       }
+  void    SetId(Int_t id)                             { fId = id;                             }
+  void    SetPatternGeneratorEnable(Int_t pe)         { fPatternGeneratorEnable = pe;         }
+  void    SetPatternGeneratorDataWords(Int_t pw)      { fPatternGeneratorDataWords = pw;      }
+  void    SetPatternGeneratorTrackletWords(Int_t pt) { fPatternGeneratorTrackletWords = pt;  }
+
+  AliTRDCalDCSGTUBoardInfo* GetBoardInfo()         { return fBoardInfo;                    }
+  void SetBoardInfo(AliTRDCalDCSGTUBoardInfo *bi)  { fBoardInfo = bi;                      }
+
+  protected:
+  TString fLinkMask;
+  Int_t   fId;
+  Int_t   fPatternGeneratorEnable;
+  Int_t   fPatternGeneratorDataWords;
+  Int_t   fPatternGeneratorTrackletWords;
+
+  AliTRDCalDCSGTUBoardInfo *fBoardInfo;
+
+  ClassDef(AliTRDCalDCSGTUTmu,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSPTRCba.cxx b/TRD/Cal/AliTRDCalDCSPTRCba.cxx
new file mode 100644 (file)
index 0000000..be0e4ee
--- /dev/null
@@ -0,0 +1,183 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSPTRCba.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSPTRCba.h"
+
+ClassImp(AliTRDCalDCSPTRCba)
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRCba::AliTRDCalDCSPTRCba()
+  :TNamed()
+    ,fSide("")
+    ,fPrimary(0)
+    ,fClkLb(0)
+    ,fClkHb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo28ParralelLb(0)                                                                                                             
+    ,fTo28ParralelHb(0)                                                                                                             
+    ,fTo29ParralelLb(0)                                                                                                             
+    ,fTo29ParralelHb(0)                                                                                                             
+    ,fTo30ParralelLb(0)                                                                                                             
+    ,fTo30ParralelHb(0)                                                                                                                
+    ,fTo31ParralelLb(0)                                                                                                             
+    ,fTo31ParralelHb(0)
+    ,fTo32ParralelLb(0)
+    ,fTo32ParralelHb(0)
+    ,fTo33ParralelLb(0)
+    ,fTo33ParralelHb(0)
+    ,fTo34ParralelLb(0)
+    ,fTo34ParralelHb(0)
+    ,fTo35ParralelLb(0)
+    ,fTo35ParralelHb(0)
+    ,fTo36ParralelLb(0)
+    ,fTo36ParralelHb(0)
+    ,fBitsToCbB42Lb(0)
+    ,fBitsToCbB42Hb(0)
+    ,fBitsToCbB43Lb(0)
+    ,fBitsToCbB43Hb(0)
+    ,fBitsToCbB44Lb(0)
+    ,fBitsToCbB44Hb(0)
+    ,fBitsToCbB45Lb(0)
+    ,fBitsToCbB45Hb(0)
+    ,fChDelayT0(0)
+    ,fChDelayV0(0)
+    ,fChDelayV1(0)
+    ,fChDelayV2(0)
+    ,fChDelayV3(0)
+    ,fChDisableT0(0)
+    ,fChDisableV0(0)
+    ,fChDisableV1(0)
+    ,fChDisableV2(0)
+    ,fChDisableV3(0)
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+  fSegmentsArr->SetOwner();
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRCba::AliTRDCalDCSPTRCba(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fSide("")
+    ,fPrimary(0)
+    ,fClkLb(0)
+    ,fClkHb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo28ParralelLb(0)                                                                                                             
+    ,fTo28ParralelHb(0)                                                                                                             
+    ,fTo29ParralelLb(0)                                                                                                             
+    ,fTo29ParralelHb(0)                                                                                                             
+    ,fTo30ParralelLb(0)                                                                                                             
+    ,fTo30ParralelHb(0)                                                                                                                
+    ,fTo31ParralelLb(0)                                                                                                             
+    ,fTo31ParralelHb(0)
+    ,fTo32ParralelLb(0)
+    ,fTo32ParralelHb(0)
+    ,fTo33ParralelLb(0)
+    ,fTo33ParralelHb(0)
+    ,fTo34ParralelLb(0)
+    ,fTo34ParralelHb(0)
+    ,fTo35ParralelLb(0)
+    ,fTo35ParralelHb(0)
+    ,fTo36ParralelLb(0)
+    ,fTo36ParralelHb(0)
+    ,fBitsToCbB42Lb(0)
+    ,fBitsToCbB42Hb(0)
+    ,fBitsToCbB43Lb(0)
+    ,fBitsToCbB43Hb(0)
+    ,fBitsToCbB44Lb(0)
+    ,fBitsToCbB44Hb(0)
+    ,fBitsToCbB45Lb(0)
+    ,fBitsToCbB45Hb(0)
+    ,fChDelayT0(0)
+    ,fChDelayV0(0)
+    ,fChDelayV1(0)
+    ,fChDelayV2(0)
+    ,fChDelayV3(0)
+    ,fChDisableT0(0)
+    ,fChDisableV0(0)
+    ,fChDisableV1(0)
+    ,fChDisableV2(0)
+    ,fChDisableV3(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRCba::AliTRDCalDCSPTRCba(const AliTRDCalDCSPTRCba &cd)
+  :TNamed("","")
+    ,fSide("")
+    ,fPrimary(0)
+    ,fClkLb(0)
+    ,fClkHb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo28ParralelLb(0)                                                                                                             
+    ,fTo28ParralelHb(0)                                                                                                             
+    ,fTo29ParralelLb(0)                                                                                                             
+    ,fTo29ParralelHb(0)                                                                                                             
+    ,fTo30ParralelLb(0)                                                                                                             
+    ,fTo30ParralelHb(0)                                                                                                                
+    ,fTo31ParralelLb(0)                                                                                                             
+    ,fTo31ParralelHb(0)
+    ,fTo32ParralelLb(0)
+    ,fTo32ParralelHb(0)
+    ,fTo33ParralelLb(0)
+    ,fTo33ParralelHb(0)
+    ,fTo34ParralelLb(0)
+    ,fTo34ParralelHb(0)
+    ,fTo35ParralelLb(0)
+    ,fTo35ParralelHb(0)
+    ,fTo36ParralelLb(0)
+    ,fTo36ParralelHb(0)
+    ,fBitsToCbB42Lb(0)
+    ,fBitsToCbB42Hb(0)
+    ,fBitsToCbB43Lb(0)
+    ,fBitsToCbB43Hb(0)
+    ,fBitsToCbB44Lb(0)
+    ,fBitsToCbB44Hb(0)
+    ,fBitsToCbB45Lb(0)
+    ,fBitsToCbB45Hb(0)
+    ,fChDelayT0(0)
+    ,fChDelayV0(0)
+    ,fChDelayV1(0)
+    ,fChDelayV2(0)
+    ,fChDelayV3(0)
+    ,fChDisableT0(0)
+    ,fChDisableV0(0)
+    ,fChDisableV1(0)
+    ,fChDisableV2(0)
+    ,fChDisableV3(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+
+
diff --git a/TRD/Cal/AliTRDCalDCSPTRCba.h b/TRD/Cal/AliTRDCalDCSPTRCba.h
new file mode 100644 (file)
index 0000000..5c52b96
--- /dev/null
@@ -0,0 +1,170 @@
+#ifndef AliTRDCALDCSPTRCba_H
+#define AliTRDCALDCSPTRCba_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSPTRCba.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+
+class TString;
+
+class AliTRDCalDCSPTRCba : public TNamed {
+
+ public:
+
+  AliTRDCalDCSPTRCba();
+  AliTRDCalDCSPTRCba(const char *name, const char *title);
+  AliTRDCalDCSPTRCba(const AliTRDCalDCSPTRCba &);
+  virtual ~AliTRDCalDCSPTRCba() { };
+
+  TString GetControlBoxSide()                         { return fSide;                         }
+  Int_t   GetControlBoxPrimary()                      { return fPrimary;                      }
+  UInt_t  GetControlBoxSide()                         { return fSide;                         }
+  UInt_t  GetControlBoxPrimary()                      { return fPrimary;                      }
+
+  void    SetControlBoxSide(TString bs)               { fSide = bs;                           }
+  void    SetControlBoxPrimary(Int_t bp)              { fPrimary = bp;                        }
+  void    SetClkLb(UInt_t cl)                         { fClkLb = cl;                          }
+  void    SetClkHb(UInt_t ch)                         { fClkHb = ch;                          }
+
+  UInt_t  GetTo27ParralelLb()                         { return fTo27ParralelLb;               }
+  UInt_t  GetTo27ParralelHb()                         { return fTo27ParralelHb;               }            
+  UInt_t  GetTo28ParralelLb()                         { return fTo28ParralelLb;               }
+  UInt_t  GetTo28ParralelHb()                         { return fTo28ParralelHb;               }            
+  UInt_t  GetTo29ParralelLb()                         { return fTo29ParralelLb;               }
+  UInt_t  GetTo29ParralelHb()                         { return fTo29ParralelHb;               }            
+  UInt_t  GetTo30ParralelLb()                         { return fTo30ParralelLb;               }
+  UInt_t  GetTo30ParralelHb()                         { return fTo30ParralelHb;               }            
+  UInt_t  GetTo31ParralelLb()                         { return fTo31ParralelLb;               }
+  UInt_t  GetTo31ParralelHb()                         { return fTo31ParralelHb;               }
+  UInt_t  GetTo32ParralelLb()                         { return fTo32ParralelLb;               }
+  UInt_t  GetTo32ParralelHb()                         { return fTo32ParralelHb;               }
+  UInt_t  GetTo33ParralelLb()                         { return fTo33ParralelLb;               }
+  UInt_t  GetTo33ParralelHb()                         { return fTo33ParralelHb;               }
+  UInt_t  GetTo34ParralelLb()                         { return fTo34ParralelLb;               }
+  UInt_t  GetTo34ParralelHb()                         { return fTo34ParralelHb;               }
+  UInt_t  GetTo35ParralelLb()                         { return fTo35ParralelLb;               }
+  UInt_t  GetTo35ParralelHb()                         { return fTo35ParralelHb;               }
+  UInt_t  GetTo36ParralelLb()                         { return fTo36ParralelLb;               }
+  UInt_t  GetTo36ParralelHb()                         { return fTo36ParralelHb;               }
+  void    SetTo27ParralelHb(Int_t tp)                 { fTo27ParralelHb = tp;                 }                                            
+  void    SetTo27ParralelLb(Int_t tp)                 { fTo27ParralelLb = tp;                 }                                            
+  void    SetTo28ParralelHb(Int_t tp)                 { fTo28ParralelHb = tp;                 }                                            
+  void    SetTo28ParralelLb(Int_t tp)                 { fTo28ParralelLb = tp;                 }                                            
+  void    SetTo29ParralelHb(Int_t tp)                 { fTo29ParralelHb = tp;                 }                                            
+  void    SetTo29ParralelLb(Int_t tp)                 { fTo29ParralelLb = tp;                 }                                            
+  void    SetTo30ParralelHb(Int_t tp)                 { fTo30ParralelHb = tp;                 }                                            
+  void    SetTo30ParralelLb(Int_t tp)                 { fTo30ParralelLb = tp;                 }                                            
+  void    SetTo31ParralelHb(Int_t tp)                 { fTo31ParralelHb = tp;                 }                                            
+  void    SetTo31ParralelLb(Int_t tp)                 { fTo31ParralelLb = tp;                 }
+  void    SetTo32ParralelHb(Int_t tp)                 { fTo32ParralelHb = tp;                 }
+  void    SetTo32ParralelLb(Int_t tp)                 { fTo32ParralelLb = tp;                 }
+  void    SetTo33ParralelHb(Int_t tp)                 { fTo33ParralelHb = tp;                 }
+  void    SetTo33ParralelLb(Int_t tp)                 { fTo33ParralelLb = tp;                 }
+  void    SetTo34ParralelHb(Int_t tp)                 { fTo34ParralelHb = tp;                 }
+  void    SetTo34ParralelLb(Int_t tp)                 { fTo34ParralelLb = tp;                 }
+  void    SetTo35ParralelHb(Int_t tp)                 { fTo35ParralelHb = tp;                 }
+  void    SetTo35ParralelLb(Int_t tp)                 { fTo35ParralelLb = tp;                 }
+  void    SetTo36ParralelHb(Int_t tp)                 { fTo36ParralelHb = tp;                 }
+  void    SetTo36ParralelLb(Int_t tp)                 { fTo36ParralelLb = tp;                 }
+
+  UInt_t  GetBitsToCbB42Lb()                          { return fBitsToCbB42Lb;                }                                        
+  UInt_t  GetBitsToCbB42Hb()                          { return fBitsToCbB42Hb;                }                                                   
+  UInt_t  GetBitsToCbB43Lb()                          { return fBitsToCbB43Lb;                }                                        
+  UInt_t  GetBitsToCbB43Hb()                          { return fBitsToCbB43Hb;                }                                                   
+  UInt_t  GetBitsToCbB44Lb()                          { return fBitsToCbB44Lb;                }                                        
+  UInt_t  GetBitsToCbB44Hb()                          { return fBitsToCbB44Hb;                }
+  UInt_t  GetBitsToCbB45Lb()                          { return fBitsToCbB45Lb;                }
+  UInt_t  GetBitsToCbB45Hb()                          { return fBitsToCbB45Hb;                }
+
+  void    SetBitsToCbB42Hb(Int_t bc)                  { fBitsToCbB42Hb = bc;                  }
+  void    SetBitsToCbB42Lb(Int_t bc)                  { fBitsToCbB42Lb = bc;                  }
+  void    SetBitsToCbB43Hb(Int_t bc)                  { fBitsToCbB43Hb = bc;                  }
+  void    SetBitsToCbB43Lb(Int_t bc)                  { fBitsToCbB43Lb = bc;                  }
+  void    SetBitsToCbB44Hb(Int_t bc)                  { fBitsToCbB44Hb = bc;                  }
+  void    SetBitsToCbB44Lb(Int_t bc)                  { fBitsToCbB44Lb = bc;                  }
+  void    SetBitsToCbB45Hb(Int_t bc)                  { fBitsToCbB45Hb = bc;                  }
+  void    SetBitsToCbB45Lb(Int_t bc)                  { fBitsToCbB45Lb = bc;                  }
+
+  UInt_t  GetChDelayT0()                              { return fChDelayT0;                    }  
+  UInt_t  GetChDelayV0()                              { return fChDelayV0;                    }
+  UInt_t  GetChDelayV1()                              { return fChDelayV1;                    }
+  UInt_t  GetChDelayV2()                              { return fChDelayV2;                    }
+  UInt_t  GetChDelayV3()                              { return fChDelayV3;                    }
+  UInt_t  GetChDisableT0()                            { return fChDisableT0;                  }
+  UInt_t  GetChDisableV0()                            { return fChDisableV0;                  }
+  UInt_t  GetChDisableV1()                            { return fChDisableV1;                  }
+  UInt_t  GetChDisableV2()                            { return fChDisableV2;                  }
+  UInt_t  GetChDisableV3()                            { return fChDisableV3;                  }
+
+  void    SetChDelayT0(Int_t cd)                      { fChDelayT0 = cd;                      }
+  void    SetChDelayV0(Int_t cd)                      { fChDelayV0 = cd;                      }
+  void    SetChDelayV1(Int_t cd)                      { fChDelayV1 = cd;                      }
+  void    SetChDelayV2(Int_t cd)                      { fChDelayV2 = cd;                      }
+  void    SetChDelayV3(Int_t cd)                      { fChDelayV3 = cd;                      }
+  void    SetChDisableT0(Int_t cd)                    { fChDisableT0 = cd;                    }
+  void    SetChDisableV0(Int_t cd)                    { fChDisableV0 = cd;                    }
+  void    SetChDisableV1(Int_t cd)                    { fChDisableV1 = cd;                    }
+  void    SetChDisableV2(Int_t cd)                    { fChDisableV2 = cd;                    }
+  void    SetChDisableV3(Int_t cd)                    { fChDisableV3 = cd;                    }
+
+ protected:
+  TString fSide; // side of the control box, either A, B or C 
+  Int_t   fPrimary; // 1 if its the primary control box, 2 for backup
+
+  UInt_t  fClkLb;
+  UInt_t  fClkHb;
+
+  UInt_t  fTo27ParralelLb;
+  UInt_t  fTo27ParralelLb;
+  UInt_t  fTo28ParralelLb;                                                                                                                
+  UInt_t  fTo28ParralelHb;                                                                                                                
+  UInt_t  fTo29ParralelLb;                                                                                                                
+  UInt_t  fTo29ParralelHb;                                                                                                                
+  UInt_t  fTo30ParralelLb;                                                                                                                
+  UInt_t  fTo30ParralelHb;                                                                                                                
+  UInt_t  fTo31ParralelLb;                                                                                                                
+  UInt_t  fTo31ParralelHb;
+  UInt_t  fTo32ParralelLb;
+  UInt_t  fTo32ParralelHb;
+  UInt_t  fTo33ParralelLb;
+  UInt_t  fTo33ParralelHb;
+  UInt_t  fTo34ParralelLb;
+  UInt_t  fTo34ParralelHb;
+  UInt_t  fTo35ParralelLb;
+  UInt_t  fTo35ParralelHb;
+  UInt_t  fTo36ParralelLb;
+  UInt_t  fTo36ParralelHb;
+
+  UInt_t  fBitsToCbB42Lb;
+  UInt_t  fBitsToCbB42Hb;
+  UInt_t  fBitsToCbB43Lb;
+  UInt_t  fBitsToCbB43Hb;
+  UInt_t  fBitsToCbB44Lb;
+  UInt_t  fBitsToCbB44Hb;
+  UInt_t  fBitsToCbB45Lb;
+  UInt_t  fBitsToCbB45Hb;
+
+  UInt_t  fChDelayT0;
+  UInt_t  fChDelayV0;
+  UInt_t  fChDelayV1;
+  UInt_t  fChDelayV2;
+  UInt_t  fChDelayV3;
+  UInt_t  fChDisableT0;
+  UInt_t  fChDisableV0;
+  UInt_t  fChDisableV1;
+  UInt_t  fChDisableV2;
+  UInt_t  fChDisableV3;
+
+  ClassDef(AliTRDCalDCSPTRCba,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSPTRCbb.cxx b/TRD/Cal/AliTRDCalDCSPTRCbb.cxx
new file mode 100644 (file)
index 0000000..be0e4ee
--- /dev/null
@@ -0,0 +1,183 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSPTRCba.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSPTRCba.h"
+
+ClassImp(AliTRDCalDCSPTRCba)
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRCba::AliTRDCalDCSPTRCba()
+  :TNamed()
+    ,fSide("")
+    ,fPrimary(0)
+    ,fClkLb(0)
+    ,fClkHb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo28ParralelLb(0)                                                                                                             
+    ,fTo28ParralelHb(0)                                                                                                             
+    ,fTo29ParralelLb(0)                                                                                                             
+    ,fTo29ParralelHb(0)                                                                                                             
+    ,fTo30ParralelLb(0)                                                                                                             
+    ,fTo30ParralelHb(0)                                                                                                                
+    ,fTo31ParralelLb(0)                                                                                                             
+    ,fTo31ParralelHb(0)
+    ,fTo32ParralelLb(0)
+    ,fTo32ParralelHb(0)
+    ,fTo33ParralelLb(0)
+    ,fTo33ParralelHb(0)
+    ,fTo34ParralelLb(0)
+    ,fTo34ParralelHb(0)
+    ,fTo35ParralelLb(0)
+    ,fTo35ParralelHb(0)
+    ,fTo36ParralelLb(0)
+    ,fTo36ParralelHb(0)
+    ,fBitsToCbB42Lb(0)
+    ,fBitsToCbB42Hb(0)
+    ,fBitsToCbB43Lb(0)
+    ,fBitsToCbB43Hb(0)
+    ,fBitsToCbB44Lb(0)
+    ,fBitsToCbB44Hb(0)
+    ,fBitsToCbB45Lb(0)
+    ,fBitsToCbB45Hb(0)
+    ,fChDelayT0(0)
+    ,fChDelayV0(0)
+    ,fChDelayV1(0)
+    ,fChDelayV2(0)
+    ,fChDelayV3(0)
+    ,fChDisableT0(0)
+    ,fChDisableV0(0)
+    ,fChDisableV1(0)
+    ,fChDisableV2(0)
+    ,fChDisableV3(0)
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+  fSegmentsArr->SetOwner();
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRCba::AliTRDCalDCSPTRCba(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fSide("")
+    ,fPrimary(0)
+    ,fClkLb(0)
+    ,fClkHb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo28ParralelLb(0)                                                                                                             
+    ,fTo28ParralelHb(0)                                                                                                             
+    ,fTo29ParralelLb(0)                                                                                                             
+    ,fTo29ParralelHb(0)                                                                                                             
+    ,fTo30ParralelLb(0)                                                                                                             
+    ,fTo30ParralelHb(0)                                                                                                                
+    ,fTo31ParralelLb(0)                                                                                                             
+    ,fTo31ParralelHb(0)
+    ,fTo32ParralelLb(0)
+    ,fTo32ParralelHb(0)
+    ,fTo33ParralelLb(0)
+    ,fTo33ParralelHb(0)
+    ,fTo34ParralelLb(0)
+    ,fTo34ParralelHb(0)
+    ,fTo35ParralelLb(0)
+    ,fTo35ParralelHb(0)
+    ,fTo36ParralelLb(0)
+    ,fTo36ParralelHb(0)
+    ,fBitsToCbB42Lb(0)
+    ,fBitsToCbB42Hb(0)
+    ,fBitsToCbB43Lb(0)
+    ,fBitsToCbB43Hb(0)
+    ,fBitsToCbB44Lb(0)
+    ,fBitsToCbB44Hb(0)
+    ,fBitsToCbB45Lb(0)
+    ,fBitsToCbB45Hb(0)
+    ,fChDelayT0(0)
+    ,fChDelayV0(0)
+    ,fChDelayV1(0)
+    ,fChDelayV2(0)
+    ,fChDelayV3(0)
+    ,fChDisableT0(0)
+    ,fChDisableV0(0)
+    ,fChDisableV1(0)
+    ,fChDisableV2(0)
+    ,fChDisableV3(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRCba::AliTRDCalDCSPTRCba(const AliTRDCalDCSPTRCba &cd)
+  :TNamed("","")
+    ,fSide("")
+    ,fPrimary(0)
+    ,fClkLb(0)
+    ,fClkHb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo27ParralelLb(0)
+    ,fTo28ParralelLb(0)                                                                                                             
+    ,fTo28ParralelHb(0)                                                                                                             
+    ,fTo29ParralelLb(0)                                                                                                             
+    ,fTo29ParralelHb(0)                                                                                                             
+    ,fTo30ParralelLb(0)                                                                                                             
+    ,fTo30ParralelHb(0)                                                                                                                
+    ,fTo31ParralelLb(0)                                                                                                             
+    ,fTo31ParralelHb(0)
+    ,fTo32ParralelLb(0)
+    ,fTo32ParralelHb(0)
+    ,fTo33ParralelLb(0)
+    ,fTo33ParralelHb(0)
+    ,fTo34ParralelLb(0)
+    ,fTo34ParralelHb(0)
+    ,fTo35ParralelLb(0)
+    ,fTo35ParralelHb(0)
+    ,fTo36ParralelLb(0)
+    ,fTo36ParralelHb(0)
+    ,fBitsToCbB42Lb(0)
+    ,fBitsToCbB42Hb(0)
+    ,fBitsToCbB43Lb(0)
+    ,fBitsToCbB43Hb(0)
+    ,fBitsToCbB44Lb(0)
+    ,fBitsToCbB44Hb(0)
+    ,fBitsToCbB45Lb(0)
+    ,fBitsToCbB45Hb(0)
+    ,fChDelayT0(0)
+    ,fChDelayV0(0)
+    ,fChDelayV1(0)
+    ,fChDelayV2(0)
+    ,fChDelayV3(0)
+    ,fChDisableT0(0)
+    ,fChDisableV0(0)
+    ,fChDisableV1(0)
+    ,fChDisableV2(0)
+    ,fChDisableV3(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+
+
diff --git a/TRD/Cal/AliTRDCalDCSPTRCbb.h b/TRD/Cal/AliTRDCalDCSPTRCbb.h
new file mode 100644 (file)
index 0000000..e89cbfc
--- /dev/null
@@ -0,0 +1,250 @@
+#ifndef AliTRDCALDCSPTRCbb_H
+#define AliTRDCALDCSPTRCbb_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSPTRCbb.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+
+class TString;
+
+class AliTRDCalDCSPTRCbb : public TNamed {
+
+ public:
+
+  AliTRDCalDCSPTRCbb();
+  AliTRDCalDCSPTRCbb(const char *name, const char *title);
+  AliTRDCalDCSPTRCbb(const AliTRDCalDCSPTRCbb &);
+  virtual ~AliTRDCalDCSPTRCbb() { };
+
+  TString GetControlBoxSide()                         { return fSide;                         }
+  Int_t   GetControlBoxPrimary()                      { return fPrimary;                      }
+  UInt_t  GetControlBoxSide()                         { return fSide;                         }
+  UInt_t  GetControlBoxPrimary()                      { return fPrimary;                      }
+
+  void    SetControlBoxSide(TString bs)               { fSide = bs;                           }
+  void    SetControlBoxPrimary(Int_t bp)              { fPrimary = bp;                        }
+  void    SetClkLb(UInt_t cl)                         { fClkLb = cl;                          }
+  void    SetClkHb(UInt_t ch)                         { fClkHb = ch;                          }
+
+  UInt_t  GetPulseToSmLb()                            { return fPulseToSmLb;                  }
+  UInt_t  GetPulseToSmHb()                            { return fPulseToSmHb;                  }
+  UInt_t  GetDeadTimeLb()                             { return fDeadTimeLb;                   }
+  UInt_t  GetDeadTimeHb()                             { return fDeadTimeHb;                   }
+  UInt_t  GetPrePulsesLb()                            { return fPrePulsesLb;                  }
+  UInt_t  GetPrePulsesHb()                            { return fPrePulsesHb;                  }
+  UInt_t  GetL0CtpLb()                                { return fL0CtpLb;                      }
+  UInt_t  GetL0CtpHb()                                { return fL0CtpHb;                      }
+  UInt_t  GetL1CtpLb()                                { return fL1CtpLb;                      }
+  UInt_t  GetL1CtpHb()                                { return fL1CtpHb;                      }
+  UInt_t  GetL0LutLb()                                { return fL0LutLb;                      }
+  UInt_t  GetL0LutHb()                                { return fL0LutHb;                      }
+  UInt_t  GetNotTinToCtpPreLb()                       { return fNotTinToCtpPreLb;             }
+  UInt_t  GetNotTinToCtpPreHb()                       { return fNotTinToCtpPreHb;             }
+  UInt_t  GetPatternMatchCbALb()                      { return fPatternMatchCbALb;            }
+  UInt_t  GetPatternMatchCbAHb()                      { return fPatternMatchCbAHb;            }
+  UInt_t  GetPatternMatchCbCLb()                      { return fPatternMatchCbCLb;            }
+  UInt_t  GetPatternMatchCbCHb()                      { return fPatternMatchCbCHb;            }
+  UInt_t  GetPatternMatchCbTlmuLb()                   { return fPatternMatchCbTlmuLb;         }
+  UInt_t  GetPatternMatchCbTlmuHb()                   { return fPatternMatchCbTlmuHb;         }
+  UInt_t  GetTriggerSynchrLb()                        { return fTriggerSynchrLb;              }
+  UInt_t  GetTriggerSynchrHb()                        { return fTriggerSynchrHb;              }
+  UInt_t  GetTriggerToSmLb()                          { return fTriggerToSmLb;                }
+  UInt_t  GetTriggerToSmHb()                          { return fTriggerToSmHb;                }
+  UInt_t  GetPreLutLb()                               { return fPreLutLb;                     }
+  UInt_t  GetPreLutHb()                               { return fPreLutHb;                     }
+  UInt_t  GetMissingPreLb()                           { return fMissingPreLb;                 }
+  UInt_t  GetMissingPreHb()                           { return fMissingPreHb;                 }
+  UInt_t  GetUnnecessaryPreLb()                       { return fUnnecessaryPreLb;             }
+  UInt_t  GetUnnecessaryPreHb()                       { return fUnnecessaryPreHb;             }
+  UInt_t  GetPreToNextCycles()                        { return fPreToNextCycles;              }
+  UInt_t  GetL0ToNextCycles()                         { return fL0ToNextCycles;               }
+  UInt_t  GetL1ToNextCycles()                         { return fL1ToNextCycles;               }
+  UInt_t  GetClkTtcexShifts()                         { return fClkTtcexShifts;               }
+  UInt_t  GetDisableGtuBusy()                         { return fDisableGtuBusy;               }
+  UInt_t  GetDisableSorEorBusy()                      { return fDisableSorEorBusy;            }
+  UInt_t  GetScintEn()                                { return fScintEn;                      }
+  UInt_t  GetLutAsPre()                               { return fLutAsPre;                     }
+  UInt_t  GetCtpAsPre()                               { return fCtpAsPre;                     }
+  UInt_t  GetL0En()                                   { return fL0En;                         }
+  UInt_t  GetL1En()                                   { return fL1En;                         }
+  UInt_t  GetLutL0ToCtpEn()                           { return fLutL0ToCtpEn;                 }
+  UInt_t  GetLutPreToCtpEn()                          { return fLutPreToCtpEn;                }
+  UInt_t  GetSoftwTrigToCtpEn()                       { return fSoftwTrigToCtpEn;             }
+  UInt_t  GetL0Autogenerate()                         { return fL0Autogenerate;               }
+  UInt_t  GetL1Autogenerate()                         { return fL1Autogenerate;               }
+  UInt_t  GetChannelBDisable()                        { return fChannelBDisable;              }
+  UInt_t  GetTtcexClkDisable()                        { return fTtcexClkDisable;              }
+  UInt_t  GetPreAsL0En()                              { return fPreAsL0En;                    }
+  UInt_t  GetNoTriggerToSm()                          { return fNoTriggerToSm;                }
+  UInt_t  GetSoftwTrigEn()                            { return fSoftwTrigEn;                  }
+  UInt_t  GetSoftwTrigPattern()                       { return fSoftwTrigPattern;             }
+  UInt_t  GetSychrInput()                             { return fSychrInput;                   }
+  UInt_t  GetRandomTriggerThr()                       { return fRandomTriggerThr;             }
+  UInt_t  GetPtChDelayCbA()                           { return fPtChDelayCbA;                 }
+  UInt_t  GetPtChDelayCbC()                           { return fPtChDelayCbC;                 }
+  UInt_t  GetPtChDelayGtu()                           { return fPtChDelayGtu;                 }
+  UInt_t  GetPtChDelayT0()                            { return fPtChDelayT0;                  }
+  UInt_t  GetPtChDelayT0()                            { return fPtChDelayT0;                  }
+  UInt_t  GetPtChDelayT1()                            { return fPtChDelayT1;                  }
+  UInt_t  GetPtChDelayT2()                            { return fPtChDelayT2;                  }
+  UInt_t  GetPtChDelayT3()                            { return fPtChDelayT3;                  }
+  UInt_t  GetPtChDelayT4()                            { return fPtChDelayT4;                  }
+  UInt_t  GetPtChDelayT5()                            { return fPtChDelayT5;                  }
+  UInt_t  GetPtChDelayT6()                            { return fPtChDelayT6;                  }
+  UInt_t  GetPtChDelayT7()                            { return fPtChDelayT7;                  }
+
+
+  void    SetPulseToSmLb(UInt_ ar)                    { fPulseToSmLb = ar;                    }
+  void    SetPulseToSmHb(UInt_ ar)                    { fPulseToSmHb = ar;                    }
+  void    SetDeadTimeLb(UInt_ ar)                     { fDeadTimeLb = ar;                     }
+  void    SetDeadTimeHb(UInt_ ar)                     { fDeadTimeHb = ar;                     }
+  void    SetPrePulsesLb(UInt_ ar)                    { fPrePulsesLb = ar;                    }
+  void    SetPrePulsesHb(UInt_ ar)                    { fPrePulsesHb = ar;                    }
+  void    SetL0CtpLb(UInt_ ar)                        { fL0CtpLb = ar;                        }
+  void    SetL0CtpHb(UInt_ ar)                        { fL0CtpHb = ar;                        }
+  void    SetL1CtpLb(UInt_ ar)                        { fL1CtpLb = ar;                        }
+  void    SetL1CtpHb(UInt_ ar)                        { fL1CtpHb = ar;                        }
+  void    SetL0LutLb(UInt_ ar)                        { fL0LutLb = ar;                        }
+  void    SetL0LutHb(UInt_ ar)                        { fL0LutHb = ar;                        }
+  void    SetNotTinToCtpPreLb(UInt_ ar)               { fNotTinToCtpPreLb = ar;               }
+  void    SetNotTinToCtpPreHb(UInt_ ar)               { fNotTinToCtpPreHb = ar;               }
+  void    SetPatternMatchCbALb(UInt_ ar)              { fPatternMatchCbALb = ar;              }
+  void    SetPatternMatchCbAHb(UInt_ ar)              { fPatternMatchCbAHb = ar;              }
+  void    SetPatternMatchCbCLb(UInt_ ar)              { fPatternMatchCbCLb = ar;              }
+  void    SetPatternMatchCbCHb(UInt_ ar)              { fPatternMatchCbCHb = ar;              }
+  void    SetPatternMatchCbTlmuLb(UInt_ ar)           { fPatternMatchCbTlmuLb = ar;           }
+  void    SetPatternMatchCbTlmuHb(UInt_ ar)           { fPatternMatchCbTlmuHb = ar;           }
+  void    SetTriggerSynchrLb(UInt_ ar)                { fTriggerSynchrLb = ar;                }
+  void    SetTriggerSynchrHb(UInt_ ar)                { fTriggerSynchrHb = ar;                }
+  void    SetTriggerToSmLb(UInt_ ar)                  { fTriggerToSmLb = ar;                  }
+  void    SetTriggerToSmHb(UInt_ ar)                  { fTriggerToSmHb = ar;                  }
+  void    SetPreLutLb(UInt_ ar)                       { fPreLutLb = ar;                       }
+  void    SetPreLutHb(UInt_ ar)                       { fPreLutHb = ar;                       }
+  void    SetMissingPreLb(UInt_ ar)                   { fMissingPreLb = ar;                   }
+  void    SetMissingPreHb(UInt_ ar)                   { fMissingPreHb = ar;                   }
+  void    SetUnnecessaryPreLb(UInt_ ar)               { fUnnecessaryPreLb = ar;               }
+  void    SetUnnecessaryPreHb(UInt_ ar)               { fUnnecessaryPreHb = ar;               }
+  void    SetPreToNextCycles(UInt_ ar)                { fPreToNextCycles = ar;                }
+  void    SetL0ToNextCycles(UInt_ ar)                 { fL0ToNextCycles = ar;                 }
+  void    SetL1ToNextCycles(UInt_ ar)                 { fL1ToNextCycles = ar;                 }
+  void    SetClkTtcexShifts(UInt_ ar)                 { fClkTtcexShifts = ar;                 }
+  void    SetDisableGtuBusy(UInt_ ar)                 { fDisableGtuBusy = ar;                 }
+  void    SetDisableSorEorBusy(UInt_ ar)              { fDisableSorEorBusy = ar;              }
+  void    SetScintEn(UInt_ ar)                        { fScintEn = ar;                        }
+  void    SetLutAsPre(UInt_ ar)                       { fLutAsPre = ar;                       }
+  void    SetCtpAsPre(UInt_ ar)                       { fCtpAsPre = ar;                       }
+  void    SetL0En(UInt_ ar)                           { fL0En = ar;                           }
+  void    SetL1En(UInt_ ar)                           { fL1En = ar;                           }
+  void    SetLutL0ToCtpEn(UInt_ ar)                   { fLutL0ToCtpEn = ar;                   }
+  void    SetLutPreToCtpEn(UInt_ ar)                  { fLutPreToCtpEn = ar;                  }
+  void    SetSoftwTrigToCtpEn(UInt_ ar)               { fSoftwTrigToCtpEn = ar;               }
+  void    SetL0Autogenerate(UInt_ ar)                 { fL0Autogenerate = ar;                 }
+  void    SetL1Autogenerate(UInt_ ar)                 { fL1Autogenerate = ar;                 }
+  void    SetChannelBDisable(UInt_ ar)                { fChannelBDisable = ar;                }
+  void    SetTtcexClkDisable(UInt_ ar)                { fTtcexClkDisable = ar;                }
+  void    SetPreAsL0En(UInt_ ar)                      { fPreAsL0En = ar;                      }
+  void    SetNoTriggerToSm(UInt_ ar)                  { fNoTriggerToSm = ar;                  }
+  void    SetSoftwTrigEn(UInt_ ar)                    { fSoftwTrigEn = ar;                    }
+  void    SetSoftwTrigPattern(UInt_ ar)               { fSoftwTrigPattern = ar;               }
+  void    SetSychrInput(UInt_ ar)                     { fSychrInput = ar;                     }
+  void    SetRandomTriggerThr(UInt_ ar)               { fRandomTriggerThr = ar;               }
+  void    SetPtChDelayCbA(UInt_ ar)                   { fPtChDelayCbA = ar;                   }
+  void    SetPtChDelayCbC(UInt_ ar)                   { fPtChDelayCbC = ar;                   }
+  void    SetPtChDelayGtu(UInt_ ar)                   { fPtChDelayGtu = ar;                   }
+  void    SetPtChDelayT0(UInt_ ar)                    { fPtChDelayT0 = ar;                    }
+  void    SetPtChDelayT0(UInt_ ar)                    { fPtChDelayT0 = ar;                    }
+  void    SetPtChDelayT1(UInt_ ar)                    { fPtChDelayT1 = ar;                    }
+  void    SetPtChDelayT2(UInt_ ar)                    { fPtChDelayT2 = ar;                    }
+  void    SetPtChDelayT3(UInt_ ar)                    { fPtChDelayT3 = ar;                    }
+  void    SetPtChDelayT4(UInt_ ar)                    { fPtChDelayT4 = ar;                    }
+  void    SetPtChDelayT5(UInt_ ar)                    { fPtChDelayT5 = ar;                    }
+  void    SetPtChDelayT6(UInt_ ar)                    { fPtChDelayT6 = ar;                    }
+  void    SetPtChDelayT7(UInt_ ar)                    { fPtChDelayT7 = ar;                    }
+
+
+ protected:
+  TString fSide; // side of the control box, either A, B or C 
+  TInt_t  fPrimary; // 1 if its the primary control box, 2 for backup
+
+  UInt_t  fClkLb;
+  UInt_t  fClkHb;
+
+  UInt_t  fPulseToSmLb;
+  UInt_t  fPulseToSmHb;
+  UInt_t  fDeadTimeLb;
+  UInt_t  fDeadTimeHb;
+  UInt_t  fPrePulsesLb;
+  UInt_t  fPrePulsesHb;
+  UInt_t  fL0CtpLb;
+  UInt_t  fL0CtpHb;
+  UInt_t  fL1CtpLb;
+  UInt_t  fL1CtpHb;
+  UInt_t  fL0LutLb;
+  UInt_t  fL0LutHb;
+  UInt_t  fNotTinToCtpPreLb;
+  UInt_t  fNotTinToCtpPreHb;
+  UInt_t  fPatternMatchCbALb;
+  UInt_t  fPatternMatchCbAHb;
+  UInt_t  fPatternMatchCbCLb;
+  UInt_t  fPatternMatchCbCHb;
+  UInt_t  fPatternMatchCbTlmuLb;
+  UInt_t  fPatternMatchCbTlmuHb;
+  UInt_t  fTriggerSynchrLb;
+  UInt_t  fTriggerSynchrHb;
+  UInt_t  fTriggerToSmLb;
+  UInt_t  fTriggerToSmHb;
+  UInt_t  fPreLutLb;
+  UInt_t  fPreLutHb;
+  UInt_t  fMissingPreLb;
+  UInt_t  fMissingPreHb;
+  UInt_t  fUnnecessaryPreLb;
+  UInt_t  fUnnecessaryPreHb;
+  UInt_t  fPreToNextCycles;
+  UInt_t  fL0ToNextCycles;
+  UInt_t  fL1ToNextCycles;
+  UInt_t  fClkTtcexShifts;
+  UInt_t  fDisableGtuBusy;
+  UInt_t  fDisableSorEorBusy;
+  UInt_t  fScintEn;
+  UInt_t  fLutAsPre;
+  UInt_t  fCtpAsPre;
+  UInt_t  fL0En;
+  UInt_t  fL1En;
+  UInt_t  fLutL0ToCtpEn;
+  UInt_t  fLutPreToCtpEn;
+  UInt_t  fSoftwTrigToCtpEn;
+  UInt_t  fL0Autogenerate;
+  UInt_t  fL1Autogenerate;
+  UInt_t  fChannelBDisable;
+  UInt_t  fTtcexClkDisable;
+  UInt_t  fPreAsL0En;
+  UInt_t  fNoTriggerToSm;
+  UInt_t  fSoftwTrigEn;
+  UInt_t  fSoftwTrigPattern;
+  UInt_t  fSychrInput;
+  UInt_t  fRandomTriggerThr;
+  UInt_t  fPtChDelayCbA;
+  UInt_t  fPtChDelayCbC;
+  UInt_t  fPtChDelayGtu;
+  UInt_t  fPtChDelayT0;
+  UInt_t  fPtChDelayT0;
+  UInt_t  fPtChDelayT1;
+  UInt_t  fPtChDelayT2;
+  UInt_t  fPtChDelayT3;
+  UInt_t  fPtChDelayT4;
+  UInt_t  fPtChDelayT5;
+  UInt_t  fPtChDelayT6;
+  UInt_t  fPtChDelayT7;
+
+  ClassDef(AliTRDCalDCSPTRCbb,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSPTRFeb.cxx b/TRD/Cal/AliTRDCalDCSPTRFeb.cxx
new file mode 100644 (file)
index 0000000..1bb79dc
--- /dev/null
@@ -0,0 +1,72 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSPTRFeb.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSPTRFeb.h"
+
+ClassImp(AliTRDCalDCSPTRFeb)
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRFeb::AliTRDCalDCSPTRFeb()
+  :TNamed()
+    ,fTgu(new AliTRDCalDCSGTUTgu())
+    ,fSegmentsArr(new TObjArray())
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+  fSegmentsArr->SetOwner();
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRFeb::AliTRDCalDCSPTRFeb(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fTgu(new AliTRDCalDCSGTUTgu())
+    ,fSegmentsArr(new TObjArray())
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRFeb::AliTRDCalDCSPTRFeb(const AliTRDCalDCSPTRFeb &cd)
+  :TNamed("","")
+    ,fTgu(new AliTRDCalDCSGTUTgu())
+    ,fSegmentsArr(new TObjArray())
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+
+
diff --git a/TRD/Cal/AliTRDCalDCSPTRFeb.h b/TRD/Cal/AliTRDCalDCSPTRFeb.h
new file mode 100644 (file)
index 0000000..2809b04
--- /dev/null
@@ -0,0 +1,211 @@
+#ifndef AliTRDCALDCSPTRFeb_H
+#define AliTRDCALDCSPTRFeb_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSPTRFeb.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+
+class TString;
+
+class AliTRDCalDCSPTRFeb : public TNamed {
+
+ public:
+
+  AliTRDCalDCSPTRFeb();
+  AliTRDCalDCSPTRFeb(const char *name, const char *title);
+  AliTRDCalDCSPTRFeb(const AliTRDCalDCSPTRFeb &);
+  virtual ~AliTRDCalDCSPTRFeb() { };
+
+  TString GetControlBoxSide()                         { return fSide;                         }
+  TString GetDetectorName()                           { return fName;                         }
+  Int_t   GetControlBoxPrimary()                      { return fPrimary;                      }
+  UInt_t  GetControlBoxSide()                         { return fSide;                         }
+  UInt_t  GetControlBoxPrimary()                      { return fPrimary;                      }
+
+  void    SetControlBoxSide(TString bs)               { fSide = bs;                           }
+  void    SetDetectorName(TString bs)                 { fName = bs;                           }
+  void    SetControlBoxPrimary(Int_t bp)              { fPrimary = bp;                        }
+  void    SetClkLb(UInt_t cl)                         { fClkLb = cl;                          }
+  void    SetClkHb(UInt_t ch)                         { fClkHb = ch;                          }
+  
+  UInt_t  GetCh0CountLb()                             { return fCh0CountLb;                   }
+  UInt_t  GetCh0CountHb()                             { return fCh0CountHb;                   }
+  UInt_t  GetCh1CountLb()                             { return fCh1CountLb;                   }
+  UInt_t  GetCh1CountHb()                             { return fCh1CountHb;                   }
+  UInt_t  GetCh2CountLb()                             { return fCh2CountLb;                   }
+  UInt_t  GetCh2CountHb()                             { return fCh2CountHb;                   }
+  UInt_t  GetCh3CountLb()                             { return fCh3CountLb;                   }
+  UInt_t  GetCh3CountHb()                             { return fCh3CountHb;                   }
+  UInt_t  GetCh4CountLb()                             { return fCh4CountLb;                   }
+  UInt_t  GetCh4CountHb()                             { return fCh4CountHb;                   }
+  UInt_t  GetCh5CountLb()                             { return fCh5CountLb;                   }
+  UInt_t  GetCh5CountHb()                             { return fCh5CountHb;                   }
+  UInt_t  GetCh6CountLb()                             { return fCh6CountLb;                   }
+  UInt_t  GetCh6CountHb()                             { return fCh6CountHb;                   }
+  UInt_t  GetCh7CountLb()                             { return fCh7CountLb;                   }
+  UInt_t  GetCh7CountHb()                             { return fCh7CountHb;                   }
+  UInt_t  GetCh8CountLb()                             { return fCh8CountLb;                   }
+  UInt_t  GetCh8CountHb()                             { return fCh8CountHb;                   }
+  UInt_t  GetCh9CountLb()                             { return fCh9CountLb;                   }
+  UInt_t  GetCh9CountHb()                             { return fCh9CountHb;                   }
+  UInt_t  GetCh10CountLb()                            { return fCh10CountLb;                  }
+  UInt_t  GetCh10CountHb()                            { return fCh10CountHb;                  }
+  UInt_t  GetCh11CountLb()                            { return fCh11CountLb;                  }
+  UInt_t  GetCh11CountHb()                            { return fCh11CountHb;                  }
+  UInt_t  GetTrigParallel0Lb()                        { return fTrigParallel0Lb;              }
+  UInt_t  GetTrigParallel0Hb()                        { return fTrigParallel0Hb;              }
+  UInt_t  GetTrigParallel1Lb()                        { return fTrigParallel1Lb;              }
+  UInt_t  GetTrigParallel1Hb()                        { return fTrigParallel1Hb;              }
+  UInt_t  GetPtChDelay0()                             { return fPtChDelay0;                   }
+  UInt_t  GetPtChDelay1()                             { return fPtChDelay1;                   }
+  UInt_t  GetPtChDelay2()                             { return fPtChDelay2;                   }
+  UInt_t  GetPtChDelay3()                             { return fPtChDelay3;                   }
+  UInt_t  GetPtChDelay4()                             { return fPtChDelay4;                   }
+  UInt_t  GetPtChDelay5()                             { return fPtChDelay5;                   }
+  UInt_t  GetPtChDelay6()                             { return fPtChDelay6;                   }
+  UInt_t  GetPtChDelay7()                             { return fPtChDelay7;                   }
+  UInt_t  GetPtChDelay8()                             { return fPtChDelay8;                   }
+  UInt_t  GetPtChDelay9()                             { return fPtChDelay9;                   }
+  UInt_t  GetPtChDelay10()                            { return fPtChDelay10;                  }
+  UInt_t  GetPtChDelay11()                            { return fPtChDelay11;                  }
+  UInt_t  GetPtChThr0()                               { return fPtChThr0;                     }
+  UInt_t  GetPtChThr1()                               { return fPtChThr1;                     }
+  UInt_t  GetPtChThr2()                               { return fPtChThr2;                     }
+  UInt_t  GetPtChThr3()                               { return fPtChThr3;                     }
+  UInt_t  GetPtChThr4()                               { return fPtChThr4;                     }
+  UInt_t  GetPtChThr5()                               { return fPtChThr5;                     }
+  UInt_t  GetPtChThr6()                               { return fPtChThr6;                     }
+  UInt_t  GetPtChThr7()                               { return fPtChThr7;                     }
+  UInt_t  GetPtChThr8()                               { return fPtChThr8;                     }
+  UInt_t  GetPtChThr9()                               { return fPtChThr9;                     }
+  UInt_t  GetPtChThr10()                              { return fPtChThr10;                    }
+  UInt_t  GetPtChThr11()                              { return fPtChThr11;                    }
+
+
+  void    SetCh0CountLb(UInt_ ar)                     { fCh0CountLb = ar;                     }
+  void    SetCh0CountHb(UInt_ ar)                     { fCh0CountHb = ar;                     }
+  void    SetCh1CountLb(UInt_ ar)                     { fCh1CountLb = ar;                     }
+  void    SetCh1CountHb(UInt_ ar)                     { fCh1CountHb = ar;                     }
+  void    SetCh2CountLb(UInt_ ar)                     { fCh2CountLb = ar;                     }
+  void    SetCh2CountHb(UInt_ ar)                     { fCh2CountHb = ar;                     }
+  void    SetCh3CountLb(UInt_ ar)                     { fCh3CountLb = ar;                     }
+  void    SetCh3CountHb(UInt_ ar)                     { fCh3CountHb = ar;                     }
+  void    SetCh4CountLb(UInt_ ar)                     { fCh4CountLb = ar;                     }
+  void    SetCh4CountHb(UInt_ ar)                     { fCh4CountHb = ar;                     }
+  void    SetCh5CountLb(UInt_ ar)                     { fCh5CountLb = ar;                     }
+  void    SetCh5CountHb(UInt_ ar)                     { fCh5CountHb = ar;                     }
+  void    SetCh6CountLb(UInt_ ar)                     { fCh6CountLb = ar;                     }
+  void    SetCh6CountHb(UInt_ ar)                     { fCh6CountHb = ar;                     }
+  void    SetCh7CountLb(UInt_ ar)                     { fCh7CountLb = ar;                     }
+  void    SetCh7CountHb(UInt_ ar)                     { fCh7CountHb = ar;                     }
+  void    SetCh8CountLb(UInt_ ar)                     { fCh8CountLb = ar;                     }
+  void    SetCh8CountHb(UInt_ ar)                     { fCh8CountHb = ar;                     }
+  void    SetCh9CountLb(UInt_ ar)                     { fCh9CountLb = ar;                     }
+  void    SetCh9CountHb(UInt_ ar)                     { fCh9CountHb = ar;                     }
+  void    SetCh10CountLb(UInt_ ar)                    { fCh10CountLb = ar;                    }
+  void    SetCh10CountHb(UInt_ ar)                    { fCh10CountHb = ar;                    }
+  void    SetCh11CountLb(UInt_ ar)                    { fCh11CountLb = ar;                    }
+  void    SetCh11CountHb(UInt_ ar)                    { fCh11CountHb = ar;                    }
+  void    SetTrigParallel0Lb(UInt_ ar)                { fTrigParallel0Lb = ar;                }
+  void    SetTrigParallel0Hb(UInt_ ar)                { fTrigParallel0Hb = ar;                }
+  void    SetTrigParallel1Lb(UInt_ ar)                { fTrigParallel1Lb = ar;                }
+  void    SetTrigParallel1Hb(UInt_ ar)                { fTrigParallel1Hb = ar;                }
+  void    SetPtChDelay0(UInt_ ar)                     { fPtChDelay0 = ar;                     }
+  void    SetPtChDelay1(UInt_ ar)                     { fPtChDelay1 = ar;                     }
+  void    SetPtChDelay2(UInt_ ar)                     { fPtChDelay2 = ar;                     }
+  void    SetPtChDelay3(UInt_ ar)                     { fPtChDelay3 = ar;                     }
+  void    SetPtChDelay4(UInt_ ar)                     { fPtChDelay4 = ar;                     }
+  void    SetPtChDelay5(UInt_ ar)                     { fPtChDelay5 = ar;                     }
+  void    SetPtChDelay6(UInt_ ar)                     { fPtChDelay6 = ar;                     }
+  void    SetPtChDelay7(UInt_ ar)                     { fPtChDelay7 = ar;                     }
+  void    SetPtChDelay8(UInt_ ar)                     { fPtChDelay8 = ar;                     }
+  void    SetPtChDelay9(UInt_ ar)                     { fPtChDelay9 = ar;                     }
+  void    SetPtChDelay10(UInt_ ar)                    { fPtChDelay10 = ar;                    }
+  void    SetPtChDelay11(UInt_ ar)                    { fPtChDelay11 = ar;                    }
+  void    SetPtChThr0(UInt_ ar)                       { fPtChThr0 = ar;                       }
+  void    SetPtChThr1(UInt_ ar)                       { fPtChThr1 = ar;                       }
+  void    SetPtChThr2(UInt_ ar)                       { fPtChThr2 = ar;                       }
+  void    SetPtChThr3(UInt_ ar)                       { fPtChThr3 = ar;                       }
+  void    SetPtChThr4(UInt_ ar)                       { fPtChThr4 = ar;                       }
+  void    SetPtChThr5(UInt_ ar)                       { fPtChThr5 = ar;                       }
+  void    SetPtChThr6(UInt_ ar)                       { fPtChThr6 = ar;                       }
+  void    SetPtChThr7(UInt_ ar)                       { fPtChThr7 = ar;                       }
+  void    SetPtChThr8(UInt_ ar)                       { fPtChThr8 = ar;                       }
+  void    SetPtChThr9(UInt_ ar)                       { fPtChThr9 = ar;                       }
+  void    SetPtChThr10(UInt_ ar)                      { fPtChThr10 = ar;                      }
+  void    SetPtChThr11(UInt_ ar)                      { fPtChThr11 = ar;                      }
+
+
+ protected:
+  TString fSide; // side of the control box, either A, B or C 
+  TString fName; // 1 if its the primary control box, 2 for backup
+  Int_t   fPrimary; // 1 if its the primary control box, 2 for backup
+
+  UInt_t  fClkLb;
+  UInt_t  fClkHb;
+  
+  UInt_t  fCh0CountLb;
+  UInt_t  fCh0CountHb;
+  UInt_t  fCh1CountLb;
+  UInt_t  fCh1CountHb;
+  UInt_t  fCh2CountLb;
+  UInt_t  fCh2CountHb;
+  UInt_t  fCh3CountLb;
+  UInt_t  fCh3CountHb;
+  UInt_t  fCh4CountLb;
+  UInt_t  fCh4CountHb;
+  UInt_t  fCh5CountLb;
+  UInt_t  fCh5CountHb;
+  UInt_t  fCh6CountLb;
+  UInt_t  fCh6CountHb;
+  UInt_t  fCh7CountLb;
+  UInt_t  fCh7CountHb;
+  UInt_t  fCh8CountLb;
+  UInt_t  fCh8CountHb;
+  UInt_t  fCh9CountLb;
+  UInt_t  fCh9CountHb;
+  UInt_t  fCh10CountLb;
+  UInt_t  fCh10CountHb;
+  UInt_t  fCh11CountLb;
+  UInt_t  fCh11CountHb;
+  UInt_t  fTrigParallel0Lb;
+  UInt_t  fTrigParallel0Hb;
+  UInt_t  fTrigParallel1Lb;
+  UInt_t  fTrigParallel1Hb;
+  UInt_t  fPtChDelay0;
+  UInt_t  fPtChDelay1;
+  UInt_t  fPtChDelay2;
+  UInt_t  fPtChDelay3;
+  UInt_t  fPtChDelay4;
+  UInt_t  fPtChDelay5;
+  UInt_t  fPtChDelay6;
+  UInt_t  fPtChDelay7;
+  UInt_t  fPtChDelay8;
+  UInt_t  fPtChDelay9;
+  UInt_t  fPtChDelay10;
+  UInt_t  fPtChDelay11;
+  UInt_t  fPtChThr0;
+  UInt_t  fPtChThr1;
+  UInt_t  fPtChThr2;
+  UInt_t  fPtChThr3;
+  UInt_t  fPtChThr4;
+  UInt_t  fPtChThr5;
+  UInt_t  fPtChThr6;
+  UInt_t  fPtChThr7;
+  UInt_t  fPtChThr8;
+  UInt_t  fPtChThr9;
+  UInt_t  fPtChThr10;
+  UInt_t  fPtChThr11;
+
+  ClassDef(AliTRDCalDCSPTRFeb,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDCalDCSPTRTlmu.cxx b/TRD/Cal/AliTRDCalDCSPTRTlmu.cxx
new file mode 100644 (file)
index 0000000..e3a83c6
--- /dev/null
@@ -0,0 +1,72 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id: AliTRDCalDCSPTRTlmu.cxx 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD DCS GTU parameters                         //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliTRDCalDCSPTRTlmu.h"
+
+ClassImp(AliTRDCalDCSPTRTlmu)
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRTlmu::AliTRDCalDCSPTRTlmu()
+  :TNamed()
+    ,fTgu(new AliTRDCalDCSGTUTgu())
+    ,fSegmentsArr(new TObjArray())
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+{
+  //
+  // AliTRDCalDCSGTU default constructor
+  //
+  fSegmentsArr->SetOwner();
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRTlmu::AliTRDCalDCSPTRTlmu(const char *name, const char *title)
+  :TNamed(name,title)
+    ,fTgu(new AliTRDCalDCSGTUTgu())
+    ,fSegmentsArr(new TObjArray())
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+//_____________________________________________________________________________
+AliTRDCalDCSPTRTlmu::AliTRDCalDCSPTRTlmu(const AliTRDCalDCSPTRTlmu &cd)
+  :TNamed("","")
+    ,fTgu(new AliTRDCalDCSGTUTgu())
+    ,fSegmentsArr(new TObjArray())
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+{
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+}
+
+
+
diff --git a/TRD/Cal/AliTRDCalDCSPTRTlmu.h b/TRD/Cal/AliTRDCalDCSPTRTlmu.h
new file mode 100644 (file)
index 0000000..687f342
--- /dev/null
@@ -0,0 +1,176 @@
+#ifndef AliTRDCALDCSPTRTlmu_H
+#define AliTRDCALDCSPTRTlmu_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id: AliTRDCalDCSPTRTlmu.h 18952 2007-06-08 11:36:12Z cblume $ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//  TRD calibration class for TRD GTU configuration parameters               //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "TNamed.h"
+
+class TString;
+
+class AliTRDCalDCSPTRTlmu : public TNamed {
+
+ public:
+
+  AliTRDCalDCSPTRTlmu();
+  AliTRDCalDCSPTRTlmu(const char *name, const char *title);
+  AliTRDCalDCSPTRTlmu(const AliTRDCalDCSPTRTlmu &);
+  virtual ~AliTRDCalDCSPTRTlmu() { };
+
+  Int_t   GetRunNumber()                              { return fRunNumber;                    }
+  Int_t   GetSORFlag()                                { return fSORFlag;                      }
+  Int_t   GetSerial()                                 { return fSerial;                       }
+  Int_t   GetDNR()                                    { return fDNR;                          }
+
+  void    SetRunNumber(Int_t rn)                      { fRunNumber = rn;                      }
+  void    SetSORFlag(Int_t fg)                        { fSORFlag = fg;                        }
+  void    SetSerial(Int_t se)                         { fSerial = se;                         }
+  void    SetDNR(Int_t dn)                            { fDNR = dn;                            }
+
+  TObjArray* GetSegmentArray() const                  { return fSegmentsArr;                  }
+  void SetSegmentArray(TObjArray *sa)                 { fSegmentsArr = sa;                    }
+
+  AliTRDCalDCSGTUTgu* GetTgu() const                  { return fTgu;                          }
+  void SetTgu(AliTRDCalDCSGTUTgu* tg)                 { fTgu = tg;                            }
+
+  UInt_t  GetTo27ParralelLb()                         { return fTo27ParralelLb;               }
+  UInt_t  GetTo27ParralelHb()                         { return fTo27ParralelHb;               }            
+  UInt_t  GetTo28ParralelLb()                         { return fTo28ParralelLb;               }
+  UInt_t  GetTo28ParralelHb()                         { return fTo28ParralelHb;               }            
+  UInt_t  GetTo29ParralelLb()                         { return fTo29ParralelLb;               }
+  UInt_t  GetTo29ParralelHb()                         { return fTo29ParralelHb;               }            
+  UInt_t  GetTo30ParralelLb()                         { return fTo30ParralelLb;               }
+  UInt_t  GetTo30ParralelHb()                         { return fTo30ParralelHb;               }            
+  UInt_t  GetTo31ParralelLb()                         { return fTo31ParralelLb;               }
+  UInt_t  GetTo31ParralelHb()                         { return fTo31ParralelHb;               }
+  UInt_t  GetTo32ParralelLb()                         { return fTo32ParralelLb;               }
+  UInt_t  GetTo32ParralelHb()                         { return fTo32ParralelHb;               }
+  UInt_t  GetTo33ParralelLb()                         { return fTo33ParralelLb;               }
+  UInt_t  GetTo33ParralelHb()                         { return fTo33ParralelHb;               }
+  UInt_t  GetTo34ParralelLb()                         { return fTo34ParralelLb;               }
+  UInt_t  GetTo34ParralelHb()                         { return fTo34ParralelHb;               }
+  UInt_t  GetTo35ParralelLb()                         { return fTo35ParralelLb;               }
+  UInt_t  GetTo35ParralelHb()                         { return fTo35ParralelHb;               }
+  UInt_t  GetTo36ParralelLb()                         { return fTo36ParralelLb;               }
+  UInt_t  GetTo36ParralelHb()                         { return fTo36ParralelHb;               }
+  void    SetTo27ParralelHb(Int_t tp)                 { fTo27ParralelHb = tp;                 }                                            
+  void    SetTo27ParralelLb(Int_t tp)                 { fTo27ParralelLb = tp;                 }                                            
+  void    SetTo28ParralelHb(Int_t tp)                 { fTo28ParralelHb = tp;                 }                                            
+  void    SetTo28ParralelLb(Int_t tp)                 { fTo28ParralelLb = tp;                 }                                            
+  void    SetTo29ParralelHb(Int_t tp)                 { fTo29ParralelHb = tp;                 }                                            
+  void    SetTo29ParralelLb(Int_t tp)                 { fTo29ParralelLb = tp;                 }                                            
+  void    SetTo30ParralelHb(Int_t tp)                 { fTo30ParralelHb = tp;                 }                                            
+  void    SetTo30ParralelLb(Int_t tp)                 { fTo30ParralelLb = tp;                 }                                            
+  void    SetTo31ParralelHb(Int_t tp)                 { fTo31ParralelHb = tp;                 }                                            
+  void    SetTo31ParralelLb(Int_t tp)                 { fTo31ParralelLb = tp;                 }
+  void    SetTo32ParralelHb(Int_t tp)                 { fTo32ParralelHb = tp;                 }
+  void    SetTo32ParralelLb(Int_t tp)                 { fTo32ParralelLb = tp;                 }
+  void    SetTo33ParralelHb(Int_t tp)                 { fTo33ParralelHb = tp;                 }
+  void    SetTo33ParralelLb(Int_t tp)                 { fTo33ParralelLb = tp;                 }
+  void    SetTo34ParralelHb(Int_t tp)                 { fTo34ParralelHb = tp;                 }
+  void    SetTo34ParralelLb(Int_t tp)                 { fTo34ParralelLb = tp;                 }
+  void    SetTo35ParralelHb(Int_t tp)                 { fTo35ParralelHb = tp;                 }
+  void    SetTo35ParralelLb(Int_t tp)                 { fTo35ParralelLb = tp;                 }
+  void    SetTo36ParralelHb(Int_t tp)                 { fTo36ParralelHb = tp;                 }
+  void    SetTo36ParralelLb(Int_t tp)                 { fTo36ParralelLb = tp;                 }
+
+  UInt_t  GetBitsToCbB42Lb()                          { return fBitsToCbB42Lb;                }                                        
+  UInt_t  GetBitsToCbB42Hb()                          { return fBitsToCbB42Hb;                }                                                   
+  UInt_t  GetBitsToCbB43Lb()                          { return fBitsToCbB43Lb;                }                                        
+  UInt_t  GetBitsToCbB43Hb()                          { return fBitsToCbB43Hb;                }                                                   
+  UInt_t  GetBitsToCbB44Lb()                          { return fBitsToCbB44Lb;                }                                        
+  UInt_t  GetBitsToCbB44Hb()                          { return fBitsToCbB44Hb;                }
+  UInt_t  GetBitsToCbB45Lb()                          { return fBitsToCbB45Lb;                }
+  UInt_t  GetBitsToCbB45Hb()                          { return fBitsToCbB45Hb;                }
+
+  void    SetBitsToCbB42Hb(Int_t bc)                  { fBitsToCbB42Hb = bc;                  }
+  void    SetBitsToCbB42Lb(Int_t bc)                  { fBitsToCbB42Lb = bc;                  }
+  void    SetBitsToCbB43Hb(Int_t bc)                  { fBitsToCbB43Hb = bc;                  }
+  void    SetBitsToCbB43Lb(Int_t bc)                  { fBitsToCbB43Lb = bc;                  }
+  void    SetBitsToCbB44Hb(Int_t bc)                  { fBitsToCbB44Hb = bc;                  }
+  void    SetBitsToCbB44Lb(Int_t bc)                  { fBitsToCbB44Lb = bc;                  }
+  void    SetBitsToCbB45Hb(Int_t bc)                  { fBitsToCbB45Hb = bc;                  }
+  void    SetBitsToCbB45Lb(Int_t bc)                  { fBitsToCbB45Lb = bc;                  }
+
+  UInt_t  GetChDelayT0()                              { return fChDelayT0;                    }  
+  UInt_t  GetChDelayV0()                              { return fChDelayV0;                    }
+  UInt_t  GetChDelayV1()                              { return fChDelayV1;                    }
+  UInt_t  GetChDelayV2()                              { return fChDelayV2;                    }
+  UInt_t  GetChDelayV3()                              { return fChDelayV3;                    }
+  UInt_t  GetChDisableT0()                            { return fChDisableT0;                  }
+  UInt_t  GetChDisableV0()                            { return fChDisableV0;                  }
+  UInt_t  GetChDisableV1()                            { return fChDisableV1;                  }
+  UInt_t  GetChDisableV2()                            { return fChDisableV2;                  }
+  UInt_t  GetChDisableV3()                            { return fChDisableV3;                  }
+
+  void    SetChDelayT0(Int_t cd)                      { fChDelayT0 = cd;                      }
+  void    SetChDelayV0(Int_t cd)                      { fChDelayV0 = cd;                      }
+  void    SetChDelayV1(Int_t cd)                      { fChDelayV1 = cd;                      }
+  void    SetChDelayV2(Int_t cd)                      { fChDelayV2 = cd;                      }
+  void    SetChDelayV3(Int_t cd)                      { fChDelayV3 = cd;                      }
+  void    SetChDisableT0(Int_t cd)                    { fChDisableT0 = cd;                    }
+  void    SetChDisableV0(Int_t cd)                    { fChDisableV0 = cd;                    }
+  void    SetChDisableV1(Int_t cd)                    { fChDisableV1 = cd;                    }
+  void    SetChDisableV2(Int_t cd)                    { fChDisableV2 = cd;                    }
+  void    SetChDisableV3(Int_t cd)                    { fChDisableV3 = cd;                    }
+
+ protected:
+  TString fSide; // side of the control box, either A, B or C 
+  TInt_t  fPrimary; // 1 if its the primary control box, 2 for backup
+
+  UInt_t  fClkLb;
+  UInt_t  fClkHb;
+
+  UInt_t  fTo27ParralelLb;
+  UInt_t  fTo27ParralelLb;
+  UInt_t  fTo28ParralelLb;                                                                                                                
+  UInt_t  fTo28ParralelHb;                                                                                                                
+  UInt_t  fTo29ParralelLb;                                                                                                                
+  UInt_t  fTo29ParralelHb;                                                                                                                
+  UInt_t  fTo30ParralelLb;                                                                                                                
+  UInt_t  fTo30ParralelHb;                                                                                                                
+  UInt_t  fTo31ParralelLb;                                                                                                                
+  UInt_t  fTo31ParralelHb;
+  UInt_t  fTo32ParralelLb;
+  UInt_t  fTo32ParralelHb;
+  UInt_t  fTo33ParralelLb;
+  UInt_t  fTo33ParralelHb;
+  UInt_t  fTo34ParralelLb;
+  UInt_t  fTo34ParralelHb;
+  UInt_t  fTo35ParralelLb;
+  UInt_t  fTo35ParralelHb;
+  UInt_t  fTo36ParralelLb;
+  UInt_t  fTo36ParralelHb;
+
+  UInt_t  fBitsToCbB42Lb;
+  UInt_t  fBitsToCbB42Hb;
+  UInt_t  fBitsToCbB43Lb;
+  UInt_t  fBitsToCbB43Hb;
+  UInt_t  fBitsToCbB44Lb;
+  UInt_t  fBitsToCbB44Hb;
+  UInt_t  fBitsToCbB45Lb;
+  UInt_t  fBitsToCbB45Hb;
+
+  UInt_t  fChDelayT0;
+  UInt_t  fChDelayV0;
+  UInt_t  fChDelayV1;
+  UInt_t  fChDelayV2;
+  UInt_t  fChDelayV3;
+  UInt_t  fChDisableT0;
+  UInt_t  fChDisableV0;
+  UInt_t  fChDisableV1;
+  UInt_t  fChDisableV2;
+  UInt_t  fChDisableV3;
+
+  ClassDef(AliTRDCalDCSPTRTlmu,1)      //  TRD calibration class for TRD GTU parameters
+
+};
+#endif
diff --git a/TRD/Cal/AliTRDcheckConfigSimple.C b/TRD/Cal/AliTRDcheckConfigSimple.C
new file mode 100644 (file)
index 0000000..2e78c8a
--- /dev/null
@@ -0,0 +1,358 @@
+//===================================================================================
+// This is a macro to analyze TRD/Calib/DCS OCDB objects either
+// from the grid for a given run number or from a local object.
+// If you want to analyze data from the grid, please don't forget to
+// have a valid alien token initialized and the file /tmp/gclient_env_$UID source'd.
+//
+// Arguments:
+// The first argument is the runnumber (this is ignored in case of a local file),
+// the second is a string that needs to contain either "grid" or "local". Further
+// you can add either verbose or quiet to that string. If you don't, you'll be asked
+// for all stuff individually wether you want to see it or not
+// the thrid argument is the number of the ROC you (eventually) want to dump its data
+// member of.
+// The fourth one is the path and name of the local file you might want to look at.
+//
+// So the simplest way to use this macro is if you want to check the output of a given
+// run from the OCDB:
+// .x AliTRDcheckConfig.C(60111)
+//
+// An example for quickly checking a local file:
+// .x AliTRDcheckConfig.C(0, "local quiet", 533, "$ALICE_ROOT/TRD/Calib/DCS/Run0_999999999_v0_s0.root")
+//
+// Please contact Frederick Kramer in case of problems
+//===================================================================================
+
+// This is the path one needs to change if the year is no longer 2009 
+// and the runnumber cannot be found
+TString alienOcdbPath("alien://folder=/alice/data/2009/OCDB/");
+
+// Do not make changes below here unless you know what your doing
+
+const Int_t nROC = 540;
+const Int_t nROB = 8;
+const Int_t nMCM = 18;
+const Int_t cArraySize = 1000;
+
+Bool_t errors = false;
+
+Int_t AnalyzeArray(Int_t states[cArraySize], Int_t occur[cArraySize]) {
+  long long srtIndx[cArraySize] = 0;
+  
+  TMath::Sort(cArraySize, occur, srtIndx);
+
+  Int_t totalSum = 0, subSum = 0, iIndex = 0;
+  for (Int_t i=0; i<cArraySize; i++) totalSum += occur[i];
+  
+  cout << "    The majority ("<< occur[srtIndx[0]] << " of " 
+       << totalSum <<") is: " << states[srtIndx[0]] << endl;
+  subSum = occur[srtIndx[0]];
+  while (totalSum != subSum) {
+    if (++iIndex > 999) {
+      cout << "E : out of bounds." << endl;
+      break;
+    }
+    Printf("    Next: %7d (%d)", states[srtIndx[iIndex]], occur[srtIndx[iIndex]]);
+    subSum += occur[srtIndx[iIndex]];
+  }
+  return states[srtIndx[0]];
+}
+
+
+
+void FillItemInArray(Int_t states[cArraySize], Int_t occur[cArraySize], Int_t item, Bool_t allowNeg) {
+  for (Int_t iArrPos=0; iArrPos<cArraySize; iArrPos++) {
+    // if allowNeg is set then we change the number indicating that the item ws not set from -1 to -100
+    // so that small negitive numbers can be sorted too
+    if ((allowNeg && item == -100000) || (!allowNeg && item == -1)) break; // value not set
+    if (states[iArrPos] == item) {
+      occur[iArrPos]++;
+      break;
+    } else if (occur[iArrPos] == 0) {
+      states[iArrPos] = item;
+      occur[iArrPos]++;
+      break;
+    }
+  }
+}
+
+void GetMajoritys(AliTRDCalDCS* calDCSObj) {
+  
+  Int_t gsmStates[cArraySize] = {0}, gsmOccur[cArraySize] = {0};
+  Int_t nimStates[cArraySize] = {0}, nimOccur[cArraySize] = {0};
+  Int_t nevStates[cArraySize] = {0}, nevOccur[cArraySize] = {0};
+  Int_t nptStates[cArraySize] = {0}, nptOccur[cArraySize] = {0};
+  
+  for (Int_t i=0; i<cArraySize; i++) {
+    gsmStates[i] = 0; gsmOccur[i]  = 0;
+    nimStates[i] = 0; nimOccur[i]  = 0;
+    nevStates[i] = 0; nevOccur[i]  = 0;
+    nptStates[i] = 0; nptOccur[i]  = 0;  
+  }
+  
+  for (Int_t i=0; i<nROC && i<calDCSObj->GetFEEArr()->GetSize(); i++) {
+    AliTRDCalDCSFEE *idcsfee = calDCSObj->GetCalDCSFEEObj(i);
+    if ((idcsfee == NULL) || (idcsfee->GetStatusBit() != 0)) continue;
+    for (Int_t j=0; j<nROB; j++) {
+      for (Int_t k=0; k<nMCM; k++) {
+       Int_t igsm = idcsfee->GetMCMGlobalState(j,k);
+       Int_t inim = idcsfee->GetMCMStateNI(j,k);
+       Int_t inev = idcsfee->GetMCMEventCnt(j,k);
+       Int_t inpt = idcsfee->GetMCMPtCnt(j,k);
+       
+       FillItemInArray(gsmStates, gsmOccur, igsm, false); 
+       FillItemInArray(nimStates, nimOccur, inim, false); 
+       FillItemInArray(nevStates, nevOccur, inev, false); 
+       FillItemInArray(nptStates, nptOccur, inpt, false); 
+      }
+    }
+  }
+  
+  cout << "I : Global MCM state statistics:" << endl;
+  AnalyzeArray(gsmStates, gsmOccur);
+  cout << "I : Network interface state statistics:" << endl;
+  AnalyzeArray(nimStates, nimOccur);
+  cout << "I : MCM Event counter reading statistics:" << endl;
+  AnalyzeArray(nevStates, nevOccur);
+  cout << "I : MCM PreTrigger counter reading statistics:" << endl;
+  AnalyzeArray(nptStates, nptOccur);
+  
+  return;
+}
+
+
+
+void GetMajorityDifferences(AliTRDCalDCS* calDCSObj, AliTRDCalDCS* calDCSObj2) {
+  
+  Int_t gsmStates[cArraySize] = {0}, gsmOccur[cArraySize] = {0};
+  Int_t nimStates[cArraySize] = {0}, nimOccur[cArraySize] = {0};
+  Int_t nevStates[cArraySize] = {0}, nevOccur[cArraySize] = {0};
+  Int_t nptStates[cArraySize] = {0}, nptOccur[cArraySize] = {0};
+  
+  for (Int_t i=0; i<cArraySize; i++) {
+    gsmStates[i] = 0; gsmOccur[i]  = 0;
+    nimStates[i] = 0; nimOccur[i]  = 0;
+    nevStates[i] = 0; nevOccur[i]  = 0;
+    nptStates[i] = 0; nptOccur[i]  = 0;  
+  }
+  
+  for (Int_t i=0; i<nROC && i<calDCSObj->GetFEEArr()->GetSize() && i<calDCSObj2->GetFEEArr()->GetSize(); i++) {
+    AliTRDCalDCSFEE *idcsfee = calDCSObj->GetCalDCSFEEObj(i);
+    AliTRDCalDCSFEE *idcsfee2 = calDCSObj2->GetCalDCSFEEObj(i);
+    if ((idcsfee == NULL) || (idcsfee2 == NULL) || 
+      (idcsfee->GetStatusBit() != 0) /*|| (idcsfee2->GetStatusBit() != 0)*/) continue;
+    for (Int_t j=0; j<nROB; j++) {
+      for (Int_t k=0; k<nMCM; k++) {
+       Int_t igsm = idcsfee->GetMCMGlobalState(j,k)-idcsfee2->GetMCMGlobalState(j,k);
+       Int_t inim = idcsfee->GetMCMStateNI(j,k)-idcsfee2->GetMCMStateNI(j,k);
+       Int_t inev = idcsfee->GetMCMEventCnt(j,k)-idcsfee2->GetMCMEventCnt(j,k);
+       Int_t inpt = idcsfee->GetMCMPtCnt(j,k)-idcsfee2->GetMCMPtCnt(j,k);
+       
+       // if they were set to -1, it means they were not actauuly set
+       // change -1 to -100 to mean they werent set since the above 
+       // can give negitives
+       if (idcsfee->GetMCMGlobalState(j,k) == -1 && igsm == 0) igsm =-100000;
+       if (idcsfee->GetMCMStateNI(j,k) == -1 && inim == 0)     inim =-100000;
+       if (idcsfee->GetMCMEventCnt(j,k) == -1 && inev == 0)    inev =-100000;
+       if (idcsfee->GetMCMPtCnt(j,k) == -1 && inpt == 0)       inpt =-100000;
+       
+       FillItemInArray(gsmStates, gsmOccur, igsm, true); 
+       FillItemInArray(nimStates, nimOccur, inim, true); 
+       FillItemInArray(nevStates, nevOccur, inev, true); 
+       FillItemInArray(nptStates, nptOccur, inpt, true); 
+      }
+    }
+  }
+  
+  cout << "I : Global MCM state difference statistics:" << endl;
+  AnalyzeArray(gsmStates, gsmOccur);
+  cout << "I : Network interface state difference statistics:" << endl;
+  AnalyzeArray(nimStates, nimOccur);
+  cout << "I : MCM Event counter difference statistics:" << endl;
+  if (AnalyzeArray(nevStates, nevOccur) < 1) {
+    cout << "E : There should have been some events recorded, but there weren't" << endl;
+    errors = true;
+  }
+  cout << "I : MCM PreTrigger counter difference statistics:" << endl;
+  if (AnalyzeArray(nptStates, nptOccur) < 1) {
+    cout << "E : There should have been some events recorded, but there weren't" << endl;
+    errors = true;
+  }
+  
+  return;
+}
+
+
+void AliTRDcheckConfigSimple(Int_t runNr=0, char *pathfile="nopathgiven"){
+
+  AliCDBEntry *entry=0;
+  TString pathfilets(pathfile);
+
+  // get the source
+  if(pathfilets.Contains("nopathgiven")) {
+    cout << "I : Accessing grid storage for run number " << runNr << endl;
+    cout << "I : Get CDBManager instance." << endl;
+    AliCDBManager *man = AliCDBManager::Instance();
+    cout << "I : SetDefaultStorage." << endl;
+    man->SetDefaultStorage(alienOcdbPath);
+    cout << "I : Get OCDB Entry." << endl;
+    entry = man->Get("TRD/Calib/DCS", runNr);
+    if (entry == NULL) {
+      cout << endl << "ERROR: Unable to get the AliTRDCalDCS object from the OCDB for run number " << runNr << endl << endl;
+      cout << "If the run number is correct, it could be that the year is no longer 2009 and" << endl;
+      cout << "the path where the objects is stored has changed, check the top of this macro " << endl;
+      cout << "to change the path." << endl;
+      return;
+    }
+  } else {
+    cout << "I : Accessing local storage" << endl;
+    TFile *f = new TFile(pathfile);
+    if(f != NULL) {
+      entry = (AliCDBEntry*) f->Get("AliCDBEntry");
+    }
+    else {
+      cout << "E : Cannot open file" << endl;
+      return;
+    }
+  }
+  
+  TObject *objectCDB = (TObject*)entry->GetObject();
+  if (objectCDB->IsA()->InheritsFrom("TObjArray")) {
+    TObjArray *objArrayCDB = (TObjArray*)entry->GetObject();
+  }
+  
+  // the CalDCS object
+  AliTRDCalDCS *caldcs;
+  AliTRDCalDCS *caldcs2;
+
+  Bool_t sorandeor = true;
+
+  caldcs = (AliTRDCalDCS*) objArrayCDB->At(0);
+  caldcs2 = (AliTRDCalDCS*) objArrayCDB->At(1);
+
+  if (caldcs == NULL && caldcs2 == NULL) {
+    cout << "E : Niether the start or end of run files were in the root file.";
+    return;
+  } else if (caldcs != NULL && caldcs2 == NULL) {
+    cout << "E : The EOR file was not in the root file.";
+    errors = true;
+    sorandeor = false;
+  } else if (caldcs == NULL && caldcs2 != NULL) {
+    cout << "E : The SOR file was not in the root file.";
+    errors = true;
+    sorandeor = false;
+    caldcs = caldcs2;
+  }
+
+  cout << endl << "============ Non responding ROC Summary: ============" << endl;
+  TString bitfivestr = " ROCs with status bit 5. These havn't responded to communication\nattempts over DIM. Most probably they just were off this is ok.\n    DCS IDs: ";
+  Int_t lengthfive = bitfivestr.Length();
+  TString bitfourstr = " ROCs with status bit 4! BAD! This might be due to a communication problem between fxsproxy and the feeserver(s) \n    DCS IDs: ";
+  Int_t lengthfour = bitfourstr.Length();
+  TString bitthreestr = " ROCs with status bit 3! BAD! data from fee server was old or corrupt.\n    DCS IDs: ";
+  Int_t lengththree = bitthreestr.Length();
+  TString bittwostr = " ROCs with status bit 2. These have been in states in which they cannot be read out, e.g. Standby.\n    DCS IDs: ";
+  Int_t lengthtwo = bittwostr.Length();
+  TString bitonestr = " ROCs with status bit 1! BAD! This means the chamber(s) didn't respont even though is should have been in a good state.\n    DCS IDs: ";
+  Int_t lengthone = bitonestr.Length();
+
+  Int_t nSB1=0, nSB2=0, nSB3=0, nSB4=0, nSB5=0, nTot=0;
+  for (Int_t i=0; i<nROC && i<caldcs->GetFEEArr()->GetSize(); i++) {
+    AliTRDCalDCSFEE *idcsfee;
+    idcsfee = caldcs->GetCalDCSFEEObj(i);
+    if (idcsfee != NULL) {
+      Int_t sb = idcsfee->GetStatusBit();
+      if (sb == 5) { bitfivestr  += i; bitfivestr  += "  "; nSB5++; }
+      if (sb == 4) { bitfourstr  += i; bitfourstr  += "  "; nSB4++; errors = true; }
+      if (sb == 3) { bitthreestr += i; bitthreestr += "  "; nSB3++; errors = true; }
+      if (sb == 2) { bittwostr   += i; bittwostr   += "  "; nSB2++; }
+      if (sb == 1) { bitonestr   += i; bitonestr   += "  "; nSB1++; errors = true; }
+      nTot += 1;
+    }
+  }
+
+  if (lengthfive < bitfivestr.Length()) cout << nSB5 << bitfivestr.Data() << endl << endl;
+  if (lengthfour < bitfourstr.Length()) cout << nSB4 << bitfourstr.Data() << endl << endl;
+  if (lengththree < bitthreestr.Length()) cout << nSB3 << bitthreestr.Data() << endl << endl;
+  if (lengthtwo < bittwostr.Length()) cout << nSB2 << bittwostr.Data() << endl << endl;
+  if (lengthone < bitonestr.Length()) cout << nSB1 << bitonestr.Data() << endl << endl;
+  
+  cout << "The remaining " << nTot-(nSB1+nSB2+nSB3+nSB4+nSB5) << " ROCs responded correctly in the start of run."<<endl;
+
+  Int_t nChanged=0, nTot=0;
+  for (Int_t i=0; i<nROC && i<caldcs->GetFEEArr()->GetSize(); i++) {
+    AliTRDCalDCSFEE *idcsfee;
+    idcsfee = caldcs->GetCalDCSFEEObj(i);
+    idcsfee2 = caldcs2->GetCalDCSFEEObj(i);
+    if (idcsfee != NULL && idcsfee2 != NULL) {
+      Int_t sbd = idcsfee->GetStatusBit() - idcsfee2->GetStatusBit();
+      if (sbd != 0) { 
+       cout << "ROC " << i << " changed from state " << idcsfee->GetStatusBit() << " at start of the run to "  << idcsfee2->GetStatusBit() << " at the end of the run." << endl;
+       nChanged++; 
+      }
+      nTot += 1;
+    }
+  }
+  
+  if (nChanged == 0) {
+    cout << "No ROCs changed state between the start and end of the run" << endl;
+  } else {
+    cout << "E : " << nChanged << " out of " << nTot << " ROCs changed state during the run" << endl;
+    errors = true; 
+  }
+
+  cout << endl << "============ Statistics from RSTATE: ============" << endl;
+  cout<<"I : The majority entry is given as well as all other values," << endl;
+  cout<<"    sorted according to their occurrence." << endl << endl;
+  GetMajoritys(caldcs);
+  if (sorandeor) GetMajorityDifferences(caldcs,caldcs2);
+
+  cout << endl << "============ Global Configuraton: ============" << endl;
+  cout<<"I : Anything not listed is not set, mixed numbers are indicated with a" << endl;
+  cout<<"    value of -2 and strings are set to 'mixed' if they're mixed." << endl << endl;
+  if (caldcs->GetGlobalNumberOfTimeBins() != -1)
+    cout<<"Global number of time bins.........................: "<<caldcs->GetGlobalNumberOfTimeBins() << endl;
+  if (caldcs->GetGlobalConfigTag() != -1)
+    cout<<"Global configuration tag...........................: "<<caldcs->GetGlobalConfigTag() << endl;
+  if (caldcs->GetGlobalSingleHitThres() != -1)
+    cout<<"Global single hit threshold........................: "<<caldcs->GetGlobalSingleHitThres() << endl;
+  if (caldcs->GetGlobalThreePadClustThres() != -1)
+    cout<<"Global three pad cluster threshold.................: "<<caldcs->GetGlobalThreePadClustThres()<<endl;
+  if (caldcs->GetGlobalSelectiveNoZS() != -1)
+    cout<<"Global selective ZS (every i'th event).............: "<<caldcs->GetGlobalSelectiveNoZS() << endl;
+  if (caldcs->GetGlobalTCFilterWeight() != -1)
+    cout<<"Global tail cancellation filter weight.............: "<<caldcs->GetGlobalTCFilterWeight() << endl;
+  if (caldcs->GetGlobalTCFilterShortDecPar() != -1)
+    cout<<"Global tail cancellat. filter short decay parameter: "<<caldcs->GetGlobalTCFilterShortDecPar()<<endl;
+  if (caldcs->GetGlobalTCFilterLongDecPar() != -1)
+    cout<<"Global tail cancellation filt. long decay parameter: "<<caldcs->GetGlobalTCFilterLongDecPar()<<endl;
+  if (caldcs->GetGlobalModeFastStatNoise() != -1)
+    cout<<"Global fast statistics mode?.......................: "<<caldcs->GetGlobalModeFastStatNoise() << endl;
+  if (caldcs->GetGlobalConfigVersion() != "")
+    cout<<"Global configuration tag version...................: "<<caldcs->GetGlobalConfigVersion() << endl;
+  if (caldcs->GetGlobalConfigName() != "")
+    cout<<"Global configuration tag name......................: "<<caldcs->GetGlobalConfigName() << endl;
+  if (caldcs->GetGlobalFilterType() != "")
+    cout<<"Global filter type.................................: "<<caldcs->GetGlobalFilterType() << endl;
+  if (caldcs->GetGlobalReadoutParam() != "")
+    cout<<"Global readout parameter...........................: "<<caldcs->GetGlobalReadoutParam() << endl;
+  if (caldcs->GetGlobalTestPattern() != "")
+    cout<<"Global test pattern................................: "<<caldcs->GetGlobalTestPattern() << endl;
+  if (caldcs->GetGlobalTrackletMode() != "")
+    cout<<"Global tracklet mode...............................: "<<caldcs->GetGlobalTrackletMode() << endl;
+  if (caldcs->GetGlobalTrackletDef() != "")
+    cout<<"Global tracklet definition.........................: "<<caldcs->GetGlobalTrackletDef() << endl;
+  if (caldcs->GetGlobalTriggerSetup() != "")
+    cout<<"Global trigger setup...............................: "<<caldcs->GetGlobalTriggerSetup() << endl;
+  if (caldcs->GetGlobalAddOptions() != "")
+    cout<<"Global additional options..........................: "<<caldcs->GetGlobalAddOptions() << endl;
+  
+  cout << endl << "============ Error Summary: ============" << endl;
+  if (errors) {
+    cout<<"    I noticed some errors, please see above for the specifics." << endl;
+  } else {
+    cout<<"    I didn't notice any errors, but that doesn't mean there weren't any!" << endl;
+  }
+  
+
+}
index 1e943fcd52bbdd57de9feddbc36aeb084b7e265b..47c4c24383072ac9ac37026445f4579e656ffe7d 100644 (file)
 #pragma link C++ class  AliTRDCalDCS+;
 #pragma link C++ class  AliTRDCalDCSFEE+;
 #pragma link C++ class  AliTRDCalDCSPTR+;
+#pragma link C++ class  AliTRDCalDCSGTUBoardInfo+;
+#pragma link C++ class  AliTRDCalDCSGTUCtpOpc+;
+#pragma link C++ class  AliTRDCalDCSGTUSegment+;
+#pragma link C++ class  AliTRDCalDCSGTUTgu+;
+#pragma link C++ class  AliTRDCalDCSGTUTmu+;
 #pragma link C++ class  AliTRDCalDCSGTU+;
 #pragma link C++ class  AliTRDCalPID+;
 #pragma link C++ class  AliTRDCalPIDLQ+;
index d72efb51e413b6dbfe00b6bb87471bc3ce699093..40544d6f75a47a2479f4a6b9f8b9239f7381348e 100644 (file)
@@ -26,6 +26,11 @@ SRCS= AliTRDarraySignal.cxx \
       Cal/AliTRDCalDCS.cxx \
       Cal/AliTRDCalDCSFEE.cxx \
       Cal/AliTRDCalDCSPTR.cxx \
+      Cal/AliTRDCalDCSGTUBoardInfo.cxx \
+      Cal/AliTRDCalDCSGTUCtpOpc.cxx \
+      Cal/AliTRDCalDCSGTUSegment.cxx \
+      Cal/AliTRDCalDCSGTUTgu.cxx \
+      Cal/AliTRDCalDCSGTUTmu.cxx \
       Cal/AliTRDCalDCSGTU.cxx \
       Cal/AliTRDCalPID.cxx \
       Cal/AliTRDCalPIDLQ.cxx \