Functions | Variables
getGoodRuns4SAM Namespace Reference

Functions

def countAnaBlocks (diblock_mask_binary)
 
def consolidate (run_rows)
 
def processFarDetData (data, detname, tag)
 
def processNearDetData (data, detname, tag)
 

Variables

string Usage
 
string data_type = 'data'
 
 tag = None
 
list dbcon = []
 
 t0 = text2datetime("0")
 
 t1 = text2datetime("100000000")
 
 channel_range = None
 
string username = "nova_reader"
 
 opts
 
 args
 
string tname = "fardet.dq_subrun_info"
 
list columns = ["dbmask","flag"]
 
 db = ConDB(dbcon)
 
 table = db.table(tname, columns)
 
 sampwd = None
 
 sampwdFile = None
 
 conn
 
 cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
 
 data
 
int n = 0
 
int nwrote = 0
 
string detname = 'fardet'
 
 fout = open("/tmp/goodRuns4SAM.csv","w")
 
int prev_diblock_mask = -1
 
bool prev_isGood = True
 
int run = int(epoch(tv))/100
 
int subrun = int(epoch(tv))%100
 
bool isGood = True
 
 diblock_mask = int(values[0])
 
string line = '{0},{1},{2},{3},{4},{5}\n'
 
 csvFile = open("/tmp/goodRuns4SAM.csv","r")
 
 sep
 
 DB_PWD = open(os.environ['NOVADBPWDFILE'], 'r').readlines()[0].strip()
 
 det = None
 
bool test = False
 
 run_rows = processFarDetData(data, det, tag)
 
 thisrun = row[0]
 
 nextrun = run_rows[ (idx+1)][0]
 
 run_range = psycopg2.extras.NumericRange(thisrun, nextrun, '[)')
 

Function Documentation

def getGoodRuns4SAM.consolidate (   run_rows)

Definition at line 35 of file getGoodRuns4SAM.py.

References novadaq::HexUtils.format(), and PandAna.Demos.demo1.range.

Referenced by processFarDetData(), and processNearDetData().

35 def consolidate(run_rows):
36  run_rows.sort()
37 
38  n = len(run_rows)
39  print "Read {} rows from the NOvA good runs database".format(n)
40  i=0
41 
42  prev_isGood = not(run_rows[0][3])
43  prev_diblock_mask = -1
44 
45  ret_rows = []
46 
47  for i in range(n):
48 
49  isGood = run_rows[i][3]
50  diblock_mask = run_rows[i][4]
51 
52  if ((prev_diblock_mask != diblock_mask) or (prev_isGood != isGood) or
53  (i == n-1)) :
54  ret_rows.append(run_rows[i])
55  prev_isGood = isGood
56  prev_diblock_mask = diblock_mask
57 
58 
59  print "Consisting of {} validity ranges.".format(len(ret_rows))
60  return ret_rows
61 
def consolidate(run_rows)
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
def getGoodRuns4SAM.countAnaBlocks (   diblock_mask_binary)

Definition at line 17 of file getGoodRuns4SAM.py.

Referenced by processFarDetData().

17 def countAnaBlocks(diblock_mask_binary):
18  anadb = 0
19  counter = 0
20  # first get rid of the '0b' that binary strings start with
21  bit_mask = diblock_mask_binary[2:]
22  # split into substrings at every 0
23  bit_mask_burst = bit_mask.split('0')
24  # should be left with substrings containing only 1's
25  # add up if substring length is 4 or more
26  for s in bit_mask_burst:
27  if len(s) > 3:
28  anadb += len(s)
29  return anadb
30 
31 
def countAnaBlocks(diblock_mask_binary)
def getGoodRuns4SAM.processFarDetData (   data,
  detname,
  tag 
)

Definition at line 66 of file getGoodRuns4SAM.py.

References bin, consolidate(), countAnaBlocks(), exit(), makeTrainCVSamples.int, and parse_dependency_file_t.list.

66 def processFarDetData(data, detname, tag):
67 
68  li = list(data)
69 
70  prev_diblock_mask = -1
71  if li == []:
72  print "\nNOvA database returned no information.\n"
73  exit(1)
74 
75  # set the variable that keep account of what the previous subrun's
76  # isgood flag was to the compliment of the flag for the first subrun
77  prev_isGood = ( li[0][2][0] > 1 )
78 
79  run_rows = []
80  n=0
81 
82  # parse information from the good runs database and put it
83  # into a list of ntuples that can later be sorted by run
84  for c, tv, values in li:
85 
86  run = int(epoch(tv))
87  isGood=True
88  if (values[1] > 0):
89  isGood = False
90 
91  diblock_mask = int(values[0])
92  ngood_cont_diblock = values[2]
93 
94  #convert to binary
95  diblock_mask_binary = bin( diblock_mask)
96  #count the number of 1's in the binary diblock mask
97  ngood_tot_diblock = diblock_mask_binary.count('1')
98 
99  ngood_ana_diblock = countAnaBlocks(diblock_mask_binary)
100 
101  tup = (run,
102  detname,tag,isGood,
103  diblock_mask,
104  ngood_cont_diblock,
105  ngood_ana_diblock,
106  ngood_tot_diblock)
107  run_rows.append(tup)
108 
109  return consolidate(run_rows)
110 
def consolidate(run_rows)
float bin[41]
Definition: plottest35.C:14
def processFarDetData(data, detname, tag)
exit(0)
def countAnaBlocks(diblock_mask_binary)
def getGoodRuns4SAM.processNearDetData (   data,
  detname,
  tag 
)

Definition at line 114 of file getGoodRuns4SAM.py.

References consolidate(), exit(), makeTrainCVSamples.int, and parse_dependency_file_t.list.

