1 #ifndef St_TpcAvgPowerSupplyC_h
2 #define St_TpcAvgPowerSupplyC_h
5 #include "tables/St_TpcAvgPowerSupply_Table.h"
6 #include "St_TpcAvgCurrentC.h"
10 TpcAvgPowerSupply_st *Struct(Int_t i = 0)
const {
return ((St_TpcAvgPowerSupply*) Table())->GetTable()+i;}
11 UInt_t getNumRows()
const {
return GetNRows();}
12 Int_t run(Int_t i = 0)
const {
return Struct(i)->run;}
13 Int_t start_time(Int_t i = 0)
const {
return Struct(i)->start_time;}
14 Int_t stop_time(Int_t i = 0)
const {
return Struct(i)->stop_time;}
15 Float_t* Current(Int_t i = 0)
const {
return Struct(i)->Current;}
16 Float_t* Charge(Int_t i = 0)
const {
return Struct(i)->Charge;}
17 Float_t* Voltage(Int_t i = 0)
const {
return Struct(i)->Voltage;}
18 Float_t voltagePadrow(Int_t sec = 1, Int_t padrow = 1)
const;
19 Bool_t tripped(Int_t sec = 1, Int_t row = 1)
const {
return voltagePadrow(sec,row) < -100;}
20 static Int_t ChannelFromRow(Int_t sector, Int_t row) {
return St_TpcAvgCurrentC::ChannelFromRow(sector,row);}
21 static Int_t ChannelFromSocket(Int_t socket) {
return St_TpcAvgCurrentC::ChannelFromSocket(socket);}
22 Float_t AvCurrent(Int_t sector = 1, Int_t channel = 1) {
23 return (sector > 0 && sector <= 24 && channel > 0 && channel <= 8) ?
24 Struct()->Current[8*(sector-1)+channel-1] :
26 Float_t AvCurrSocket(Int_t sector = 1, Int_t socket = 1) {
return AvCurrent(sector,ChannelFromSocket(socket));}
27 Float_t AvCurrRow(Int_t sector = 1, Int_t row = 1) {
return AvCurrent(sector,ChannelFromRow(sector,row));}
28 Float_t AcCharge(Int_t sector = 1, Int_t channel = 1) {
29 return (sector > 0 && sector <= 24 && channel > 0 && channel <= 8) ?
30 Struct()->Charge[8*(sector-1)+channel-1] :
33 Float_t AcChargeSocket(Int_t sector = 1, Int_t socket = 1) {
return AcCharge(sector,ChannelFromSocket(socket));}
34 Float_t AcChargeRow(Int_t sector = 1, Int_t row = 1) {
return AcCharge(sector,ChannelFromRow(sector,row));}
35 Float_t AcChargeL(Int_t sector = 1, Int_t channel = 1);
36 Float_t AcChargeRowL(Int_t sector = 1, Int_t row = 1) {
return AcChargeL(sector,ChannelFromRow(sector,row));}
37 Bool_t livePadrow(Int_t sec = 1, Int_t padrow = 1)
const {
return voltagePadrow(sec,padrow) > 850;}
44 ClassDefChair(St_TpcAvgPowerSupply, TpcAvgPowerSupply_st )