String SparkTime::ISODateUTCString(uint32_t tnow) { uint32_t savedTimeZone = _timezone; bool savedUseDST = _useDST; _timezone = 0; _useDST = false; String ISOString; ISOString += yearString(tnow); ISOString += "-"; ISOString += monthString(tnow); ISOString += "-"; ISOString += dayString(tnow); ISOString += "T"; ISOString += hourString(tnow); ISOString += ":"; ISOString += minuteString(tnow); ISOString += ":"; ISOString += secondString(tnow); ISOString += "Z"; _timezone = savedTimeZone; _useDST = savedUseDST; return ISOString; }
String SparkTime::ISODateString(uint32_t tnow) { String ISOString; ISOString += yearString(tnow); ISOString += "-"; ISOString += monthString(tnow); ISOString += "-"; ISOString += dayString(tnow); ISOString += "T"; ISOString += hourString(tnow); ISOString += ":"; ISOString += minuteString(tnow); ISOString += ":"; ISOString += secondString(tnow); int32_t offset = timeZoneDSTOffset(tnow)/3600L; // Guard against timezone problems if (offset>-24 && offset<24) { if (offset < 0) { ISOString = ISOString + "-" + _digits[-offset] + "00"; } else { ISOString = ISOString + "+" + _digits[offset] + "00"; } } return ISOString; }
//__________________________________________________________ void AliTRDCheckPedestal(const Int_t runNr){ // Establish grid connection if(!TGrid::Connect("alien://")){printf("F-No grid connection\n");return;} // Set the storage to the OCDB of this runNr. It will be like // alien://folder=/alice/data/2016/OCDB AliCDBManager *man = AliCDBManager::Instance(); man->SetDefaultStorageFromRun(runNr); // We derive the reference storage from it const AliCDBStorage *stor = man->GetDefaultStorage(); TString folder = stor->GetBaseFolder(); folder.ReplaceAll("OCDB","Reference"); man->SetDefaultStorage(Form("alien://folder=%s",folder.Data())); // Set the run number man->SetRun(runNr); // We abuse the folder name to derive the year TString yearString(folder); yearString.ReplaceAll("/alice/data/",""); yearString.ReplaceAll("/Reference/",""); const Int_t year = yearString.Atoi(); printf("W-Experimental: Derived year %d from storage folder\n",year); // The reference data is stored per Local Data Concentrator std::vector<Int_t> LDCvec = GetLDCVector(year); // Loop over LDCs for(std::vector<Int_t>::iterator LDCit = LDCvec.begin();LDCit!=LDCvec.end();LDCit++){ const TString padstatus = Form("TRD/DAQData/PadStatus%d",*LDCit); AliCDBEntry *entry = AliCDBManager::Instance()->Get(padstatus.Data()); AliTRDCalibPadStatus *calpadstatus = dynamic_cast<AliTRDCalibPadStatus *>(entry->GetObject()); if(!calpadstatus){printf("E-Can not find %s in %s \n",padstatus.Data(),folder.Data());continue;} //Create the noise pad with the RMS values of each channel AliTRDCalPad *noisePad = calpadstatus->CreateCalPad(); // LDC -> SM mapping std::vector<Int_t> SMvec = GetSMVector(year,*LDCit); for(std::vector<Int_t>::iterator SMit=SMvec.begin();SMit!=SMvec.end();SMit++){ const TString padstatussm = Form("PadNoise-LDC%d-SM%02d",*LDCit,*SMit); TCanvas *cpadstatusm = new TCanvas(padstatussm.Data(),padstatussm.Data(),50,50,600,800); cpadstatusm->Divide(3,2); // Draw each layer (or here plane) const Float_t zRange[2]={0.,0.2}; for(Int_t iLayer = 0;iLayer<6;iLayer++){ cpadstatusm->cd(iLayer+1); noisePad->MakeHisto2DSmPl(*SMit,iLayer,0,0,zRange[0],zRange[1],-1)->Draw("colz"); } cpadstatusm->SaveAs(Form("%s.pdf",cpadstatusm->GetName())); } // Loop over SMs of this LDC } // End of loop over LDCs } // End of void AliTRDcheckPedestal
JSObject* IntlDateTimeFormat::resolvedOptions(ExecState& exec) { VM& vm = exec.vm(); auto scope = DECLARE_THROW_SCOPE(vm); // 12.3.5 Intl.DateTimeFormat.prototype.resolvedOptions() (ECMA-402 2.0) // The function returns a new object whose properties and attributes are set as if constructed by an object literal assigning to each of the following properties the value of the corresponding internal slot of this DateTimeFormat object (see 12.4): locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day, hour, minute, second, and timeZoneName. Properties whose corresponding internal slots are not present are not assigned. // Note: In this version of the ECMAScript 2015 Internationalization API, the timeZone property will be the name of the default time zone if no timeZone property was provided in the options object provided to the Intl.DateTimeFormat constructor. The previous version left the timeZone property undefined in this case. if (!m_initializedDateTimeFormat) { initializeDateTimeFormat(exec, jsUndefined(), jsUndefined()); ASSERT_UNUSED(scope, !scope.exception()); } JSObject* options = constructEmptyObject(&exec); options->putDirect(vm, vm.propertyNames->locale, jsNontrivialString(&exec, m_locale)); options->putDirect(vm, vm.propertyNames->calendar, jsNontrivialString(&exec, m_calendar)); options->putDirect(vm, vm.propertyNames->numberingSystem, jsNontrivialString(&exec, m_numberingSystem)); options->putDirect(vm, vm.propertyNames->timeZone, jsNontrivialString(&exec, m_timeZone)); if (m_weekday != Weekday::None) options->putDirect(vm, vm.propertyNames->weekday, jsNontrivialString(&exec, ASCIILiteral(weekdayString(m_weekday)))); if (m_era != Era::None) options->putDirect(vm, vm.propertyNames->era, jsNontrivialString(&exec, ASCIILiteral(eraString(m_era)))); if (m_year != Year::None) options->putDirect(vm, vm.propertyNames->year, jsNontrivialString(&exec, ASCIILiteral(yearString(m_year)))); if (m_month != Month::None) options->putDirect(vm, vm.propertyNames->month, jsNontrivialString(&exec, ASCIILiteral(monthString(m_month)))); if (m_day != Day::None) options->putDirect(vm, vm.propertyNames->day, jsNontrivialString(&exec, ASCIILiteral(dayString(m_day)))); if (m_hour != Hour::None) { options->putDirect(vm, vm.propertyNames->hour, jsNontrivialString(&exec, ASCIILiteral(hourString(m_hour)))); options->putDirect(vm, vm.propertyNames->hour12, jsBoolean(m_hour12)); } if (m_minute != Minute::None) options->putDirect(vm, vm.propertyNames->minute, jsNontrivialString(&exec, ASCIILiteral(minuteString(m_minute)))); if (m_second != Second::None) options->putDirect(vm, vm.propertyNames->second, jsNontrivialString(&exec, ASCIILiteral(secondString(m_second)))); if (m_timeZoneName != TimeZoneName::None) options->putDirect(vm, vm.propertyNames->timeZoneName, jsNontrivialString(&exec, ASCIILiteral(timeZoneNameString(m_timeZoneName)))); return options; }