Functions | |
def | settings (apddict, filesuffix) |
Variables | |
pswdloc = os.environ['NOVADBPWDFILE'] | |
pswdfile = open(pswdloc, "r") | |
pswd = pswdfile.read() | |
string | SQL = "dbname=nova_hardware host=ifdbprod.fnal.gov user=nova_reader password={} port=5432" |
connFL = psycopg2.connect(SQL) | |
connAR = psycopg2.connect(SQL) | |
parser = argparse.ArgumentParser() | |
help | |
action | |
default | |
args = parser.parse_args() | |
useSafeMode = args.safe | |
dcm = args.dcm | |
curFL = connFL.cursor() | |
curAR = connAR.cursor() | |
string | debugName = "debuginfo.txt" |
debugFile = open(debugName, "w") | |
string | dummy = 'dummyfeb' |
febinfo = dict(dummy = (-999., -999.)) | |
rows = curFL.fetchall() | |
feb = str(row[0]) | |
febsn1 = feb.replace('_', '.') | |
febsn = febsn1.replace('-', '.') | |
apdStatsLowT = dict(dummy = (-999, -999, 999.) ) | |
apdStatsHighT = dict(dummy = (-999, 999, 999.) ) | |
chars = len(row[0]) | |
apd = row[0][chars-7:] | |
batch = row[1] | |
temp = row[2] | |
vr = row[3] | |
tuple | stats = (batch, temp, vr) |
prevStats = apdStatsHighT.get(apd) | |
prevBatch = prevStats[0] | |
now = time.localtime() | |
apdToFEBLowT = dict(dummy = ((-999, -999, 999., now), ('stupidfeb', -999, now, -999., -999), -999)) | |
apdToFEBHighT = dict(dummy = ((-999, -999, 999., now), ('stupidfeb', -999, now, -999., -999), -999)) | |
apdadded = row[1] | |
numrows = curAR.rowcount | |
apdcon = curAR.fetchone() | |
block = apdcon[0] | |
plane = apdcon[1] | |
modpos = apdcon[2] | |
string | mod = "{} on plane {} in block {}" |
macrows = curAR.fetchall() | |
febcon = curAR.fetchone() | |
febblock = febcon[1] | |
febplane = febcon[2] | |
febpos = febcon[3] | |
added = febcon[4] | |
febrows = curAR.fetchall() | |
prevDate = added | |
prevdate = added | |
febmb = febinfo.get(febsn) | |
tuple | febdata = (febsn, febcon[1], added, febmb[0], febmb[1]) |
apdstats = apdStatsLowT.get(apd) | |
tuple | apdinfo = (apdstats[0], apdstats[1], apdstats[2], apdadded) |
def NDAPDHVSetting.settings | ( | apddict, | |
filesuffix | |||
) |
Definition at line 13 of file NDAPDHVSetting.py.
References novadaq::HexUtils.format(), if(), open(), and stan::math.round().
NDAPDHVSetting.action |
Definition at line 156 of file NDAPDHVSetting.py.
NDAPDHVSetting.added = febcon[4] |
Definition at line 295 of file NDAPDHVSetting.py.
NDAPDHVSetting.apd = row[0][chars-7:] |
Definition at line 209 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdadded = row[1] |
Definition at line 248 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdcon = curAR.fetchone() |
Definition at line 263 of file NDAPDHVSetting.py.
Definition at line 326 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdstats = apdStatsLowT.get(apd) |
Definition at line 325 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdStatsHighT = dict(dummy = (-999, 999, 999.) ) |
Definition at line 203 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdStatsLowT = dict(dummy = (-999, -999, 999.) ) |
Definition at line 202 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdToFEBHighT = dict(dummy = ((-999, -999, 999., now), ('stupidfeb', -999, now, -999., -999), -999)) |
Definition at line 242 of file NDAPDHVSetting.py.
NDAPDHVSetting.apdToFEBLowT = dict(dummy = ((-999, -999, 999., now), ('stupidfeb', -999, now, -999., -999), -999)) |
Definition at line 241 of file NDAPDHVSetting.py.
NDAPDHVSetting.args = parser.parse_args() |
Definition at line 158 of file NDAPDHVSetting.py.
NDAPDHVSetting.batch = row[1] |
Definition at line 210 of file NDAPDHVSetting.py.
NDAPDHVSetting.block = apdcon[0] |
Definition at line 264 of file NDAPDHVSetting.py.
NDAPDHVSetting.chars = len(row[0]) |
Definition at line 208 of file NDAPDHVSetting.py.
NDAPDHVSetting.connAR = psycopg2.connect(SQL) |
Definition at line 149 of file NDAPDHVSetting.py.
NDAPDHVSetting.connFL = psycopg2.connect(SQL) |
Definition at line 143 of file NDAPDHVSetting.py.
NDAPDHVSetting.curAR = connAR.cursor() |
Definition at line 166 of file NDAPDHVSetting.py.
NDAPDHVSetting.curFL = connFL.cursor() |
Definition at line 165 of file NDAPDHVSetting.py.
NDAPDHVSetting.dcm = args.dcm |
Definition at line 160 of file NDAPDHVSetting.py.
Definition at line 175 of file NDAPDHVSetting.py.
string NDAPDHVSetting.debugName = "debuginfo.txt" |
Definition at line 174 of file NDAPDHVSetting.py.
NDAPDHVSetting.default |
Definition at line 157 of file NDAPDHVSetting.py.
string NDAPDHVSetting.dummy = 'dummyfeb' |
Definition at line 179 of file NDAPDHVSetting.py.
NDAPDHVSetting.feb = str(row[0]) |
Definition at line 187 of file NDAPDHVSetting.py.
NDAPDHVSetting.febblock = febcon[1] |
Definition at line 292 of file NDAPDHVSetting.py.
NDAPDHVSetting.febcon = curAR.fetchone() |
Definition at line 290 of file NDAPDHVSetting.py.
Definition at line 316 of file NDAPDHVSetting.py.
NDAPDHVSetting.febinfo = dict(dummy = (-999., -999.)) |
Definition at line 180 of file NDAPDHVSetting.py.
NDAPDHVSetting.febmb = febinfo.get(febsn) |
Definition at line 315 of file NDAPDHVSetting.py.
NDAPDHVSetting.febplane = febcon[2] |
Definition at line 293 of file NDAPDHVSetting.py.
NDAPDHVSetting.febpos = febcon[3] |
Definition at line 294 of file NDAPDHVSetting.py.
NDAPDHVSetting.febrows = curAR.fetchall() |
Definition at line 299 of file NDAPDHVSetting.py.
NDAPDHVSetting.febsn = febsn1.replace('-', '.') |
Definition at line 190 of file NDAPDHVSetting.py.
NDAPDHVSetting.febsn1 = feb.replace('_', '.') |
Definition at line 189 of file NDAPDHVSetting.py.
NDAPDHVSetting.help |
Definition at line 156 of file NDAPDHVSetting.py.
NDAPDHVSetting.macrows = curAR.fetchall() |
Definition at line 272 of file NDAPDHVSetting.py.
Definition at line 268 of file NDAPDHVSetting.py.
NDAPDHVSetting.modpos = apdcon[2] |
Definition at line 266 of file NDAPDHVSetting.py.
NDAPDHVSetting.now = time.localtime() |
Definition at line 239 of file NDAPDHVSetting.py.
NDAPDHVSetting.numrows = curAR.rowcount |
Definition at line 258 of file NDAPDHVSetting.py.
NDAPDHVSetting.parser = argparse.ArgumentParser() |
Definition at line 155 of file NDAPDHVSetting.py.
NDAPDHVSetting.plane = apdcon[1] |
Definition at line 265 of file NDAPDHVSetting.py.
Referenced by cmap::dataprov::CMap.AddException(), lem::FindLEMMatches.AddHists(), lem::LEM.AddHists(), calib::ThresholdAna.analyze(), chaninfo::CosmicEff.analyze(), dprf::ChannelPlots.analyze(), mcchk::MonopoleAna.analyze(), dprf::TrackPlots.analyze(), mcchk::RockAna.analyze(), murem::MuonRemoveAna.analyze(), sn::SupernovaAna.analyze(), comi::DataCheck.analyze(), calib::HitEfficiency.analyze(), zcl::MMCheater.analyze(), tbana::BeamlineTriggerAna.analyze(), trk::KalmanTrackAna.analyze(), hough::HoughValidate.analyze(), remid::ReMIdDedxRock.analyze(), remid::ReMIdDedxFD.analyze(), remid::ReMIdDedxStudies.analyze(), tbana::DetectorRateShutOff.analyze(), LightLevels.analyze(), calib::CosmicTrends.analyze(), slid::LIDTraining.analyze(), chaninfo::BadChanList.Apply(), caldp::AttenProfilesMap.AttenProfilesMap(), attenuation_calibration_comparisons(), attenuation_calibration_comparisons_withfb(), avgefficiency(), chaninfo::BadChanValidate.BadChansFromOM(), tbana::BeamStructureAna.beginJob(), tbana::BeamlineTriggerAna.beginJob(), calib::MuonTrackHits.beginJob(), dprf::ChannelPlots.beginRun(), dprf::TrackPlots.beginRun(), calib::PEResponse.beginRun(), rsim::ReadoutSim.beginRun(), chaninfo::FindSwappedChannels.beginSubRun(), calib.BestPathEstimates(), dt::DiscreteTracker.BestSeed(), cvn::Boundary.Boundary(), noe.build_cell_lookup_table(), dt::View.Channel(), cheat::CheckBackTracking.CheckFLSHitConsistency(), trk::KalmanTrack.CheckTrack(), dt::Chunk.Chunk(), geo::GeometryBase.ClosestApproach(), daqchannelmap::NearDetDAQChannelMap.computeBlock(), daqchannelmap::FarDetDAQChannelMap.computeBlock(), daqchannelmap::TestBeamDAQChannelMap.computeBlock(), daqchannelmap::NearDetDAQChannelMap.computePlane(), daqchannelmap::TestBeamDAQChannelMap.computePlane(), daqchannelmap::NearDetDAQChannelMap.computePlaneInBlock(), daqchannelmap::FarDetDAQChannelMap.computePlaneInBlock(), daqchannelmap::TestBeamDAQChannelMap.computePlaneInBlock(), remid::ReMIdTrain.ContainedEvent(), remid::ReMIdDedx.ContainedEvent(), remid::ReMIdDedxRock.ContainedEvent(), remid::ReMIdDedxStudies.ContainedEvent(), jmshower::RecoJMShower.ContStartPlane(), cvn::RegCVNImageUtils.ConvertChargeVectorsToViewVectors(), geo::GeometryBase.CountCellsOnLine(), geo::GeometryBase.CountCellsOnLineFast(), trk::KalmanGeoHelper.CountMissedCellsOnLine(), dt::ViewMerger.CountUnexplainedOnLine(), LightLevels.CreateHistos(), cvn::RegPixelMapProducer.CreateMapGivenBoundary(), cvn::PixelMapProducer.CreateMapGivenBoundary(), cvn::RegPixelMapProducer.CreateMapGivenShowerVertex(), cvn::RegPixelMapProducer.CreateMapGivenVertex(), rsim::ReadoutSim.CreateRawDigits(), dozooming(), evd::GeometryDrawer.DrawCells2D(), evd::GeometryDrawer.DrawHighlightCell(), eff_plots(), efficiency(), daqchannelmap::NearDetDAQChannelMap.encodeDChan(), daqchannelmap::FarDetDAQChannelMap.encodeDChan(), daqchannelmap::TestBeamDAQChannelMap.encodeDChan(), daqchannelmap::NearDetDAQChannelMap.encodeLChan(), daqchannelmap::FarDetDAQChannelMap.encodeLChan(), daqchannelmap::TestBeamDAQChannelMap.encodeLChan(), calib::CosmicCalib.endJob(), calib::MakeAttenuationProfiles.endJob(), tbana::BeamStructureAna.endJob(), tbana::BeamlineTriggerAna.endJob(), calib::AttenFit.endJob(), calib::FindOutliers.endRun(), rsim::RecordNoiseSpectrumFile.endSubRun(), LightLevels.endSubRun(), calib::MakeAttenuationProfiles.event(), dt::Chain.ExtremalSeg(), om::PlotClickHandler.FEButcInfo(), rsim::IFPGAAlgorithm.FetchThresholds(), chaninfo::FindSwappedChannels.fill_hist_and_tree(), calib::CosmicTrends.FillHistograms(), lem::EventSummary.FillHists(), calib::CosmicCalib.FillPathLengthInfo(), calib::MakeAttenuationProfiles.FillPathLengthInfo(), lem.FillPotential(), caf.FillSliceInfo(), calib::CosmicCalib.filter(), bsf::BremShowerFilter.filter(), calib::MuonTrackHits.filter(), novaddt::MichelETrigger.filter(), calib.FindBelowThresholdCalibCandidates(), cvn::RegPixelMapProducer.FindCenterMedian(), cvn::PixelMapProducer.FindCenterMedian(), dt::Cand.FindChunk(), bsf::BremShowerFilter.findShowerByTruth(), cvn::RegPixelMapProducer.FindVertexMaxGap(), cvn::PixelMapProducer.FindVertexMaxGap(), calib::AttenFit.fit_channel_prof(), calib::AttenuationFit.fit_channel_prof(), bpfit::BreakPoint.FitTracks(), align::SplitTracks.GeoEstimatePos(), caldp::AttenHistsMap.GetAllHistsByPlane(), caldp::AttenProfilesMap.GetAllProfilesByPlaneAndCell(), align::SplitTracks.GetCellEndpoints(), jmshower::RecoJMShower.GetCellTransDedx(), calib::CosmicCalib.GetChannelHists(), calib::MakeAttenuationProfiles.GetChannelHists(), calib::CosmicCalib.GetChannelProfiles(), calib::MakeAttenuationProfiles.GetChannelProfiles(), evd::RecoBaseDrawer.GetClusterOutlines(), jmshower::RecoJMShower.GetDedxInvLongLL(), jmshower::RecoJMShower.GetDedxLongLL(), airshower::AirSlicer.GetHitPos(), cmap::dataprov::CMap.getPlane(), jmshower::RecoJMShower.GetPlaneDedxProb(), dt::View.GetPlanes(), dt::Chunk.GetSegs(), calib::Calibrator.GetTimeStamp(), calib::Calibrator.GetTimingOffset(), jmshower::JMShower.GetTransHits(), jmshower::RecoJMShower.GetTrkCPlaneCell(), jmshower::RecoJMShower.GetTrkDistToEdge(), calib::ThresholdAna.GetView(), calib::CosmicCalib.GetView(), calib::MakeAttenuationProfiles.GetView(), calib::AttenFit.GetView(), calib::AttenuationFit.GetView(), calib::AttenCache.GetView(), novaddt::UpMuTrigger.GetXYZ(), novaddt::UpMuAna.GetXYZ(), calib.GetXYZD(), cheat::BackTracker.HaveTruthInfo(), mono::MonopoleCluster.hit_is_isolated(), om::PlotClickHandler.HwDCMHistogramInfo(), om::PlotClickHandler.HwDetHistogramInfo(), om::PlotClickHandler.HwPCHistogramInfoX(), om::PlotClickHandler.HwPCHistogramInfoY(), chaninfo::BadChanList.InDroppedDCM(), initialise(), chaninfo::BadChanList.IsBadUncached(), nnbar::NNbarUtilities.isFebFlasher(), jmshower::RecoJMShower.IsFiducial(), trk::KalmanTrackMerge.JoinTracks(), dbutils::RunHistory.Load(), chaninfo::BadChanList.LoadCosmicEff(), calib::AttenCache.LoadFromDatabase(), photrans::ImprovedTransport.LoadHistos(), chaninfo::BadChanList.LoadNewData(), nova::dbi::RunHistory.LoadPedestals(), calib::AttenuationFit.lowessFit(), main(), dt::View.MakeChunks(), evtsum::EventSummary.MakeOutput(), trk::CosmicTrackAlg.MakeTrack(), airshower::AirSlicer.MakeTrackSlices(), trk::WindowTrackingAlg.MakeViewTrack(), murem::FindParent.MatchToOrigSlice(), lem::FindLEMMatches.MatchToVertex(), lem::LEM.MatchToVertex(), trk::KalmanGeoHelper.MatchTrajectoryToPlane(), trk::KalmanGeoHelper.MatchTrajectoryToPlaneInView(), nuesand::FillNueSandbox.MaxGap(), rb::Cluster.MostContiguousPlanes(), rb::Cluster.MostMissingPlanes(), chaninfo::BadChanList.NBadInSubRun(), cvn::RegPixelMap.NInput(), cvn::PixelMap.NInput(), jmshower::RecoJMShower.NMIPPlane(), dt::Cand.NSegs(), jmshower::JMShower.PlaneCentroidCell(), jmshower::JMShower.PlaneDedx(), rb::Track.PlaneDirMap(), jmshower::JMShower.PlaneE1Cell(), jmshower::JMShower.PlaneE2Cell(), slid::ParticleIDAlg.PlaneHitCell(), jmshower::JMShower.PlaneHitCell(), jmshower::JMShower.PlaneHitXYZ(), jmshower::JMShower.PlaneProb(), jmshower::JMShower.PlaneRadius(), planestring(), plot_abstree(), plot_residPerPlane(), plot_residPerViewV(), plot_residPerViewZ(), plot_sumcellsV(), plot_sumcellsZ(), printEventToJson(), calib::PCHitsList.ProcessTrackForBelowThresholdHits(), calib::ResizeDetector.produce(), lem::AlignLibToVtx.produce(), lem::MakeLibrary.produce(), slid::LIDBuilder.produce(), rsim::ReadoutSim.produce(), evd::RawDataDrawer.RawDigit2D(), rsim::ReadoutSim.ReadoutSim(), rawp::FillRawDigits.Reco(), jmshower::RecoJMShower.RecoShowers(), trk::RLFit.RLFit(), RunCalibration(), screen_to_activecell(), screen_to_cell(), screen_to_cell_unbounded(), set_eventn_status_hit(), rb::CellHit.SetPlane(), rsim::IFPGAAlgorithm.SetPlaneAndCell(), sim::PhotonSignal.SetPlaneCell(), jmshower::JMShower.SetPlaneCentroidCell(), jmshower::JMShower.SetPlaneDedx(), jmshower::JMShower.SetPlaneE1Cell(), jmshower::JMShower.SetPlaneE2Cell(), jmshower::JMShower.SetPlaneHitCell(), jmshower::JMShower.SetPlaneHitXYZ(), jmshower::JMShower.SetPlaneProb(), jmshower::JMShower.SetPlaneRadius(), chaninfo::BadChanList.SetRandomBadChannels(), cmap::dataprov::CMap.SetStdMap(), trk::KalmanTrackMerge.ShiftInterpolationPoints(), show_potential(), lem::LEMSummarizer.SliceToLEMInput(), caf::CAFMaker.sortNuWithIdx(), DAQChannelMapTests.testBasicChannelGetOffline(), DAQChannelMapTests.testBasicOfflineChannelGet(), geo::GeometryTest.testCellPos(), DAQChannelMapTests.testPlaneLookupsOffline(), DAQChannelMapTests.testViewLookups(), DAQChannelMapTests.testViewLookupsOffline(), dt::Cand.TrimBack(), dt::Cand.TrimFront(), slid::NuEEnergyAlg.VertexEnergy(), dt::View.View(), geo::PlaneGeo.View(), calib::AttenuationFit.writeResults(), rect.xmax(), photrans::BrightnessLevel.~BrightnessLevel(), and jmshower::JMShower.~JMShower().
NDAPDHVSetting.prevBatch = prevStats[0] |
Definition at line 222 of file NDAPDHVSetting.py.
NDAPDHVSetting.prevDate = added |
Definition at line 301 of file NDAPDHVSetting.py.
NDAPDHVSetting.prevdate = added |
Definition at line 310 of file NDAPDHVSetting.py.
NDAPDHVSetting.prevStats = apdStatsHighT.get(apd) |
Definition at line 221 of file NDAPDHVSetting.py.
NDAPDHVSetting.pswd = pswdfile.read() |
Definition at line 135 of file NDAPDHVSetting.py.
Definition at line 134 of file NDAPDHVSetting.py.
NDAPDHVSetting.pswdloc = os.environ['NOVADBPWDFILE'] |
Definition at line 133 of file NDAPDHVSetting.py.
NDAPDHVSetting.rows = curFL.fetchall() |
Definition at line 184 of file NDAPDHVSetting.py.
string NDAPDHVSetting.SQL = "dbname=nova_hardware host=ifdbprod.fnal.gov user=nova_reader password={} port=5432" |
Definition at line 137 of file NDAPDHVSetting.py.
Definition at line 213 of file NDAPDHVSetting.py.
NDAPDHVSetting.temp = row[2] |
Definition at line 211 of file NDAPDHVSetting.py.
NDAPDHVSetting.useSafeMode = args.safe |
Definition at line 159 of file NDAPDHVSetting.py.
NDAPDHVSetting.vr = row[3] |
Definition at line 212 of file NDAPDHVSetting.py.