Difference between revisions of "G2p mysql lib"

From Hall A Wiki
Jump to: navigation, search
(Function Calls)
(Function Calls)
 
(10 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
The list of function calls is below (and what they do). Separation between the two HRS is done by run number, so there is just one library for both HRS. Put in the run number and it will find what you need.
 
The list of function calls is below (and what they do). Separation between the two HRS is done by run number, so there is just one library for both HRS. Put in the run number and it will find what you need.
 +
 +
NOTE: If the function returns -999 that means that the entry was null. You might want to set a flag to catch these things. Feel free to let me know which runs this happens with and I'll try and update the relevant columns.
 
===Function Calls ===
 
===Function Calls ===
 
<b> Run Quality </b>
 
<b> Run Quality </b>
Line 70: Line 72:
 
<b> Cerenkov Cut </b>
 
<b> Cerenkov Cut </b>
 
  Double_t get_my_cercut(Int_t run_number )
 
  Double_t get_my_cercut(Int_t run_number )
 +
 +
<b> Cerenkov Efficiency </b>
 +
Double_t get_my_cer_eff(Int_t run_number)
  
 
<b> Pion Rejector/Shower First Layer Cut </b>
 
<b> Pion Rejector/Shower First Layer Cut </b>
Line 76: Line 81:
 
<b> Pion Rejectors/Shower Sum Cut </b>
 
<b> Pion Rejectors/Shower Sum Cut </b>
 
  Double_t get_my_sumcut(Int_t run_number)
 
  Double_t get_my_sumcut(Int_t run_number)
 +
 +
<b> Pion Rejectors/Shower Efficiency</b>
 +
Double_t get_my_pr_eff(Int_t run_number)
  
 
<b> Beam Polarization </b>
 
<b> Beam Polarization </b>
Line 104: Line 112:
 
  Double_t get_my_targetpol(Int_t run_number)
 
  Double_t get_my_targetpol(Int_t run_number)
  
<b> Target Polarization Uncertainty</b>
+
<b> Target Polarization Total Uncertainty (rel. %)</b>
 
  Double_t get_my_targetpole(Int_t run_number)
 
  Double_t get_my_targetpole(Int_t run_number)
 +
 +
<b> Target Polarization Sys Uncertainty (abs)</b>
 +
Double_t get_my_targetpolsys(Int_t run_number)
 +
 +
<b> Target Polarization Stat Uncertainty(abs)</b>
 +
Double_t get_my_targetpolstat(Int_t run_number)
  
 
<b> Deadtime Positive Helicity</b>
 
<b> Deadtime Positive Helicity</b>
Line 117: Line 131:
  
 
<b> Target Field Strength</b>
 
<b> Target Field Strength</b>
  Double_t get_my_target_fieldInt_t run_number)
+
  Double_t get_my_target_field(Int_t run_number)
  
 
<b> Target Orientation</b>
 
<b> Target Orientation</b>
 
   Int_t get_my_target_orientation(Int_t run_number)
 
   Int_t get_my_target_orientation(Int_t run_number)
 +
 +
<b> Target Material ID</b>
 +
  Int_t get_my_materialID(Int_t run_number)
 +
 +
<b> Charge Asymmetry</b>
 +
Double_t get_my_charge_asym(Int_t run_number)
 +
 +
<b> Charge Plus (micro-C)</b>
 +
Double_t get_my_qplus(Int_t run_number)
 +
 +
<b> Charge Minus(micro-C)</b>
 +
Double_t get_my_qminus(Int_t run_number)
 +
 +
<b> Charge Total(micro-C)</b>
 +
Double_t get_my_qtotal(Int_t run_number)
 +
 +
<b> Ungated Charge Total(micro-C)</b>
 +
Double_t get_my_uqtotal(Int_t run_number)
 +
 +
<b> Current (Cut on beam trips below 2nA)</b>
 +
Double_t get_my_current(Int_t run_number)
 +
 +
<b>Theta Acc. Cut </b>
 +
Double_t get_my_thCutMin(Int_t run_number)
 +
Double_t get_my_thCutMax(Int_t run_number)
 +
 +
<b>Phi Acc. Cut </b>
 +
Double_t get_my_phCutMin(Int_t run_number)
 +
Double_t get_my_phCutMax(Int_t run_number)
 +
 +
<b> Beam X Cut (mm)</b>
 +
Double_t get_my_xBeamCut(Int_t run_number)
 +
 +
<b> Beam Y Cut (mm)</b>
 +