114 def processNearDetData(data, detname, tag):
115  li = list(data)
116  if li == []:
117  print "\nNOvA database returned no information.\n"
118  exit(1)
119  # set the variable that keep account of what the previous subrun's
120  # isgood flag was to the compliment of the flag for the first subrun
121 
122  run_rows = []
123 
124  for c, tv, values in li:
125 
126  run = int(epoch(tv))
127  isGood=(values[0] < 1)
128 
129  # set FD specific metrics to 0
130  diblock_mask = 0
131  ngood_cont_diblock = 0
132  ngood_tot_diblock = 0
133  ngood_ana_diblock = 0
134 
135  tup = (run,
136  detname,tag,isGood,
137  diblock_mask,
138  ngood_cont_diblock,
139  ngood_ana_diblock,
140  ngood_tot_diblock)
141  run_rows.append(tup)
142 
143  return consolidate(run_rows)
144 
145 
146 
def consolidate(run_rows)
exit(0)
def processNearDetData(data, detname, tag)

Variable Documentation

getGoodRuns4SAM.args

Definition at line 24 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.channel_range = None

Definition at line 21 of file getGoodRuns4SAM.py.

list getGoodRuns4SAM.columns = ["dbmask","flag"]

Definition at line 48 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.conn
Initial value:
1 = psycopg2.connect("dbname=samdev host=cspgsdev.fnal.gov "\
2  "user=jpaley "\
3  "port=5433")

Definition at line 67 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.csvFile = open("/tmp/goodRuns4SAM.csv","r")

Definition at line 110 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)

Definition at line 70 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.data
Initial value:
1 = table.getDataIntervalIter(t0, t1, data_type=data_type, tag=tag,
2  channel_range = channel_range)

Definition at line 76 of file getGoodRuns4SAM.py.

string getGoodRuns4SAM.data_type = 'data'
getGoodRuns4SAM.db = ConDB(dbcon)

Definition at line 49 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.DB_PWD = open(os.environ['NOVADBPWDFILE'], 'r').readlines()[0].strip()

Definition at line 161 of file getGoodRuns4SAM.py.

string getGoodRuns4SAM.dbcon = []

Definition at line 17 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.det = None

Definition at line 164 of file getGoodRuns4SAM.py.

string getGoodRuns4SAM.detname = 'fardet'
getGoodRuns4SAM.diblock_mask = int(values[0])

Definition at line 94 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.fout = open("/tmp/goodRuns4SAM.csv","w")

Definition at line 83 of file getGoodRuns4SAM.py.

bool getGoodRuns4SAM.isGood = True

Definition at line 91 of file getGoodRuns4SAM.py.

string getGoodRuns4SAM.line = '{0},{1},{2},{3},{4},{5}\n'

Definition at line 99 of file getGoodRuns4SAM.py.

int getGoodRuns4SAM.n = 0

Definition at line 79 of file getGoodRuns4SAM.py.

