#include <PulserTimeDrift.h>
Inheritance diagram for PulserTimeDrift:

Public Member Functions | |
| PulserTimeDrift (Int_t aggregate=0, Int_t index=-1, Float_t entries=0, Float_t mean=0, Float_t rms=0) | |
| virtual | ~PulserTimeDrift () |
| virtual UInt_t | GetIndex (UInt_t) const |
| virtual UInt_t | GetIndex () const |
| virtual Int_t | GetAggregateNo () const |
| RawChannelId | GetRawChannelId () const |
| Float_t | GetEntries () const |
| Float_t | GetMean () const |
| Float_t | GetRms () const |
| void | Add (Float_t ent, Float_t mean, Float_t rms) |
| virtual Bool_t | CanL2Cache () const |
| virtual DbiTableRow * | CreateTableRow () const |
| virtual void | Fill (DbiResultSet &rs, const DbiValidityRec *vrec) |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const |
Static Public Member Functions | |
| Int_t | GetIndex (const RawChannelId &rcid) |
| RawChannelId | GetRawChannelId (Int_t index) |
Private Member Functions | |
| PulserTimeDrift (const PulserTimeDrift &from) | |
| ClassDef (PulserTimeDrift, 1) | |
Private Attributes | |
| Int_t | fAggregate |
| UInt_t | fChannelIndex |
| Float_t | fEntries |
| Float_t | fMean |
| Float_t | fRms |
|
||||||||||||||||||||||||
|
Definition at line 23 of file PulserTimeDrift.cxx. 00028 : 00029 fAggregate(aggregate), 00030 fChannelIndex(index), 00031 fEntries(entries), 00032 fMean(mean), 00033 fRms(rms) 00034 { 00035 LEA_CTOR; 00036 }
|
|
|
Definition at line 15 of file PulserTimeDrift.h. 00015 { LEA_DTOR; };
|
|
|
Definition at line 45 of file PulserTimeDrift.h. 00046 : DbiTableRow(from) { LEA_CTOR; *this = from; }
|
|
||||||||||||||||
|
Add entries, mean, rms to existing entries, mean, rms to get new entries, mean, rms. Definition at line 86 of file PulserTimeDrift.cxx. References fEntries, fMean, and fRms. 00087 {
00092
00093 // new entries, new mean:
00094 double newEntries = fEntries + ent;
00095 double newMean = (fMean*fEntries + ent*mean)/newEntries;
00096
00097 double oldx2 = (fRms*fRms + fMean*fMean)*fEntries;
00098 double addx2 = (rms*rms + mean*mean)*ent;
00099 double newx2 = oldx2 + addx2;
00100 double newRms = sqrt(fabs(newx2/newEntries - newMean*newMean));
00101
00102 fEntries = newEntries;
00103 fMean = newMean;
00104 fRms = newRms;
00105 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 31 of file PulserTimeDrift.h. 00031 { return kTRUE; }
|
|
||||||||||||
|
|
|
|
Implements DbiTableRow. Definition at line 32 of file PulserTimeDrift.h. 00032 { return new PulserTimeDrift; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 111 of file PulserTimeDrift.cxx. References DbiRowStream::CurColName(), fAggregate, fChannelIndex, fEntries, fMean, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName(). 00112 {
00113
00114 //
00115 //
00116 // Purpose: Fill object from Result Set
00117 //
00118 // Arguments:
00119 // rs in Result Set used to fill object
00120 // vrec in Associated validity record (or 0 if filling
00121 // DbiValidityRec)
00122
00123 if ( rs.TableName() == "PULSERTIMEDRIFT" ) {
00124 // Dumb method.
00125 rs >> fAggregate >> fChannelIndex >> fEntries >> fMean >> fRms;
00126 }
00127 else {
00128 // Smart method
00129 Int_t numCol = rs.NumCols();
00130 // The first column (SeqNo) has already been processed.
00131 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00132 string colName = rs.CurColName();
00133 if ( colName == "AGGREGATENO" ) rs >> fAggregate;
00134 else if( colName == "CHANNELINDEX" ) rs >> fChannelIndex;
00135 else if( colName == "ENTRIES" ) rs >> fEntries;
00136 else if( colName == "MEAN" ) rs >> fMean;
00137 else if( colName == "RMS" ) rs >> fRms;
00138 else {
00139 MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol
00140 << "(" << colName << ")"
00141 << "; not part of PulserTimeDrift"
00142 << endl;
00143 rs.IncrementCurCol();
00144 }
00145 }
00146 }
00147
00148 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 23 of file PulserTimeDrift.h. 00023 { return fAggregate; }
|
|
|
Definition at line 25 of file PulserTimeDrift.h. Referenced by PulserTimeCalScheme::CalibrateByPulser(), and PulserTimeCalScheme::GetPulserCalibration(). 00025 { return fEntries; };
|
|
|
Definition at line 21 of file PulserTimeDrift.h. Referenced by PulserTimingPoint::AddSummaryBlock(), PulserTimeCalScheme::CalibrateByPulser(), and PulserTimingPoint::PulserTimingPoint(). 00021 {return fChannelIndex;};
|
|
|
Reimplemented from DbiTableRow. Definition at line 20 of file PulserTimeDrift.h. 00020 {return fChannelIndex;};
|
|
|
Definition at line 41 of file PulserTimeDrift.cxx. References RawChannelId::GetCrate(), RawChannelId::GetDetector(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), RawChannelId::GetVmm(), and RawChannelId::IsNull(). 00042 {
00043 if(rcid.GetDetector()==Detector::kFar) {
00044 Int_t index = rcid.GetCrate()*108
00045 + rcid.GetVarcId()*36
00046 + rcid.GetVmm()*6
00047 + rcid.GetVaAdcSel()*3
00048 + rcid.GetVaChip();
00049 return index;
00050 } else if(rcid.IsNull()) {
00051 return -1;
00052 } else {
00053 // ND not supported.
00054 assert(0);
00055 }
00056 return -1;
00057 }
|
|
|
Definition at line 26 of file PulserTimeDrift.h. Referenced by PulserTimeCalScheme::CalibrateByPulser(). 00026 { return fMean; };
|
|
|
Definition at line 24 of file PulserTimeDrift.h. References fChannelIndex. 00024 {return GetRawChannelId(fChannelIndex);};
|
|
|
Definition at line 59 of file PulserTimeDrift.cxx. 00060 {
00061 Int_t temp = index;
00062 Int_t crate = index/108;
00063 temp -= crate*108;
00064 Int_t varc = temp/36;
00065 temp -= varc*36;
00066 Int_t vmm = temp/6;
00067 temp -= vmm*6;
00068 Int_t vaadc = temp/3;
00069 temp -= vaadc*3;
00070 Int_t vachip = temp;
00071
00072 return RawChannelId(Detector::kFar,
00073 ElecType::kVA,
00074 crate,
00075 varc,
00076 vmm,
00077 vaadc,
00078 vachip,
00079 0 // no particular channel on chip
00080 );
00081 }
|
|
|
Definition at line 27 of file PulserTimeDrift.h. Referenced by PulserTimeCalScheme::CalibrateByPulser(), and PulserTimeCalScheme::GetPulserCalibration(). 00027 { return fRms; };
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 151 of file PulserTimeDrift.cxx. References fAggregate, fChannelIndex, fEntries, and fMean. 00153 {
00154 //
00155 //
00156 // Purpose: Stream object to output row stream
00157 //
00158
00159 ors << fAggregate << fChannelIndex << fEntries << fMean << fRms;
00160 }
|
|
|
Definition at line 38 of file PulserTimeDrift.h. |
|
|
Definition at line 39 of file PulserTimeDrift.h. Referenced by Fill(), GetRawChannelId(), and Store(). |
|
|
Definition at line 40 of file PulserTimeDrift.h. |
|
|
Definition at line 41 of file PulserTimeDrift.h. |
|
|
Definition at line 42 of file PulserTimeDrift.h. Referenced by Add(). |
1.3.9.1