Double_t get_my_yBeamCut(Int_t run_number)
 +
 +
<b> Beam Slow Raster Cut (mm)</b>
 +
Double_t get_my_rBeamCut(Int_t run_number)
 +
 +
<b> Slow Raster ADC X Cut (mm)</b>
 +
Double_t get_my_xSRCut(Int_t run_number)
 +
 +
<b> Slow Raster ADC Y Cut (mm)</b>
 +
Double_t get_my_ySRCut(Int_t run_number)
 +
 +
<b> Slow Raster ADC Radius Cut (mm)</b>
 +
Double_t get_my_rSRCut(Int_t run_number)
 +
 +
<b> Target X</b>
 +
Double_t get_my_tgtx(Int_t run_number)
 +
 +
<b> Target X Err</b>
 +
Double_t get_my_tgtxErr(Int_t run_number)
 +
 +
<b> Target Y</b>
 +
Double_t get_my_tgty(Int_t run_number)
 +
 +
<b> Target Y Err</b>
 +
Double_t get_my_tgtyErr(Int_t run_number)
 +
 +
<b> Target Phi</b>
 +
Double_t get_my_tgtph(Int_t run_number)
 +
 +
<b> Target Phi Err</b>
 +
Double_t get_my_tgtphErr(Int_t run_number)
 +
 +
<b> Target Theta</b>
 +
Double_t get_my_tgtth(Int_t run_number)
 +
 +
<b> Target Theta Err</b>
 +
Double_t get_my_tgtthErr(Int_t run_number)
  
 
<b> Expert Comment </b>
 
<b> Expert Comment </b>
 
  TString get_my_expert_comment(Int_t run_number)
 
  TString get_my_expert_comment(Int_t run_number)
 +
 +
<b> Target Cup </b>
 +
TString get_my_target_cup(Int_t run_number)
  
 
<b> Run Start Time </b>
 
<b> Run Start Time </b>

Latest revision as of 21:09, 19 December 2017

The current header file is located in /w/halla-sfs62/g2p/ryan/mysql_root and is called g2p_mysql_lib.h. This is all of course subject to change as the code evolves and reaches a more final state. Load the header in an include statement to access all of it's goodness.

The list of function calls is below (and what they do). Separation between the two HRS is done by run number, so there is just one library for both HRS. Put in the run number and it will find what you need.

NOTE: If the function returns -999 that means that the entry was null. You might want to set a flag to catch these things. Feel free to let me know which runs this happens with and I'll try and update the relevant columns.

Function Calls

Run Quality

Int_t get_my_run_quality(Int_t run_number)

Run Status

Int_t get_my_run_status(Int_t run_number)

Septa Status

Int_t get_my_septa_status(Int_t run_number)

Half Wave Plate Status and Standard Deviation

Int_t get_my_hwp_status(Int_t run_number )
Double_t get_my_hwpSTD(Int_t run_number )

T1 Prescale

Int_t get_my_ps1(Int_t run_number )

T2 Prescale

Int_t get_my_ps2(Int_t run_number )

T3 Prescale

Int_t get_my_ps3(Int_t run_number )

T4 Prescale

Int_t get_my_ps4(Int_t run_number )

T7 Prescale

Int_t get_my_ps7(Int_t run_number )

T8 Prescale

Int_t get_my_ps8(Int_t run_number )

Target Encoder Position and STD

Double_t get_my_target_encoder(Int_t run_number )
Double_t get_my_target_std(Int_t run_number )

Q1 Momentum and STD

Double_t get_my_Q1p(Int_t run_number )
Double_t get_my_Q1pSTD(Int_t run_number )

Q2 Momentum and STD

Double_t get_my_Q2p(Int_t run_number )
Double_t get_my_Q2pSTD(Int_t run_number )

Dipole Momentum and STD

Double_t get_my_D1p(Int_t run_number )
Double_t get_my_D1pSTD(Int_t run_number )

Q3 Momentum and STD

Double_t get_my_Q3p(Int_t run_number )
Double_t get_my_Q3pSTD(Int_t run_number )

Septa Current and STD

Double_t get_my_septa_current(Int_t run_number )
Double_t get_my_septa_currentSTD(Int_t run_number )

Beam Energy and STD

Double_t get_my_beam_energy(Int_t run_number )
Double_t get_my_beam_energySTD(Int_t run_number )

Trigger Efficiency

Double_t get_my_trigger_efficiency(Int_t run_number )

Deadtime of Main Trigger