Referenced by calib::ADCShapeFitTable.ADCShapeFitTable(), ana::FCSurface.Add(), rb::HitMap.Add(), caldp::TCTrack.Add(), rb::Cluster.Add(), stan::mcmc::chains< RNG >.add(), novaddt::ChannelMapService.addCounter(), novaddt::calib::BufferManager< bufferType, Nbuffers >.addCounter(), ana.AddErrorInQuadrature(), ana::FCCollection.AddFiles(), ana.AddToSummaryV(), genie::GHepVirtualListFolder.AddToVirtualList(), highe::HighEnergyAna.analyze(), novaddt::GHLTest.analyze(), calib::ThresholdAna.analyze(), rsim::MakeNoiseSpectrumFile.analyze(), chaninfo::CosmicEff.analyze(), cheat::RecoCheckAna.analyze(), mcchk::DetAna.analyze(), sn::SNSlicerAna.analyze(), vf::TrackEva.analyze(), comi::NumiFilteringAna.analyze(), hough::HoughValidate.analyze(), ncs::Xeff.analyze(), slid::LIDTraining.analyze(), ncs::NCAna.analyze(), htk::HoughTrack.analyze(), mcchk::NeutrinoAna.AnalyzeNeutrinoInteraction(), air::AirKalmanAna.AngleBetweentrk(), APDPlots(), genie::HadronizationModelBase.ApplyRijk(), dt::Chain.AsChunkMap(), stan::model.assign(), stan::math.assign(), art::PtrVector< T >.at(), ana.AutoPlaceLegend(), avgefficiency(), cheat::RecoCheckAna.beginJob(), lem::MergeMatches.beginRun(), mcchk::DetAna.beginRun(), stan::math.bernoulli_ccdf_log(), stan::math.bernoulli_cdf_log(), stan::math.bernoulli_log(), stan::math.bernoulli_logit_glm_lpmf(), stan::math.bernoulli_logit_log(), stan::math.bernoulli_logit_lpmf(), stan::math.bernoulli_lpmf(), stan::math.bernoulli_rng(), ana.best_spline_fcn0(), ana.best_spline_fcn1(), ana.best_spline_find_mode(), ana.best_spline_mode_fcn(), stan::math.beta_binomial_ccdf_log(), stan::math.beta_binomial_cdf_log(), stan::math.beta_binomial_log(), stan::math.beta_binomial_lpmf(), stan::math.beta_cdf(), stan::math.beta_lccdf(), stan::math.beta_lcdf(), stan::math.beta_lpdf(), stan::math.beta_rng(), BinErrors(), stan::math.binomial_ccdf_log(), stan::math.binomial_cdf_log(), stan::math.binomial_coefficient_log(), stan::math.binomial_log(), stan::math.binomial_logit_log(), stan::math.binomial_logit_lpmf(), stan::math.binomial_lpmf(), novaddt.bitMask(), evd::TQPad.BookHistogram(), ifdb::IFDBSpillInfo.BpmProjection(), BuildSpectrum(), fuzz::ViewMatchAlg.CalcEnergyProfile(), nerd::ViewMatchAlg.CalcEnergyProfile(), CalcRWithSysts(), CalcRWithSystsNus17(), CalcSignificance(), stan::test::unit::instrumented_writer.call_count(), stan::math.categorical_log(), stan::math.categorical_logit_log(), stan::math.categorical_logit_lpmf(), stan::math.categorical_lpmf(), stan::math.cauchy_cdf(), stan::math.cauchy_lccdf(), stan::math.cauchy_lcdf(), stan::math.cauchy_lpdf(), stan::math.cauchy_rng(), evd::RecoBaseDrawer.CellHit2D(), ChanPlots(), stan::math::internal::bounded< T_y, T_low, T_high, y_is_vec >.check(), stan::math::internal::bounded< T_y, T_low, T_high, true >.check(), stan::math.check_lower_triangular(), stan::math.check_ordered(), stan::math.check_simplex(), stan::math.check_symmetric(), dt::DiscreteTracker.CheckAndFixSparseChain(), stan::math.chi_square_cdf(), stan::math.chi_square_lccdf(), stan::math.chi_square_lcdf(), stan::math.chi_square_lpdf(), stan::math.chi_square_rng(), ana::MultiExperiment.ChiSq(), stan::math.cholesky_factor_constrain(), stan::math.cholesky_factor_free(), genie::utils::math.CholeskyDecomposition(), genie::utils::math.CholeskyGenerateCorrelatedParams(), genie::utils::math.CholeskyGenerateCorrelatedParamVariations(), stan::math.choose(), stan::variational::advi< stan_model, stan::variational::normal_meanfield, rng_t >.circ_buff_median(), geo.ClampRayToDetectorVolume(), slicer::PointManager.CleanUpNeighborhood(), dt::Cand.ClosestToEndCell(), stan::io.cmd_line::bare< std::string >(), g4n::G4Alg.CollectFLSHitsAndParticles(), genie::GHepRecord.CompactifyDaughterLists(), ana.ComparisonTableNbins(), ana.ComparisonTableOneNbins(), genie::GMCJDriver.ComputeProbScales(), dt::ViewMerger.CountUnexplainedOnLine(), stan::math.cov_exp_quad(), stan::math.cov_matrix_constrain(), stan::math.cov_matrix_free(), stan::io::writer< T >.cov_matrix_unconstrain(), genie::CacheBranchFx.CreateSpline(), CustomLegend(), CutContainer.CutContainer(), om::GUIModel.Data(), nova::dbi.dBTable_(), nova::database.dBTable_(), DivideErrorByN(), fhicl::OptionalSequence< T,-1ull >.do_prepare_elements_for_validation(), fhicl::Sequence< T,-1ull >.do_prepare_elements_for_validation(), stan::math.double_exponential_cdf(), stan::math.double_exponential_lccdf(), stan::math.double_exponential_lcdf(), stan::math.double_exponential_lpdf(), stan::math.double_exponential_rng(), draw_vlines(), DrawBoundaryLines(), evd::RecoBaseDrawer.DrawTrack2D(), evd::RecoBaseDrawer.DrawTrack3D(), vdt::DTEnergy.E(), eff_plots(), efficiency(), efficiencycalc(), earms::ElasticArms.ElasticArms(), genie::flux::GJPARCNuFlux.End(), rwgt::MakeGENIEReweightTable.endJob(), evgen::CosmicsGen.Enhance(), stan::math.exp_action_chain_vd(), stan::math.exp_mod_normal_cdf(), stan::math.exp_mod_normal_lccdf(), stan::math.exp_mod_normal_lcdf(), stan::math.exp_mod_normal_lpdf(), stan::math.exp_mod_normal_rng(), stan::math.exponential_cdf(), stan::math.exponential_lccdf(), stan::math.exponential_lcdf(), stan::math.exponential_lpdf(), stan::math.exponential_rng(), dt::ViewMerger.Extremes(), dt::ViewMerger.FakeThirdDimension(), FCCorrectSlice(), FCTutorial2020(), fd_plot(), om::PlotClickHandler.FEButcInfo(), chaninfo::FindSwappedChannels.fill_hist_and_tree(), calib::StopperThreshold.FillHist(), bpfit::BreakPoint.FillHitList(), calib::StopperThreshold.FillTree(), lem::BackgroundEnricher.filter(), calib::MuonTrackHits.filter(), calib::MuondEdxAna.filter(), genie::BaryonResList.Find(), stan::test::unit::instrumented_logger.find_(), FindAngleFromChi2(), calib.FindBelowThresholdCalibCandidates(), rb::Track.FindNeighbouringPointIndices(), findPeakFWHM_ignoreSpikes(), earms::ElasticArmsHS.FindSeed(), trk::KalmanTrack.FindTracks(), ana::FitToFourier.Fit(), calib::AttenFit.fit_channel_prof(), calib::AttenuationFit.fit_channel_prof(), fit_thresh_corrs(), fit_thresh_corrs_fb(), trk::CosmicTrackAlg.FitView(), trk::WindowTrackingAlg.FitWindow(), FOMPlot(), stan::math.frechet_cdf(), stan::math.frechet_lccdf(), stan::math.frechet_lcdf(), stan::math.frechet_lpdf(), stan::math.frechet_rng(), lem::dec::Forest.FromFile(), lem::EventSummary.FromTree(), lem::Library.FromTrees(), futureSig_reach_singlePOTcombo_syst(), stan::math.gamma_cdf(), stan::math.gamma_lccdf(), stan::math.gamma_lcdf(), stan::math.gamma_lpdf(), stan::math.gamma_rng(), GammaFit(), stan::math.gaussian_dlm_obs_lpdf(), stan::lang.generate_indexed_expr(), GenerateEventsAtFixedInitState(), GENIEWeightLabel.GENIEWeightLabel(), stan.get(), beamlinereco::ToFPositionFinder.Get3CornerPosition(), stan::math.get_base1(), stan::math.get_base1_lhs(), stan::io::dump_reader.get_int(), stan::test::performance.get_last_iteration_from_file(), ana::LabelsAndBins.GetBins1D(), genie::supernova::OrderedSampler.GetBinValue(), jmshower::RecoJMShower.GetCellTransDedxProb(), evd::RecoBaseDrawer.GetClusterOutlinesConvexHull(), ana::TrivialBkgdEstimator.GetComponent(), ValidCalibPDF.GetCSVRow(), DataFile.GetData(), novaddt.GetExpectations(), calib.GetExpectations(), GetHist(), getHists_FNEX(), HepPolyhedron.GetNextEdgeIndeces(), ana::SpectrumLoaderBase.GetNextFile(), jmshower::RecoJMShower.GetPlaneDedxProb(), GetPoissonError(), calib::PCHitsList.GetTrueEnergyPathAndLightForCell(), ana::FileReducer.Go(), stan::math.gp_periodic_cov(), stan::math.grad_reg_lower_inc_gamma(), stan::math.grad_tr_mat_times_hessian(), stan::math.gradient_of_f(), gsDefaultInterp(), vdt.gsFCN(), om::PlotViewer.GUIModelDataIssue(), stan::math.gumbel_cdf(), stan::math.gumbel_lccdf(), stan::math.gumbel_lcdf(), stan::math.gumbel_lpdf(), stan::math.gumbel_rng(), ana::SpectrumLoader.HandleFile(), om::IPC.HandleHistoListRequests(), evdb::ParameterSetEdit.HandleTab(), stan::lang.has_lp_suffix(), stan::lang.has_rng_suffix(), stan::mcmc::impl_leapfrog< stan::mcmc::unit_e_metric< command_model_namespace::command_model, rng_t > >.hat_tau(), stan::math.head(), cheat::BackTracker.HitCollectionEfficiency(), rb::HitList.HitList(), dt::Chunk.HitsOnLine(), cheat::BackTracker.HitsToParticle(), om::PlotClickHandler.HwDCMHistogramInfo(), stan::math.hypergeometric_log(), stan::math.hypergeometric_lpmf(), art::Tracer.indent(), genie::flux::GAstroFlux.Index(), stan::math::coupled_ode_system< F, double, double >.initial_state(), stan::math::coupled_ode_system< F, double, var >.initial_state(), stan::services::util.initialize(), integrand(), genie::NewQELXSec.Integrate(), stan::math::cvodes_integrator< Lmm >.integrate(), stan::math.integrate_1d(), stan::math.integrate_ode_rk45(), genie::geometry::FidCylinder.InterceptUncapped(), stan::math.inv_chi_square_cdf(), stan::math.inv_chi_square_lccdf(), stan::math.inv_chi_square_lcdf(), stan::math.inv_chi_square_lpdf(), stan::math.inv_chi_square_rng(), stan::math.inv_gamma_cdf(), stan::math.inv_gamma_lccdf(), stan::math.inv_gamma_lcdf(), stan::math.inv_gamma_lpdf(), stan::math.inv_gamma_rng(), invert(), util.ipow(), genie::XSecSplineList.IsEmpty(), dt::ViewMerger.JoinTracks(), genie::utils::math.KahanSummation(), stan::mcmc::covar_adaptation.learn_covariance(), stan::mcmc::var_adaptation.learn_variance(), levy_func_problem(), novaddt::NNFastMMTrigger.LinFit(), zcl::FmmTrackerValidation.LinFit(), novaddt::UpMuTrigger.LinFit(), zcl::FastMMStudy.LinFit(), novaddt::UpMuAna.LinFit(), upmuana::UpMuAnalysis.LinFit(), upmuana::UpMuRecoAna.LinFit(), novaddt::UpMuTrigger.LinFitLLR(), novaddt::UpMuAna.LinFitLLR(), util.LinFitTS(), stan::math.lkj_cov_lpdf(), upmuana::LlrUpmu.LLR(), upmuana::UpMuAnalysis.LLR(), upmuana::UpMuRecoAna.LLR(), photrans.load_hset(), keras::LayerDense.load_weights(), genie::SpectralFunc1d.LoadConfig(), genie::flux::GAtmoFlux.LoadFluxData(), calib::AttenCache.LoadFromDatabase(), genie::Spline.LoadFromTree(), geo::GeometryBase.LoadGeometryFile(), genie::NaturalIsotopes.LoadTable(), stan::math.log_mix(), stan::math.logistic_cdf(), stan::math.logistic_lccdf(), stan::math.logistic_lcdf(), stan::math.logistic_lpdf(), stan::math.logistic_rng(), stan::math.lognormal_cdf(), stan::math.lognormal_lccdf(), stan::math.lognormal_lcdf(), stan::math.lognormal_lpdf(), stan::math.lognormal_rng(), ana::Binning.LogUniform(), LOverEPlot(), calib::AttenFit.lowessFit(), calib::AttenuationFit.lowessFit(), bpfit::Lutz.Lutz(), main(), ana.Make2DFrom1D(), make_cosmic_eff_table(), om::HistogramBrowser.MakeCategory(), fuzz::FuzzyKMeanAlg.MakeClusters(), evdb::ColorScale.MakeHSVScale(), MakePPFXRatios(), genie::geometry::GeomVolSelectorFiducial.MakeZPolygon(), hough::IslandsTH2.Mark(), stan::io::reader< T >.matrix_lb(), stan::io::reader< T >.matrix_lb_constrain(), stan::io::reader< T >.matrix_lub(), stan::io::reader< T >.matrix_lub_constrain(), stan::io::reader< T >.matrix_ub(), stan::io::reader< T >.matrix_ub_constrain(), osc.MatrixExp(), dt::ViewMerger.MaybeExtendToVertex(), evd::SimulationDrawer.MCTruthLongText(), evd::SimulationDrawer.MCTruthTrajectoriesAnyD(), stan::math.mdivide_left_tri(), dt::DiscreteTracker.MergeParasiteTracks(), rb::Cluster.MinMaxMeanXYZ(), calib::BetheBlochTables.MIP(), MoveDeltaToT2KUnits(), stan::math.multi_normal_cholesky_rng(), stan::math.multi_normal_rng(), stan::math.multi_student_t_rng(), stan::math.multinomial_lpmf(), genie::PythiaHadronization.MultiplicityProb(), genie::KNOHadronization.MultiplicityProb(), stan::math.multiply_lower_tri_self_transpose(), novaddt.nbitMask(), NDDataMCSystBandAna(), NDDataMCSystBandLoad(), numue::NumuEAlg.NDTrackLength(), stan::math.neg_binomial_2_ccdf_log(), stan::math.neg_binomial_2_cdf_log(), stan::math.neg_binomial_2_log(), stan::math.neg_binomial_2_log_glm_lpmf(), stan::math.neg_binomial_2_log_log(), stan::math.neg_binomial_2_log_lpmf(), stan::math.neg_binomial_2_log_rng(), stan::math.neg_binomial_2_lpmf(), stan::math.neg_binomial_2_rng(), stan::math.neg_binomial_ccdf_log(), stan::math.neg_binomial_cdf_log(), stan::math.neg_binomial_log(), stan::math.neg_binomial_lpmf(), stan::math.neg_binomial_rng(), hough::IslandsTH2.Neighbor(), neut_code_from_rootracker(), dt::Chain.NHitPlanes(), cvn::PixelMap.NInput(), util::HoughCalc.nodeUpdate(), stan::math.normal_cdf(), stan::math.normal_id_glm_lpdf(), stan::math.normal_lccdf(), stan::math.normal_lcdf(), stan::math.normal_lpdf(), stan::math.normal_rng(), genie::alvarezruso::AlvarezRusoCOHPiPDXSec.NuclearCurrent(), stan::mcmc::chains< RNG >.num_kept_samples(), stan::mcmc::chains< RNG >.num_samples(), recording_handler.number_long(), recording_handler.number_unsigned_long(), one_index_recover(), stan::lang::expression_visgen.operator()(), calib.operator<<(), art.operator<<(), nova::dbi.operator<<(), nova::database.operator<<(), HepGeom::Normal3D< float >.operator=(), stan::math::op_vector_vari.operator[](), stan::math::op_matrix_vari.operator[](), novaddt::calib::HitMap< T, Dimension >.operator[](), stan::math::seq_view< T, std::vector< T > >.operator[](), stan::math::seq_view< double, std::vector< int > >.operator[](), g4n::G4Alg.OverridePDGLifetimes(), evdb::ParameterSetEdit.ParameterSetEdit(), stan::math.pareto_cdf(), stan::math.pareto_lccdf(), stan::math.pareto_lcdf(), stan::math.pareto_lpdf(), stan::math.pareto_rng(), stan::math.pareto_type_2_cdf(), stan::math.pareto_type_2_lccdf(), stan::math.pareto_type_2_lcdf(), stan::math.pareto_type_2_lpdf(), stan::math.pareto_type_2_rng(), nova::database::Tolerance_t.parse(), nova::dbi::dBColumn_t.parse(), nova::dbi::dBCheck_t.parse(), nova::database::dBColumn_t.parse(), nova::dbi::dBRow_t.parse(), nova::database::dBCheck_t.parse(), nova::database::dBRow_t.parse(), nova::dbi::dBTable.parse(), nova::database::dBTable.parse(), stan::json::parser< Handler, Validate_UTF_8 >.parse_number(), genie::flux::GDk2NuFluxXMLHelper.ParseEnuMax(), genie::flux::GNuMIFluxXMLHelper.ParseEnuMax(), genie::geometry::GeomVolSelectorBasic.ParseSelection(), om::PlotOptions.ParseXscale(), om::PlotOptions.ParseYscale(), om::PlotOptions.ParseZscale(), stan::math.partial_derivative(), HepGeom::Plane3D< T >.Plane3D(), plot_abstree(), plot_contprof(), plot_cosmic_eff(), plot_multiplicity_prob(), plot_times(), plot_uncertainty(), PlotComp(), PlotInfo.PlotInfo(), ana.PlotPurEff(), ana.PlotSpectra(), PlotStack(), ana.PlotStack(), ana.PlotSyst(), ana.PlotSystBand(), ana::FCCollection.Point(), genie::geometry::PointGeomAnalyzer.PointGeomAnalyzer(), stan::math.poisson_ccdf_log(), stan::math.poisson_cdf_log(), stan::math.poisson_log(), stan::math.poisson_log_glm_lpmf(), stan::math.poisson_log_log(), stan::math.poisson_log_lpmf(), stan::math.poisson_log_rng(), stan::math.poisson_lpmf(), stan::math.poisson_rng(), novaddt::WaveformProcessor.postBeginRun(), pots(), genie::geometry::PathSegment.Print(), stan::test::unit::instrumented_logger.print_info(), print_norm(), genie::flux::GFluxDriverFactory.PrintConfig(), evd::SimulationDrawer.PrintParticleAndOffspring(), PrintTableFourBins(), ana.PrintTableHeader(), art::InputSource.processConfiguration(), genie::DFRKinematicsGenerator.ProcessEventRecord(), CalibAnaPlot.ProcessTrees(), cosmic::CosmicExposureInfo.produce(), NovaDDTHitProducer.produce(), lem::Preselection.produce(), presel::NuePresel.produce(), calib::PCHitTransposer.produce(), lem::MakeLibrary.produce(), dt::ViewMerger.produce(), dt::DiscreteTracker.produce(), lem::MakePID.produce(), lem::LEMWorker.produce(), rvp::RecVarPID.produce(), ana.Profile(), lem::dec::Cut.Prune(), stan::io::random_var_context.random_var_context(), evd::RawDataDrawer.RawDigit2D(), evd::RawDataDrawer.RawDigit3D(), evd::RawDataDrawer.RawDigitHardware(), stan::math.rayleigh_cdf(), stan::math.rayleigh_lccdf(), stan::math.rayleigh_lcdf(), stan::math.rayleigh_lpdf(), stan::math.rayleigh_rng(), keras.read_1d_array(), read_t2k_rootracker(), genie::RunOpt.ReadFromCommandLine(), dt::DiscreteTracker.RecoDiscrete(), filter::Filter.reconfigure(), ana::LoadFromRegistry< BaseClass >.Register(), murem::MuonRemove.RemoveByEfficiency(), stan::math.rep_array(), stan::math.rep_matrix(), slicer::PointManager.Reset(), genie::alvarezruso::integrationtools.RG202D(), genie::alvarezruso::integrationtools.RG482D(), locator::RndmLocatorTable.RndmLocatorTable(), beamlinereco::ToFPositionFinder.RotateCoords(), stan::variational::advi< stan_model, stan::variational::normal_meanfield, rng_t >.run(), RunCalibration(), stan::model.rvalue(), stan::model.rvalue_at(), stan::mcmc::softabs_metric< Model, BaseRNG >.sample_p(), stan::mcmc::chains< RNG >.samples(), stan::math.scaled_inv_chi_square_cdf(), stan::math.scaled_inv_chi_square_lccdf(), stan::math.scaled_inv_chi_square_lcdf(), stan::math.scaled_inv_chi_square_lpdf(), stan::math.scaled_inv_chi_square_rng(), stan::io::dump_reader.scan_number(), bpfit::Path.Scrub(), fuzz::FuzzyKMeanAlg.SeedA(), stan::math.segment(), selection_story_plots(), genie::flux::GCylindTH1Flux.SelectNeutrino(), genie::flux::GAtmoFlux.SelectNeutrino(), sensitivity_plot(), stan::mcmc::impl_leapfrog< stan::mcmc::unit_e_metric< command_model_namespace::command_model, rng_t > >.set_max_num_fixed_point(), evdb::ColorScale.SetBounds(), nutools::dbi::Table.SetConnectionTimeout(), nova::dbi::Table.SetConnectionTimeout(), SetGraphErrors(), nova::database::Table.SetMaxConnAttempts(), nutools::dbi::ColumnDef.SetName(), nova::dbi::ColumnDef.SetName(), nova::database::Column.SetName(), nova::dbi::RunHistory.SetNRetryLoads(), genie::geometry::GeomVolSelectorFiducial.SetReverseFiducial(), genie::alvarezruso::integrationtools.SG20R(), genie::alvarezruso::integrationtools.SG48R(), sha1_forRMS_file(), ana.ShadeBetweenHistograms(), ana::PredictionInterp.ShiftBins(), ana::Binning.SimpleHelper(), stan::math.skew_normal_cdf(), stan::math.skew_normal_lccdf(), stan::math.skew_normal_lcdf(), stan::math.skew_normal_lpdf(), stan::math.skew_normal_rng(), skip_line(), comi::FEBFlash.SliceStatistics(), hough::Hough2P.SmoothMap(), hough::MultiHough2P.SmoothMap(), ana.sort_chisq_tot(), dt::DiscreteTracker.SpliceChains(), stan::mcmc::chains< RNG >.split_potential_scale_reduction(), ana.SqrtError(), art::HLTGlobalStatus.state_on_demand(), stan::math.std_normal_lpdf(), stan::math.student_t_cdf(), stan::math.student_t_lccdf(), stan::math.student_t_lcdf(), stan::math.student_t_lpdf(), stan::math.student_t_rng(), genie::GHepRecord.SwapParticles(), evdb::ParameterSetEditDialog.TabName(), stan::math.tail(), stan::math.tcrossprod(), TEST(), ana.test_best_spline(), TEST_F(), test_flux(), test_nueloaders(), evdb::ParameterSetEditRow.TextEntryReturnPressed(), three_index_recover(), calib::ThresholdCorrMap.ThresholdCorrMap(), stan::math.to_matrix(), stan::math.to_var(), dt::ViewMerger.TotalChargePerView(), caldp::LiteProfile.TotalHits(), simb::MCTrajectory.TotalLength(), rb::Track.TotalLength(), numue::NumuEAna.TotalLengthInDetector(), cheat::RecoCheckAna.TotalLengthInDetector(), trk::KalmanTrackAna.TotalLengthInDetector(), dt::Chain.ToTrack(), lem::EventSummary.ToTree(), lem::dec::Forest.Train(), train_dectree_caf(), HepGeom::Plane3D< T >.transform(), test::mock_throwing_model_in_write_array.transform_inits(), mock_model.transform_inits(), mock_throwing_model.transform_inits(), test::mock_throwing_model.transform_inits(), test::mock_error_model.transform_inits(), filter::TruthFilter.TruthFilter(), two_index_recover(), test::mock_throwing_model_in_write_array.unconstrained_param_names(), mock_model.unconstrained_param_names(), mock_throwing_model.unconstrained_param_names(), test::mock_throwing_model.unconstrained_param_names(), test::mock_error_model.unconstrained_param_names(), stan::math.uniform_cdf(), stan::math.uniform_lccdf(), stan::math.uniform_lcdf(), stan::math.uniform_lpdf(), stan::math.uniform_rng(), evdb::Colors.UnpackColorScale(), stan::mcmc::impl_leapfrog< stan::mcmc::unit_e_metric< command_model_namespace::command_model, rng_t > >.update_q(), vdt::DTEnergy.UpdateD(), UpdateStats(), vdt::DTEnergy.UpdateW(), uptime(), VarContainer.VarContainer(), VarContainer2D.VarContainer2D(), VarContainer3D.VarContainer3D(), dt::View.View(), stan::math.von_mises_lpdf(), stan::math.von_mises_rng(), stan::math.weibull_cdf(), stan::math.weibull_lccdf(), stan::math.weibull_lcdf(), stan::math.weibull_lpdf(), stan::math.weibull_rng(), slicer::MMSlicer.WindowSlice(), slicer::Slicer.WindowSlice(), ana::Hist.Write(), calib::AttenCurve.WriteToCSVs(), wrong_sign_uncertainty(), ana.ZeroError(), zheevq3(), zhetrd3(), genie::flux::GDk2NuFluxXMLHelper.~GDk2NuFluxXMLHelper(), HEPREP::HepRepReader.~HepRepReader(), and om::HistoSourceBase.~HistoSourceBase().

