1 #ifndef St_starMagAvgC_h
2 #define St_starMagAvgC_h
5 #include "tables/St_starMagAvg_Table.h"
10 starMagAvg_st *Struct(Int_t i = 0)
const {
return ((St_starMagAvg*) Table())->GetTable()+i;}
11 UInt_t getNumRows()
const {
return GetNRows();}
12 UInt_t runNumber(Int_t i = 0)
const {
return Struct(i)->runNumber;}
13 UInt_t startRunTime(Int_t i = 0)
const {
return Struct(i)->startRunTime;}
14 UInt_t endRunTime(Int_t i = 0)
const {
return Struct(i)->endRunTime;}
15 UInt_t noEntries(Int_t i = 0)
const {
return Struct(i)->noEntries;}
16 Double_t current(Int_t i = 0)
const {
return Struct(i)->current;}
17 Double_t rms(Int_t i = 0)
const {
return Struct(i)->rms;}
18 Double_t ScaleFactor(Int_t i = 0){
return current()/(4500/(9.98071899596718826e-01));}
19 StMagnetPolarity getMagneticField() {
20 StMagnetPolarity value = eUnknownMField;
21 if (! instance())
return value;
22 Double_t scaleFactor = ScaleFactor();
23 if (scaleFactor > 0.75) value = eFullMFieldPolA;
24 else if (scaleFactor > 0.10) value = eHalfMFieldPolA;
25 else if (scaleFactor > -0.10) value = eZeroMField;
26 else if (scaleFactor > -0.75) value = eHalfMFieldPolB;
27 else if (scaleFactor > -1.25) value = eFullMFieldPolB;
35 ClassDefChair(St_starMagAvg, starMagAvg_st )