Double_t get_my_deadtime(Int_t run_number )

Cerenkov Cut

Double_t get_my_cercut(Int_t run_number )

Cerenkov Efficiency

Double_t get_my_cer_eff(Int_t run_number)

Pion Rejector/Shower First Layer Cut

Double_t get_my_pr1cut(Int_t run_number)

Pion Rejectors/Shower Sum Cut

Double_t get_my_sumcut(Int_t run_number)

Pion Rejectors/Shower Efficiency

Double_t get_my_pr_eff(Int_t run_number)

Beam Polarization

Double_t get_my_beampol(Int_t run_number )

Beam Polarization Systematic Error

Double_t get_my_beampolsys(Int_t run_number)

Beam Polarization Statistical Error

Double_t get_my_beampolstat(Int_t run_number)

Beam Bleedthrough

Double_t get_my_bleedthrough(Int_t run_number)

One Track Probability

Double_t get_my_onetrackeff(Int_t run_number)

All Good Track Probability

Double_t get_my_alltrackeff(Int_t run_number)

All Good Track Probability Low

Double_t get_my_alltrackeffl(Int_t run_number)

All Good Track Probability High

Double_t get_my_alltrackeffh(Int_t run_number)

Target Polarization

Double_t get_my_targetpol(Int_t run_number)

Target Polarization Total Uncertainty (rel. %)

Double_t get_my_targetpole(Int_t run_number)

Target Polarization Sys Uncertainty (abs)

Double_t get_my_targetpolsys(Int_t run_number)

Target Polarization Stat Uncertainty(abs)

Double_t get_my_targetpolstat(Int_t run_number)

Deadtime Positive Helicity

Double_t get_my_dtplus(Int_t run_number)

Deadtime Negative Helicity

Double_t get_my_dtminus(Int_t run_number)

Livetime Asymmetry in PPM

Double_t get_my_ltasym(Int_t run_number)

Target Field Strength

Double_t get_my_target_field(Int_t run_number)

Target Orientation

 Int_t get_my_target_orientation(Int_t run_number)

Target Material ID

 Int_t get_my_materialID(Int_t run_number)

Charge Asymmetry

Double_t get_my_charge_asym(Int_t run_number)

Charge Plus (micro-C)

Double_t get_my_qplus(Int_t run_number)

Charge Minus(micro-C)

Double_t get_my_qminus(Int_t run_number)

Charge Total(micro-C)

Double_t get_my_qtotal(Int_t run_number)

Ungated Charge Total(micro-C)

Double_t get_my_uqtotal(Int_t run_number)

Current (Cut on beam trips below 2nA)

Double_t get_my_current(Int_t run_number)

Theta Acc. Cut

Double_t get_my_thCutMin(Int_t run_number)
Double_t get_my_thCutMax(Int_t run_number)

Phi Acc. Cut

Double_t get_my_phCutMin(Int_t run_number)
Double_t get_my_phCutMax(Int_t run_number)

Beam X Cut (mm)

Double_t get_my_xBeamCut(Int_t run_number)

Beam Y Cut (mm)

Double_t get_my_yBeamCut(Int_t run_number)

Beam Slow Raster Cut (mm)

Double_t get_my_rBeamCut(Int_t run_number)

Slow Raster ADC X Cut (mm)

Double_t get_my_xSRCut(Int_t run_number)

Slow Raster ADC Y Cut (mm)

Double_t get_my_ySRCut(Int_t run_number)

Slow Raster ADC Radius Cut (mm)

Double_t get_my_rSRCut(Int_t run_number)

Target X

Double_t get_my_tgtx(Int_t run_number)

Target X Err

Double_t get_my_tgtxErr(Int_t run_number)

Target Y

Double_t get_my_tgty(Int_t run_number)

Target Y Err

Double_t get_my_tgtyErr(Int_t run_number)

Target Phi

Double_t get_my_tgtph(Int_t run_number)

Target Phi Err

Double_t get_my_tgtphErr(Int_t run_number)

Target Theta

Double_t get_my_tgtth(Int_t run_number)

Target Theta Err

Double_t get_my_tgtthErr(Int_t run_number)

Expert Comment

TString get_my_expert_comment(Int_t run_number)

Target Cup

TString get_my_target_cup(Int_t run_number)

Run Start Time

TDatime get_my_run_start_time(Int_t run_number )

Run Stop Time

TDatime get_my_run_stop_time(Int_t run_number )

Last time run information was edited in mysql

TDatime get_my_entry_time(Int_t run_number )