getGoodRuns4SAM.nextrun = run_rows[ (idx+1)][0]

Definition at line 256 of file getGoodRuns4SAM.py.

Referenced by CondenseRunList().

int getGoodRuns4SAM.nwrote = 0

Definition at line 80 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.opts

Definition at line 24 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.prev_diblock_mask = -1

Definition at line 85 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.prev_isGood = True

Definition at line 86 of file getGoodRuns4SAM.py.

int getGoodRuns4SAM.run = int(epoch(tv))/100

Definition at line 89 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.run_range = psycopg2.extras.NumericRange(thisrun, nextrun, '[)')

Definition at line 261 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.run_rows = processFarDetData(data, det, tag)

Definition at line 238 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.sampwd = None

Definition at line 52 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.sampwdFile = None

Definition at line 53 of file getGoodRuns4SAM.py.

getGoodRuns4SAM.sep

Definition at line 112 of file getGoodRuns4SAM.py.

int getGoodRuns4SAM.subrun = int(epoch(tv))%100

Definition at line 90 of file getGoodRuns4SAM.py.

Referenced by comi::NearlineAna.analyze(), om::OnMonProd.analyze(), AnaPlotMaker(), BuildMetricsTree(), BuildMetricsTree_OnMon(), BuildOldTree(), caf::Proxy< caf::SRHeader >.CheckEquals(), caf::Proxy< caf::SRNeutrino >.CheckEquals(), caf::Proxy< caf::SRSpill >.CheckEquals(), CheckSubrun(), CheckTrueDate(), CleanupPrelim(), CleanupTree(), CondenseDetCfg(), CondenseRunList(), DCMOffsetCalculator(), DDTOnMonPlotMaker(), comi::ChanOcc.endSubRun(), FileNameToRunSubrun(), FillTree(), GetManualSubruns(), GetPartList(), GetPartList_4DB(), GetProcessed(), GetRunInfo(), nova::dbi::RunHistory.GoodDiBlockMask(), GoodRuns(), chaninfo::BadChanList.LoadNewData(), make_cosmic_eff_table(), MakeDetCfgCSV(), MakeDQValidityCSV(), MakeDQValidityCSVND(), MakeRunList(), Nearline_Watchdog_Plots(), NewNearlinePlots(), om::OnMonProd.NewRunNumber(), om::OnMonProd.NewSubrunNumber(), nova::dbi::RunHistory.NFEBs(), OnMonAnaHistosFEB_IssueRates(), OnMonAnaHistosPIX(), OnMonPlotMaker(), cmf::EventId.operator<(), fnex::EventId.operator<(), caf::Proxy< caf::SRHeader >.operator=(), caf::Proxy< caf::SRNeutrino >.operator=(), caf::Proxy< caf::SRSpill >.operator=(), plot_cosmic_eff(), PlotDB_Web(), PlotOnMon(), plotTime(), om::IPC.PostResources(), caf::CAFMaker.produce(), fnex::ReadCAFMakeEventList.ReadCAFTree(), util::TimeFilter.ReadEventFile(), util::EventFilterNoSlice.reconfigure(), util::RunEventFilter.reconfigure(), SamFileNameToRunSubrun(), nova::dbi::RunHistory.SetGoodDiBlockMask(), SetupOutTree(), om::FEBRateAnalysis.StoreContent(), novaddt::RunInfoStatic.Subrun(), TB_Nearline_Watchdog_Plots(), om::Ticker.Update(), and State.Write().

