From: cblume Date: Thu, 17 Sep 2009 19:23:02 +0000 (+0000) Subject: Modifications by Thomas X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=3821ce7007c450d88eb0dd15562eba10cdf733dc;p=u%2Fmrichter%2FAliRoot.git Modifications by Thomas --- diff --git a/TRD/AliTRDPreprocessor.cxx b/TRD/AliTRDPreprocessor.cxx index deeddd352bc..8b2bf56a9c8 100644 --- a/TRD/AliTRDPreprocessor.cxx +++ b/TRD/AliTRDPreprocessor.cxx @@ -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(fileTestS.tellg()) < 2) { - Log(Form("ERROR: File %s is empty!",xmlFileS)); - return 8; - } - if (static_cast(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(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(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); diff --git a/TRD/AliTRDSaxHandler.cxx b/TRD/AliTRDSaxHandler.cxx index 35d8e1ea2c6..27bfcab0da1 100644 --- a/TRD/AliTRDSaxHandler.cxx +++ b/TRD/AliTRDSaxHandler.cxx @@ -49,25 +49,31 @@ AliTRDSaxHandler::AliTRDSaxHandler() ,fNDCSGTU(0) ,fFEEArr(new TObjArray(540)) ,fPTRArr(new TObjArray(6)) - ,fGTUArr(new TObjArray(19)) ,fSystem(0) ,fInsideRstate(0) ,fCurrentSM(0) ,fCurrentStack(0) ,fCurrentROB(-1) ,fCurrentMCM(-1) + ,fCurrentADC(-1) ,fContent(0) ,fDCSFEEObj(0) ,fDCSPTRObj(0) ,fDCSGTUObj(0) ,fCalDCSObj(new AliTRDCalDCS()) + ,fLevel1Tag(-2) + ,fLevel2Tag(-2) + ,fInsideBoardInfo(false) + ,fTmu(0) + ,fCtpOpc(0) + ,fSegment(0) + ,fBoardInfo(0) { // // AliTRDSaxHandler default constructor // fFEEArr->SetOwner(); fPTRArr->SetOwner(); - fGTUArr->SetOwner(); } //_____________________________________________________________________________ @@ -78,18 +84,25 @@ AliTRDSaxHandler::AliTRDSaxHandler(const AliTRDSaxHandler &sh) ,fNDCSGTU(0) ,fFEEArr(0) ,fPTRArr(0) - ,fGTUArr(0) ,fSystem(0) ,fInsideRstate(0) ,fCurrentSM(0) ,fCurrentStack(0) ,fCurrentROB(-1) ,fCurrentMCM(-1) + ,fCurrentADC(-1) ,fContent(0) ,fDCSFEEObj(0) ,fDCSPTRObj(0) ,fDCSGTUObj(0) ,fCalDCSObj(0) + ,fLevel1Tag(-2) + ,fLevel2Tag(-2) + ,fInsideBoardInfo(false) + ,fTmu(0) + ,fCtpOpc(0) + ,fSegment(0) + ,fBoardInfo(0) { // // AliTRDSaxHandler copy constructor @@ -123,9 +136,9 @@ AliTRDSaxHandler::~AliTRDSaxHandler() delete fPTRArr; fPTRArr = 0x0; } - if (fGTUArr) { - delete fGTUArr; - fGTUArr = 0x0; + if (fDCSGTUObj) { + delete fDCSGTUObj; + fDCSGTUObj = 0x0; } if (fCalDCSObj) { delete fCalDCSObj; @@ -140,7 +153,7 @@ AliTRDCalDCS* AliTRDSaxHandler::GetCalDCSObj() // put the arrays in the global calibration object and return this fCalDCSObj->SetFEEArr(fFEEArr); fCalDCSObj->SetPTRArr(fPTRArr); - fCalDCSObj->SetGTUArr(fGTUArr); + fCalDCSObj->SetGTUObj(fDCSGTUObj); return fCalDCSObj; } @@ -158,64 +171,182 @@ void AliTRDSaxHandler::OnEndDocument() // this must be done here } +//_____________________________________________________________________________ +bool AliTRDSaxHandler::CompareString(TString str, const char *str2) +{ + // compre strings, ignoring case + return !(bool)str.CompareTo(str2,str.kIgnoreCase); + // returns true if they are the same, else false +} + + //_____________________________________________________________________________ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes) { // when a new XML element is found, it is processed here - fContent = ""; + fContent = ""; // Technically

This is ok but would be a problem here

Int_t dcsId = 0; - TString strName = name; + TString tagName = name; TString dcsTitle = ""; // set the current system if necessary - if (strName.Contains("FEE")) fSystem = kInsideFEE; - if (strName.Contains("PTR")) fSystem = kInsidePTR; - if (strName.Contains("GTU")) fSystem = kInsideGTU; + if (CompareString(tagName, "FEE")) fSystem = kInsideFEE; + if (CompareString(tagName, "PTR")) fSystem = kInsidePTR; + if (CompareString(tagName, "GTU")) { + fSystem = kInsideGTU; + fDCSGTUObj = new AliTRDCalDCSGTU(tagName,tagName); + } + + if (fSystem == kInsideGTU) { +// cout << "Start: " << tagName << " " << fLevel1Tag << " " << fLevel2Tag << " " << fInsideBoardInfo << "\n"; + if (CompareString(tagName, "tgu")) fLevel1Tag = kInsideTgu; + if (CompareString(tagName, "board_info")) { + fInsideBoardInfo = true; + fBoardInfo = new AliTRDCalDCSGTUBoardInfo(tagName,tagName); + } + if (CompareString(tagName(0,tagName.Length()-3), "segment")) { + fSegment = new AliTRDCalDCSGTUSegment(tagName,tagName); + fSegment->SetId(TString(tagName(8,2)).Atoi()); + fLevel1Tag = kInsideSegment; + } + if (fLevel1Tag == kInsideTgu) { + if (CompareString(tagName, "ctp_opc")) fCtpOpc = new AliTRDCalDCSGTUCtpOpc(tagName,tagName); + } else if (fLevel1Tag == kInsideSegment) { + if (CompareString(tagName, "smu")) { + fLevel2Tag = kInsideSmu; + } + if (CompareString(tagName(0,3), "tmu")) { + fTmu = new AliTRDCalDCSGTUTmu(tagName,tagName); + fTmu->SetId(TString(tagName(4,2)).Atoi()); + fLevel2Tag = kInsideTmu; + } + } + } else if (fSystem == kInsideFEE) { + if (CompareString(tagName, "gaintbl")) fLevel1Tag = kInsideGainTable; + } + // set if we are inside rstate // (in principle not necessary - just to be more safe against stupid tags) - if (strName.Contains("rstate")) fInsideRstate = 1; + if (CompareString(tagName, "rstate")) fInsideRstate = 1; // get the attributes of the element TXMLAttr *attr; TIter next(attributes); while ((attr = (TXMLAttr*) next())) { TString attribName = attr->GetName(); - if (attribName.Contains("id") && strName.Contains("DCS")) { - dcsTitle = name; - dcsId = atoi(attr->GetValue()); - } - if (attribName.Contains("roc") && strName.Contains("ack")) { - if (atoi(attr->GetValue()) != fDCSFEEObj->GetDCSid()) - fDCSFEEObj->SetStatusBit(3); // consistence check - } - if (attribName.Contains("rob") && (fInsideRstate == 1)) { - fCurrentROB = atoi(attr->GetValue()); - } - if (attribName.Contains("mcm") && (fInsideRstate == 1)) { - fCurrentMCM = atoi(attr->GetValue()); - } - if (attribName.Contains("sm") && strName.Contains("DCS")) { - fCurrentSM = atoi(attr->GetValue()); // only for GTU/PTR + TString attribValue = attr->GetValue(); + if (fSystem == kInsideFEE && fLevel1Tag == kInsideNone) { + if (CompareString(attribName, "id") && CompareString(tagName, "DCS")) { + dcsTitle = name; + dcsId = atoi(attr->GetValue()); + } + if (CompareString(attribName, "roc") && CompareString(tagName, "ack")) { + if (attribValue.Atoi() != fDCSFEEObj->GetDCSid()) + fDCSFEEObj->SetStatusBit(3); // consistency check + } + if (CompareString(attribName, "rob") && CompareString(tagName, "ro-board") && (fInsideRstate == 1)) { + fCurrentROB = attribValue.Atoi(); + } + if (CompareString(attribName, "mcm") && CompareString(tagName, "m") && (fInsideRstate == 1)) { + fCurrentMCM = attribValue.Atoi(); + } + if (CompareString(attribName, "sm") && CompareString(tagName, "DCS")) { + fCurrentSM = attribValue.Atoi(); // only for GTU/PTR + } + if (CompareString(attribName, "id") && CompareString(tagName, "STACK")) {// hmmmm not exist? + fCurrentStack = attribValue.Atoi(); // only for GTU/PTR + } + } else if (fSystem == kInsideFEE && fLevel1Tag == kInsideGainTable) { + if (CompareString(tagName, "roc") && CompareString(attribName, "type")) fDCSFEEObj->SetGainTableRocType(attribValue); + if (CompareString(tagName, "roc") && CompareString(attribName, "serial")) fDCSFEEObj->SetGainTableRocSerial(attribValue.Atoi()); + if (CompareString(tagName, "mcm") && CompareString(attribName, "rob")) fCurrentROB = attribValue.Atoi(); + if (CompareString(tagName, "mcm") && CompareString(attribName, "pos")) fCurrentMCM = attribValue.Atoi(); + if (CompareString(tagName, "adc") && CompareString(attribName, "id")) fCurrentADC = attribValue.Atoi(); + + } else if (fSystem == kInsideGTU && fLevel1Tag == kInsideNone) { + if (CompareString(tagName, "publisher")) { + if (CompareString(attribName, "at")) fDCSGTUObj->SetSORFlag(attribValue.Atoi()); + if (CompareString(attribName, "serial")) fDCSGTUObj->SetSerial(attribValue.Atoi()); + if (CompareString(attribName, "runnr")) fDCSGTUObj->SetRunNumber(attribValue.Atoi()); + } + } else if (fSystem == kInsideGTU && fLevel1Tag == kInsideTgu) { + if (CompareString(tagName, "from")) { + if (CompareString(attribName, "at")) fDCSGTUObj->GetTgu()->SetFromSORFlag(attribValue.Atoi()); + if (CompareString(attribName, "runnr")) fDCSGTUObj->GetTgu()->SetFromRunNumber(attribValue.Atoi()); + if (CompareString(attribName, "child")) fDCSGTUObj->GetTgu()->SetFromChild(attribValue.Atoi()); + } + if (CompareString(tagName, "segmentmask") && CompareString(attribName, "value")) fDCSGTUObj->GetTgu()->SetSegmentMask(attribValue); + if (CompareString(tagName, "busymask") && CompareString(attribName, "value")) fDCSGTUObj->GetTgu()->SetBusyMask(attribValue); + if (CompareString(tagName, "contribmask") && CompareString(attribName, "value")) fDCSGTUObj->GetTgu()->SetContribMask(attribValue); + + if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "id")) fCtpOpc->SetId(attribValue.Atoi()); + if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "opcode")) fCtpOpc->SetOpcode(attribValue.Atoi()); + if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "direction")) fCtpOpc->SetDirection(attribValue.Atoi()); + if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "inverted")) fCtpOpc->SetInverted(attribValue.Atoi()); + if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "delay")) fCtpOpc->SetDelay(attribValue.Atoi()); + if (CompareString(tagName, "ctp_opc") && CompareString(attribName, "connected")) fCtpOpc->SetConnected(attribValue.Atoi()); + + } else if (fSystem == kInsideGTU && fLevel1Tag == kInsideSegment) { + if (CompareString(tagName, "from")) { + if (CompareString(attribName, "at")) fSegment->SetFromSORFlag(attribValue.Atoi()); + if (CompareString(attribName, "runnr")) fSegment->SetFromRunNumber(attribValue.Atoi()); + if (CompareString(attribName, "child")) fSegment->SetFromChild(attribValue.Atoi()); + } + if (fLevel2Tag == kInsideSmu) { + if (CompareString(tagName, "stackmask") && CompareString(attribName, "value")) fSegment->SetSmuStackMask(attribValue); + if (CompareString(tagName, "tracklets") && CompareString(attribName, "send")) fSegment->SetSmuTracklets(attribValue.Atoi()); + if (CompareString(tagName, "tracks") && CompareString(attribName, "send")) fSegment->SetSmuTracks(attribValue.Atoi()); + if (CompareString(tagName, "idelay") && CompareString(attribName, "value")) fSegment->SetSmuIdelay(attribValue.Atoi()); + if (CompareString(tagName, "ttc_emulator") && CompareString(attribName, "enable")) fSegment->SetSmuTtcEmulatorEnable(attribValue.Atoi()); + + if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l1_low")) + fSegment->SetSmuTriggerWindowL1Low(attribValue.Atoi()); + if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l1_high")) + fSegment->SetSmuTriggerWindowL1High(attribValue.Atoi()); + if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l2_low")) + fSegment->SetSmuTriggerWindowL2Low(attribValue.Atoi()); + if (CompareString(tagName, "trigger_window") && CompareString(attribName, "l2_high")) + fSegment->SetSmuTriggerWindowL2High(attribValue.Atoi()); + + } else if (fLevel2Tag == kInsideTmu) { + if (CompareString(tagName, "linkmask") && CompareString(attribName, "value")) fTmu->SetLinkMask(attribValue); + if (CompareString(tagName, "pattern_generator") && CompareString(attribName, "enable")) + fTmu->SetPatternGeneratorEnable(attribValue.Atoi()); + if (CompareString(tagName, "pattern_generator") && CompareString(attribName, "datawords")) + fTmu->SetPatternGeneratorDataWords(attribValue.Atoi()); + if (CompareString(tagName, "pattern_generator") && CompareString(attribName, "trackletwords")) + fTmu->SetPatternGeneratorTrackletWords(attribValue.Atoi()); + } } - if (attribName.Contains("id") && strName.Contains("STACK")) { - fCurrentStack = atoi(attr->GetValue()); // only for GTU/PTR + + if (fInsideBoardInfo) { +// cout << tagName << ": " << attribName << "=" << attribValue << "\n"; + if (CompareString(tagName, "board_info") && CompareString(attribName, "board_id")) fBoardInfo->SetId(attribValue); + if (CompareString(tagName, "board_info") && CompareString(attribName, "design_type")) fBoardInfo->SetType(attribValue.Atoi()); + if (CompareString(tagName, "board_info") && CompareString(attribName, "pci_ga")) fBoardInfo->SetPciGa(attribValue.Atoi()); + if (CompareString(tagName, "hardware") && CompareString(attribName, "date")) fBoardInfo->SetHwDate(attribValue); + if (CompareString(tagName, "hardware") && CompareString(attribName, "rev")) fBoardInfo->SetHwRev(attribValue.Atoi()); + if (CompareString(tagName, "hardware") && CompareString(attribName, "clean")) fBoardInfo->SetHwClean(attribValue.Atoi()); + if (CompareString(tagName, "software") && CompareString(attribName, "date")) fBoardInfo->SetSwDate(attribValue); + if (CompareString(tagName, "software") && CompareString(attribName, "rev")) fBoardInfo->SetSwRev(attribValue.Atoi()); + if (CompareString(tagName, "software") && CompareString(attribName, "clean")) fBoardInfo->SetSwClean(attribValue.Atoi()); } } // if there is a new DCS element put it in the correct array - if (strName.Contains("DCS")) { + if (CompareString(tagName, "DCS")) { if (fSystem == kInsideFEE) { fDCSFEEObj = new AliTRDCalDCSFEE(name,dcsTitle); fDCSFEEObj->SetDCSid(dcsId); } if (fSystem == kInsidePTR) { - fDCSPTRObj = new AliTRDCalDCSPTR(name,dcsTitle); - fDCSPTRObj->SetDCSid(dcsId); +// fDCSPTRObj = new AliTRDCalDCSPTR(name,dcsTitle); +// fDCSPTRObj->SetDCSid(dcsId); } if (fSystem == kInsideGTU) { - fDCSGTUObj = new AliTRDCalDCSGTU(name,dcsTitle); - fDCSGTUObj->SetDCSid(dcsId); +// fDCSGTUObj = new AliTRDCalDCSGTU(name,dcsTitle); +// fDCSGTUObj->SetDCSid(dcsId); } } } @@ -224,11 +355,11 @@ void AliTRDSaxHandler::OnStartElement(const char *name, const TList *attributes) void AliTRDSaxHandler::OnEndElement(const char *name) { // do everything that needs to be done when an end tag of an element is found - TString strName = name; + TString tagName = name; // if done with this DCS board, put it in the correct array // no check for necessary since this check is done during XML validation - if (strName.Contains("DCS")) { + if (CompareString(tagName, "DCS")) { if (fSystem == kInsideFEE) { Int_t detID = 0; if (fDCSFEEObj->GetStatusBit() == 0) { @@ -249,58 +380,102 @@ void AliTRDSaxHandler::OnEndElement(const char *name) fPTRArr->AddAt(fDCSPTRObj,fNDCSPTR); fNDCSPTR++; } - if (fSystem == kInsideGTU) { - fGTUArr->AddAt(fDCSGTUObj,fNDCSGTU); - fNDCSGTU++; - } +// if (fSystem == kInsideGTU) { +// fGTUArr->AddAt(fDCSGTUObj,fNDCSGTU); +// fNDCSGTU++; +// } fCurrentSM = 99; // 99 for no SM set fDCSFEEObj = 0; // just to be sure return; } - // done with this stack? - if (strName.Contains("STACK")) { + // done with this stack? + if (CompareString(tagName, "STACK")) {// TODO: errrrm ???? always 99? fCurrentStack = 99; // 99 for no stack set } // outside of rstate again? - if (strName.Contains("rstate")) { + if (CompareString(tagName, "rstate")) { fInsideRstate = 0; fCurrentROB = -1; fCurrentMCM = -1; } - if (strName.Contains("ro-board")) fCurrentROB = -1; + if (CompareString(tagName, "ro-board")) fCurrentROB = -1; // store informations of the FEE DCS-Board if (fSystem == kInsideFEE) { - if (strName.Contains("DNR")) fDCSFEEObj->SetStatusBit(fContent.Atoi()); - if (strName.Contains("CFGNME")) fDCSFEEObj->SetConfigName(fContent); - if (strName.Contains("CFGTAG")) fDCSFEEObj->SetConfigTag(fContent.Atoi()); - if (strName.Contains("CFGVRSN")) fDCSFEEObj->SetConfigVersion(fContent); - if (strName.Contains("NTB")) fDCSFEEObj->SetNumberOfTimeBins(fContent.Atoi()); - if (strName.Contains("SM-ID")) fDCSFEEObj->SetSM(fContent.Atoi()); - if (strName.Contains("STACK-ID")) fDCSFEEObj->SetStack(fContent.Atoi()); - if (strName.Contains("LAYER-ID")) fDCSFEEObj->SetLayer(fContent.Atoi()); - if (strName.Contains("SINGLEHITTHRES")) fDCSFEEObj->SetSingleHitThres(fContent.Atoi()); - if (strName.Contains("THRPADCLSTHRS")) fDCSFEEObj->SetThreePadClustThres(fContent.Atoi()); - if (strName.Contains("SELNOZS")) fDCSFEEObj->SetSelectiveNoZS(fContent.Atoi()); - if (strName.Contains("FASTSTATNOISE")) fDCSFEEObj->SetFastStatNoise(fContent.Atoi()); - if (strName.Contains("FILTWEIGHT")) fDCSFEEObj->SetTCFilterWeight(fContent.Atoi()); - if (strName.Contains("FILTSHRTDCYPRM")) fDCSFEEObj->SetTCFilterShortDecPar(fContent.Atoi()); - if (strName.Contains("FILTLNGDCYPRM")) fDCSFEEObj->SetTCFilterLongDecPar(fContent.Atoi()); - if (strName.Contains("FLTR")) fDCSFEEObj->SetFilterType(fContent); - if (strName.Contains("READOUTPAR")) fDCSFEEObj->SetReadoutParam(fContent); - if (strName.Contains("TESTPATTERN")) fDCSFEEObj->SetTestPattern(fContent); - if (strName.Contains("TRCKLTMODE")) fDCSFEEObj->SetTrackletMode(fContent); - if (strName.Contains("TRCKLTDEF")) fDCSFEEObj->SetTrackletDef(fContent); - if (strName.Contains("TRIGGERSETUP")) fDCSFEEObj->SetTriggerSetup(fContent); - if (strName.Contains("ADDOPTIONS")) fDCSFEEObj->SetAddOptions(fContent); + if (CompareString(tagName, "DNR")) fDCSFEEObj->SetStatusBit(fContent.Atoi()); + if (CompareString(tagName, "CFGNME")) fDCSFEEObj->SetConfigName(fContent); + if (CompareString(tagName, "CFGTAG")) fDCSFEEObj->SetConfigTag(fContent.Atoi()); + if (CompareString(tagName, "CFGVRSN")) fDCSFEEObj->SetConfigVersion(fContent); + if (CompareString(tagName, "NTB")) fDCSFEEObj->SetNumberOfTimeBins(fContent.Atoi()); + if (CompareString(tagName, "SM-ID")) fDCSFEEObj->SetSM(fContent.Atoi()); + if (CompareString(tagName, "STACK-ID")) fDCSFEEObj->SetStack(fContent.Atoi()); + if (CompareString(tagName, "LAYER-ID")) fDCSFEEObj->SetLayer(fContent.Atoi()); + if (CompareString(tagName, "SINGLEHITTHRES")) fDCSFEEObj->SetSingleHitThres(fContent.Atoi()); + if (CompareString(tagName, "THRPADCLSTHRS")) fDCSFEEObj->SetThreePadClustThres(fContent.Atoi()); + if (CompareString(tagName, "SELNOZS")) fDCSFEEObj->SetSelectiveNoZS(fContent.Atoi()); + if (CompareString(tagName, "FASTSTATNOISE")) fDCSFEEObj->SetFastStatNoise(fContent.Atoi()); + if (CompareString(tagName, "FILTWEIGHT")) fDCSFEEObj->SetTCFilterWeight(fContent.Atoi()); + if (CompareString(tagName, "FILTSHRTDCYPRM")) fDCSFEEObj->SetTCFilterShortDecPar(fContent.Atoi()); + if (CompareString(tagName, "FILTLNGDCYPRM")) fDCSFEEObj->SetTCFilterLongDecPar(fContent.Atoi()); + if (CompareString(tagName, "FLTR")) fDCSFEEObj->SetFilterType(fContent); + if (CompareString(tagName, "READOUTPAR")) fDCSFEEObj->SetReadoutParam(fContent); + if (CompareString(tagName, "TESTPATTERN")) fDCSFEEObj->SetTestPattern(fContent); + if (CompareString(tagName, "TRCKLTMODE")) fDCSFEEObj->SetTrackletMode(fContent); + if (CompareString(tagName, "TRCKLTDEF")) fDCSFEEObj->SetTrackletDef(fContent); + if (CompareString(tagName, "TRIGGERSETUP")) fDCSFEEObj->SetTriggerSetup(fContent); + if (CompareString(tagName, "ADDOPTIONS")) fDCSFEEObj->SetAddOptions(fContent); + if (CompareString(tagName, "gaintbl")) { + fLevel1Tag = kInsideNone; + fCurrentROB = -1; + fCurrentMCM = -1; + fCurrentADC = -1; + } + if (fLevel1Tag == kInsideGainTable) { + if (CompareString(tagName, "name")) fDCSFEEObj->SetGainTableName(fContent); + if (CompareString(tagName, "desc")) fDCSFEEObj->SetGainTableDesc(fContent); + if (CompareString(tagName, "adcdac")) fDCSFEEObj->SetGainTableAdcdac(fCurrentROB, fCurrentMCM, fContent.Atoi()); + if (CompareString(tagName, "fgfn")) fDCSFEEObj->SetGainTableFgfn(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi()); + if (CompareString(tagName, "fgan")) fDCSFEEObj->SetGainTableFgan(fCurrentROB, fCurrentMCM, fCurrentADC, fContent.Atoi()); + } if (fInsideRstate == 1) { if (fCurrentROB>=0 && fCurrentMCM>=0) { - if (strName.Contains("gsm")) fDCSFEEObj->SetMCMGlobalState(fCurrentROB, fCurrentMCM, fContent.Atoi()); - if (strName.Contains("ni")) fDCSFEEObj->SetMCMStateNI(fCurrentROB, fCurrentMCM, fContent.Atoi()); - if (strName.Contains("ev")) fDCSFEEObj->SetMCMEventCnt(fCurrentROB, fCurrentMCM, fContent.Atoi()); - if (strName.Contains("ptrg")) fDCSFEEObj->SetMCMPtCnt(fCurrentROB, fCurrentMCM, fContent.Atoi()); + if (CompareString(tagName, "gsm")) fDCSFEEObj->SetMCMGlobalState(fCurrentROB, fCurrentMCM, fContent.Atoi()); + if (CompareString(tagName, "ni")) fDCSFEEObj->SetMCMStateNI(fCurrentROB, fCurrentMCM, fContent.Atoi()); + if (CompareString(tagName, "ev")) fDCSFEEObj->SetMCMEventCnt(fCurrentROB, fCurrentMCM, fContent.Atoi()); + if (CompareString(tagName, "ptrg")) fDCSFEEObj->SetMCMPtCnt(fCurrentROB, fCurrentMCM, fContent.Atoi()); + } + } + } + + if (fSystem == kInsideGTU) { +// cout << "Close: " << tagName << " " << fLevel1Tag << " " << fLevel2Tag << " " << fInsideBoardInfo << "\n"; + +// if (CompareString(tagName, "run")) { +// fDCSGTUObj->SetSORFlag(TString(fContent(fContent.Length()-1,1)).Atoi()); +// fDCSGTUObj->SetRunNumber(TString(fContent(0,fContent.Length()-2)).Atoi()); +// } +// if (CompareString(tagName, "serial")) fDCSGTUObj->SetSerial(fContent.Atoi()); + if (CompareString(tagName, "board_info")) { + fInsideBoardInfo = false; + if (fLevel1Tag == kInsideTgu) fDCSGTUObj->GetTgu()->SetBoardInfo(fBoardInfo); + if (fLevel1Tag == kInsideSegment && fLevel2Tag == kInsideSmu) fSegment->SetSmuBoardInfo(fBoardInfo); + if (fLevel1Tag == kInsideSegment && fLevel2Tag == kInsideTmu) fTmu->SetBoardInfo(fBoardInfo); + } + if (CompareString(tagName, "dnr")) fDCSGTUObj->SetDNR(fContent.Atoi()); + if (CompareString(tagName, "tgu")) fLevel1Tag = kInsideNone; + if (CompareString(tagName(0,tagName.Length()-3), "segment")) { + fDCSGTUObj->GetSegmentArray()->Add(fSegment); + fLevel1Tag = kInsideNone; + } + if (fLevel1Tag == kInsideTgu) { + if (CompareString(tagName, "ctp_opc")) fDCSGTUObj->GetTgu()->GetCtpOpcArray()->Add(fCtpOpc); + } else if (fLevel1Tag == kInsideSegment) { + if (CompareString(tagName, "smu")) fLevel2Tag = kInsideNone; + if (CompareString(tagName(0,3), "tmu")) { + fSegment->GetTmuArray()->Add(fTmu); + fLevel2Tag = kInsideNone; } } } @@ -310,15 +485,15 @@ void AliTRDSaxHandler::OnEndElement(const char *name) if (fSystem == kInsidePTR) { // no informations available yet } - // store GTU informations - if (fSystem == kInsideGTU) { - if (strName.Contains("SMMASK")) - fHandlerStatus = fDCSGTUObj->SetSMMask(fContent); - if (strName.Contains("LINKMASK")) - fHandlerStatus = fDCSGTUObj->SetLinkMask(fCurrentSM, fCurrentStack, fContent); - if (strName.Contains("STMASK")) - fDCSGTUObj->SetStackMaskBit(fCurrentSM, fCurrentStack, fContent.Atoi()); - } +// // store GTU informations +// if (fSystem == kInsideGTU) { +// if (CompareString(tagName, "SMMASK")) +// fHandlerStatus = fDCSGTUObj->SetSMMask(fContent); +// if (CompareString(tagName, "LINKMASK")) +// fHandlerStatus = fDCSGTUObj->SetLinkMask(fCurrentSM, fCurrentStack, fContent); +// if (CompareString(tagName, "STMASK")) +// fDCSGTUObj->SetStackMaskBit(fCurrentSM, fCurrentStack, fContent.Atoi()); +// } } //_____________________________________________________________________________ diff --git a/TRD/AliTRDSaxHandler.h b/TRD/AliTRDSaxHandler.h index 180c71d4509..8c29dd71153 100644 --- a/TRD/AliTRDSaxHandler.h +++ b/TRD/AliTRDSaxHandler.h @@ -15,6 +15,10 @@ //////////////////////////////////////////////////////////////////////////// #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 }; diff --git a/TRD/Cal/AliTRDCalDCS.cxx b/TRD/Cal/AliTRDCalDCS.cxx index c313d099c76..9969a1980a0 100644 --- a/TRD/Cal/AliTRDCalDCS.cxx +++ b/TRD/Cal/AliTRDCalDCS.cxx @@ -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 diff --git a/TRD/Cal/AliTRDCalDCS.h b/TRD/Cal/AliTRDCalDCS.h index 496d343a91a..68c421d07fb 100644 --- a/TRD/Cal/AliTRDCalDCS.h +++ b/TRD/Cal/AliTRDCalDCS.h @@ -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 diff --git a/TRD/Cal/AliTRDCalDCSFEE.cxx b/TRD/Cal/AliTRDCalDCSFEE.cxx index bde523091e4..ae9e9b632ec 100644 --- a/TRD/Cal/AliTRDCalDCSFEE.cxx +++ b/TRD/Cal/AliTRDCalDCSFEE.cxx @@ -50,6 +50,8 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE() ,fTCFilterShortDecPar(-1) ,fTCFilterLongDecPar(-1) ,fFastStatNoise(-1) + ,fGainTableRocType("") + ,fGainTableRocSerial(0) ,fFilterType(0) ,fReadoutParam(0) ,fTestPattern(0) @@ -59,6 +61,8 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE() ,fAddOptions(0) ,fConfigName(0) ,fConfigVersion(0) + ,fGainTableName("") + ,fGainTableDesc("") { // // AliTRDCalDCSFEE default constructor @@ -69,6 +73,11 @@ AliTRDCalDCSFEE::AliTRDCalDCSFEE() fRStateNI[i][j] = -1; fRStateEV[i][j] = -1; fRStatePTRG[i][j] = -1; + fGainTableAdcdac[i][j] = -1; + for(Int_t k=0; kSetOwner(); } //_____________________________________________________________________________ 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; -} diff --git a/TRD/Cal/AliTRDCalDCSGTU.h b/TRD/Cal/AliTRDCalDCSGTU.h index 7c075950056..d1042eb508d 100644 --- a/TRD/Cal/AliTRDCalDCSGTU.h +++ b/TRD/Cal/AliTRDCalDCSGTU.h @@ -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 index 00000000000..464c15010c0 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUBoardInfo.cxx @@ -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 index 00000000000..eab78adc333 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUBoardInfo.h @@ -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 index 00000000000..9b29ece2b75 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUCtpOpc.cxx @@ -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 index 00000000000..332d38e7cae --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUCtpOpc.h @@ -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 index 00000000000..7bb3b5b79d8 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUSegment.cxx @@ -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 index 00000000000..cf13508930c --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUSegment.h @@ -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 index 00000000000..dd3ba31d6dc --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUTgu.cxx @@ -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 index 00000000000..14cef412f33 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUTgu.h @@ -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 index 00000000000..b209cd4eed7 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUTmu.cxx @@ -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 index 00000000000..2224b0de6ab --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSGTUTmu.h @@ -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 index 00000000000..be0e4eed084 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRCba.cxx @@ -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 index 00000000000..5c52b96d85a --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRCba.h @@ -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 index 00000000000..be0e4eed084 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRCbb.cxx @@ -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 index 00000000000..e89cbfc6fec --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRCbb.h @@ -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 index 00000000000..1bb79dcaa2c --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRFeb.cxx @@ -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 index 00000000000..2809b048b71 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRFeb.h @@ -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 index 00000000000..e3a83c66eb8 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRTlmu.cxx @@ -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 index 00000000000..687f342f5a4 --- /dev/null +++ b/TRD/Cal/AliTRDCalDCSPTRTlmu.h @@ -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 index 00000000000..2e78c8a4dec --- /dev/null +++ b/TRD/Cal/AliTRDcheckConfigSimple.C @@ -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 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; iArrPosGetFEEArr()->GetSize(); i++) { + AliTRDCalDCSFEE *idcsfee = calDCSObj->GetCalDCSFEEObj(i); + if ((idcsfee == NULL) || (idcsfee->GetStatusBit() != 0)) continue; + for (Int_t j=0; jGetMCMGlobalState(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; iGetFEEArr()->GetSize() && iGetFEEArr()->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; jGetMCMGlobalState(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; iGetFEEArr()->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."<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.........................: "<GetGlobalNumberOfTimeBins() << endl; + if (caldcs->GetGlobalConfigTag() != -1) + cout<<"Global configuration tag...........................: "<GetGlobalConfigTag() << endl; + if (caldcs->GetGlobalSingleHitThres() != -1) + cout<<"Global single hit threshold........................: "<GetGlobalSingleHitThres() << endl; + if (caldcs->GetGlobalThreePadClustThres() != -1) + cout<<"Global three pad cluster threshold.................: "<GetGlobalThreePadClustThres()<GetGlobalSelectiveNoZS() != -1) + cout<<"Global selective ZS (every i'th event).............: "<GetGlobalSelectiveNoZS() << endl; + if (caldcs->GetGlobalTCFilterWeight() != -1) + cout<<"Global tail cancellation filter weight.............: "<GetGlobalTCFilterWeight() << endl; + if (caldcs->GetGlobalTCFilterShortDecPar() != -1) + cout<<"Global tail cancellat. filter short decay parameter: "<GetGlobalTCFilterShortDecPar()<GetGlobalTCFilterLongDecPar() != -1) + cout<<"Global tail cancellation filt. long decay parameter: "<GetGlobalTCFilterLongDecPar()<GetGlobalModeFastStatNoise() != -1) + cout<<"Global fast statistics mode?.......................: "<GetGlobalModeFastStatNoise() << endl; + if (caldcs->GetGlobalConfigVersion() != "") + cout<<"Global configuration tag version...................: "<GetGlobalConfigVersion() << endl; + if (caldcs->GetGlobalConfigName() != "") + cout<<"Global configuration tag name......................: "<GetGlobalConfigName() << endl; + if (caldcs->GetGlobalFilterType() != "") + cout<<"Global filter type.................................: "<GetGlobalFilterType() << endl; + if (caldcs->GetGlobalReadoutParam() != "") + cout<<"Global readout parameter...........................: "<GetGlobalReadoutParam() << endl; + if (caldcs->GetGlobalTestPattern() != "") + cout<<"Global test pattern................................: "<GetGlobalTestPattern() << endl; + if (caldcs->GetGlobalTrackletMode() != "") + cout<<"Global tracklet mode...............................: "<GetGlobalTrackletMode() << endl; + if (caldcs->GetGlobalTrackletDef() != "") + cout<<"Global tracklet definition.........................: "<GetGlobalTrackletDef() << endl; + if (caldcs->GetGlobalTriggerSetup() != "") + cout<<"Global trigger setup...............................: "<GetGlobalTriggerSetup() << endl; + if (caldcs->GetGlobalAddOptions() != "") + cout<<"Global additional options..........................: "<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; + } + + +} diff --git a/TRD/TRDbaseLinkDef.h b/TRD/TRDbaseLinkDef.h index 1e943fcd52b..47c4c243830 100644 --- a/TRD/TRDbaseLinkDef.h +++ b/TRD/TRDbaseLinkDef.h @@ -42,6 +42,11 @@ #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+; diff --git a/TRD/libTRDbase.pkg b/TRD/libTRDbase.pkg index d72efb51e41..40544d6f75a 100644 --- a/TRD/libTRDbase.pkg +++ b/TRD/libTRDbase.pkg @@ -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 \