File indexing completed on 2025-08-06 08:18:39
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051 #ifndef USPIN_SPINDBCONTENT_H
0052 #define USPIN_SPINDBCONTENT_H
0053
0054
0055
0056
0057 class SpinDBContent
0058 {
0059 public:
0060 SpinDBContent() { Initialize(); }
0061 virtual ~SpinDBContent() { ; }
0062 void Initialize();
0063 static int GetNCrossing() { return (NCROSS); }
0064 static int GetErrorValue() { return (ERROR_VALUE); }
0065 int CheckBunchNumber(int bunch);
0066 void Print() const;
0067
0068 int GetRunNumber() { return (runnum); }
0069 int GetQALevel() { return (qa_level); }
0070 int GetFillNumber() { return (fillnum); }
0071 int GetBadRunFlag() { return (badrun); }
0072 int GetCrossingShift() { return (cross_shift); }
0073
0074 int GetPolarizationBlue(int bunch, float &value, float &error);
0075 int GetPolarizationBlue(int bunch, float &value, float &error, float &syserr);
0076 int GetPolarizationBlue(int bunch, double &value, double &error);
0077 int GetPolarizationBlue(int bunch, double &value, double &error, double &syserr);
0078 int GetPolarizationYellow(int bunch, float &value, float &error);
0079 int GetPolarizationYellow(int bunch, float &value, float &error, float &syserr);
0080 int GetPolarizationYellow(int bunch, double &value, double &error);
0081 int GetPolarizationYellow(int bunch, double &value, double &error, double &syserr);
0082 int GetSpinPatternBlue(int bunch);
0083 int GetSpinPatternYellow(int bunch);
0084 long long GetScalerMbdVertexCut(int bunch);
0085 long long GetScalerMbdNoCut(int bunch);
0086 long long GetScalerZdcNoCut(int bunch);
0087 long long GetScaler(int channel, int bunch);
0088 int GetBadBunchFlag(int bunch);
0089
0090 void GetAsymBlueForward(float &value, float &error);
0091 void GetAsymBlueBackward(float &value, float &error);
0092 void GetAsymYellowForward(float &value, float &error);
0093 void GetAsymYellowBackward(float &value, float &error);
0094 void GetPhaseBlueForward(float &value, float &error);
0095 void GetPhaseBlueBackward(float &value, float &error);
0096 void GetPhaseYellowForward(float &value, float &error);
0097 void GetPhaseYellowBackward(float &value, float &error);
0098
0099 float GetCrossAngle() { return cross_angle; }
0100 float GetCrossAngleStd() { return cross_angle_std; }
0101 float GetCrossAngleMin() { return cross_angle_min; }
0102 float GetCrossAngleMax() { return cross_angle_max; }
0103
0104 void SetRunNumber(int run)
0105 {
0106 runnum = run;
0107 return;
0108 }
0109 void SetQALevel(int qa)
0110 {
0111 qa_level = qa;
0112 return;
0113 }
0114 void SetFillNumber(int fill)
0115 {
0116 fillnum = fill;
0117 return;
0118 }
0119 void SetBadRunFlag(int flag)
0120 {
0121 badrun = flag;
0122 return;
0123 }
0124 void SetCrossingShift(int shift)
0125 {
0126 cross_shift = shift;
0127 return;
0128 }
0129 int SetPolarizationBlue(int bunch, float value, float error);
0130 int SetPolarizationYellow(int bunch, float value, float error);
0131 int SetPolarizationBlue(int bunch, float value, float error, float syserr);
0132 int SetPolarizationYellow(int bunch, float value, float error, float syserr);
0133 int SetSpinPatternBlue(int bunch, int value);
0134 int SetSpinPatternYellow(int bunch, int value);
0135 int SetScalerMbdVertexCut(int bunch, long long value);
0136 int SetScalerMbdNoCut(int bunch, long long value);
0137 int SetScalerZdcNoCut(int bunch, long long value);
0138 int SetScaler(int channel, int bunch, long long value);
0139 int SetBadBunchFlag(int bunch, int value);
0140
0141 void SetAsymBlueForward(float value, float error);
0142 void SetAsymBlueBackward(float value, float error);
0143 void SetAsymYellowForward(float value, float error);
0144 void SetAsymYellowBackward(float value, float error);
0145 void SetPhaseBlueForward(float value, float error);
0146 void SetPhaseBlueBackward(float value, float error);
0147 void SetPhaseYellowForward(float value, float error);
0148 void SetPhaseYellowBackward(float value, float error);
0149
0150 void SetCrossAngle(float value) { cross_angle = value; }
0151 void SetCrossAngleStd(float value) { cross_angle_std = value; }
0152 void SetCrossAngleMin(float value) { cross_angle_min = value; }
0153 void SetCrossAngleMax(float value) { cross_angle_max = value; }
0154
0155
0156
0157
0158
0159
0160 private:
0161 static const int NCROSS;
0162 static const int ERROR_VALUE;
0163
0164 int runnum;
0165 int qa_level;
0166 int fillnum;
0167 int badrun;
0168 int cross_shift;
0169 float bpol[120];
0170 float bpolerr[120];
0171 float bpolsys[120];
0172 float ypol[120];
0173 float ypolerr[120];
0174 float ypolsys[120];
0175 int bpat[120];
0176 int ypat[120];
0177 long long scaler_mbd_vtxcut[120];
0178 long long scaler_mbd_nocut[120];
0179 long long scaler_zdc_nocut[120];
0180 int bad_bunch[120];
0181 float cross_angle;
0182 float cross_angle_std;
0183 float cross_angle_min;
0184 float cross_angle_max;
0185 float asym_bf;
0186 float asym_bb;
0187 float asym_yf;
0188 float asym_yb;
0189 float asymerr_bf;
0190 float asymerr_bb;
0191 float asymerr_yf;
0192 float asymerr_yb;
0193 float phase_bf;
0194 float phase_bb;
0195 float phase_yf;
0196 float phase_yb;
0197 float phaseerr_bf;
0198 float phaseerr_bb;
0199 float phaseerr_yf;
0200 float phaseerr_yb;
0201 };
0202
0203 #endif