getGoodRuns4SAM.t0 = text2datetime("0")
getGoodRuns4SAM.t1 = text2datetime("100000000")

Definition at line 20 of file getGoodRuns4SAM.py.

Referenced by art::detail::CanBeAggregated< std::array< T, N > >.aggregate(), singlekaon_xsec.Amatrix_NN(), genie::AlamSimoAtharVacasSKPXSec2014.Amatrix_NN(), singlekaon_xsec.Amatrix_NP(), genie::AlamSimoAtharVacasSKPXSec2014.Amatrix_NP(), singlekaon_xsec.Amatrix_PP(), genie::AlamSimoAtharVacasSKPXSec2014.Amatrix_PP(), zcl::SMMTriggerAna.analyze(), beamlinereco::ToFPositionRecoAnalysis.analyze(), beamlinereco::LEHitFinder< T >.BackwardFindingOfHitStart(), beamlinereco::CFDHitFinder< T >.BackwardFindingOfHitStart(), novaddt::HoughPoint.calc(), distance(), ifdb::IFDBSpillInfo.extrapolate_position(), highe::HighEnergyFilt.filter(), novaddt::HighETrigger.filter(), novaddt::SlowMMTrigger.filter(), beamlinereco::CFDHitFinder< T >.FindHitWidth(), lem.get_http_response_internal(), novaddt::SupernovaTrigger.GetCandidates(), nutools::dbi::Table.GetConnection(), nova::dbi::Table.GetConnection(), nutools::dbi::Table.GetDataFromWebService(), nova::dbi::Table.GetDataFromWebService(), genie::HAIntranuke.Inelastic(), genie::HAIntranuke2018.Inelastic(), runh::BadDataFilter.LoadBadTimeRanges(), main(), evtsum::EventSummary.MakeOutput(), osc::OscCalc.P_internal_me(), osc::OscCalc.P_internal_mt(), osc::OscCalc.P_internal_te(), zcl::SPCluster.produce(), comi::Cana.produce(), nl::TimeSeriesData.RangeTime(), evd::GeometryDrawer.ShowCellAndPlaneNumbers(), mono::SlowMonopoleTrigger.SlowMonopoleTrigger(), osc.SolveCubic(), sn.SortTrackEndsByTime(), and tbrecoplots().

getGoodRuns4SAM.table = db.table(tname, columns)
getGoodRuns4SAM.tag = None

Definition at line 16 of file getGoodRuns4SAM.py.

Referenced by daq2raw::SpillWrapper.add(), genie::XclsTag.AsString(), art::Wrapper< T >.Class_Version(), compareEvents(), compareSelectedSets(), ConvertGeantToPdg(), om::HistoSet.CopyAndResetOne(), art::prevent_recursion< T >.create_empty_sampled_product(), DrawCovMx(), caf::CAFMaker.endJob(), calib::SumRunsCalib.endRun(), Expression.fetchAll(), Expression.fetchOne(), skim::SkimmerAna.FillNueHistograms(), skim::CosmicBeamComparison.FillNueHistograms(), skim::SkimmingUtils.FillSliceVector(), fnex::AnalysisSetupBase.FindXSecWeight(), art::DataViewImpl.getByToken(), ana::covmx::Sample.GetTag(), muonid.HighestPIDTrack(), remid.HighestPIDTrack(), HTag(), art::detail.input_tag(), art::EDProduct.insertIfSampledProduct(), joint_fit_2018_contours(), joint_fit_2018_slices(), joint_fit_2019_contours(), joint_fit_2019_slices(), ana::NumuSyst.LoadFrom(), ana::NCSyst.LoadFrom(), ana::ISignalEstimator.LoadFrom(), ana::ReactorExperiment.LoadFrom(), ana::SolarConstraints.LoadFrom(), ana::NueSyst.LoadFrom(), ana::PredictionSterile.LoadFrom(), ana::TrivialSignalEstimator.LoadFrom(), ana::Binning.LoadFrom(), ana::CovMxSurface.LoadFrom(), ana::PredictionCombinePeriods.LoadFrom(), ana::CrossSectionSpectra.LoadFrom(), ana::PredictionSystJoint2018.LoadFrom(), ana::PredictionSystJointDemo.LoadFrom(), ana::NDOscillatableSpectrum.LoadFrom(), ana::ReweightableSpectrum.LoadFrom(), ana::TrivialCrossSectionAnalysis.LoadFrom(), ana::PredictionInterp.LoadFrom(), ana::BayesianSurface.LoadFrom(), ana::FrequentistSurface.LoadFrom(), ana::SystShifts.LoadFrom(), ana::SystMakerShiftSigma.LoadFrom(), ana::covmx::CovarianceMatrix.LoadFrom(), ana::OscillatableSpectrum.LoadFrom(), ana::PredictionSystNue2017.LoadFrom(), ana::SystMakerShift.LoadFrom(), ana::PredictionSystNumu2017.LoadFrom(), ana::MCMCSamples.LoadFrom(), ana::SystMaker.LoadFrom(), ana::Spectrum.LoadFrom(), ana::SystematicsMaker.LoadFrom(), ana.LoadFrom< IBkgdEstimator >(), ana.LoadFrom< IDecomp >(), ana.LoadFrom< IExperiment >(), ana.LoadFrom< IExtrap >(), ana.LoadFrom< IPrediction >(), ana.LoadFrom< ModularExtrapComponent >(), ana.LoadFrom< osc::IOscCalc >(), ana.LoadFrom< osc::IOscCalcAdjustable >(), genie::Spline.LoadFromXmlFile(), make_pi0_xcheck(), MakeSurface(), art.operator!=(), art::InputTag.operator==(), evdb::ParameterSetEditRow.ParameterSetEditRow(), ana::NuePlotStyle.PIDTag(), PIDTag(), plot_pi0_xcheck(), PrettyTag(), art::InputTag.process(), lem::LEMWorkerOutput.produce(), calib::SumAttenuationProfiles.readResults(), calib::AttenuationFit.readResults(), ana::LoadFromRegistry< BaseClass >.Register(), run_joint_fit_2020_contours(), run_joint_fit_2020_slices(), art::Sampled< T >.Sampled(), ana::CovMxSurface.SaveTo(), sensitivity_plot(), calib::TimingCache.SetEpochTag(), calib::DriftCache.SetEpochTag(), calib::AbsCache.SetEpochTag(), calib::AttenCache.SetEpochTag(), nova::dbi::RunHistory.SetGainSettingTag(), calib::TimingCache.SetTag(), calib::AbsCache.SetTag(), calib::DriftCache.SetTag(), calib::AttenCache.SetTag(), daq2raw::SpillWrapper.SpillWrapper(), calib::SumAttenuationProfiles.SumAttenuationProfiles(), calib::SumRunsCalib.SumRunsCalib(), om::PlotViewer.UpdateCompare(), and fnex::NuEAnalysisSetup.~NuEAnalysisSetup().

getGoodRuns4SAM.test = False

Definition at line 165 of file getGoodRuns4SAM.py.

Referenced by lem::dec::Forest.TrainSingle().

getGoodRuns4SAM.thisrun = row[0]

Definition at line 254 of file getGoodRuns4SAM.py.

Referenced by CondenseDetCfg().

string getGoodRuns4SAM.tname = "fardet.dq_subrun_info"
string getGoodRuns4SAM.Usage
Initial value:
1 = """
2 python getGoodRuns4SAM.py [options]
3 options:
4  -U <user>
5  -w <password>
6  -T <tag> [REQUIRED]
7 """

Definition at line 7 of file getGoodRuns4SAM.py.

string getGoodRuns4SAM.username = "nova_reader"

Definition at line 22 of file getGoodRuns4SAM.py.