Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PulserRawGainPin Class Reference

#include <PulserRawGainPin.h>

Inheritance diagram for PulserRawGainPin:

DbiTableRow List of all members.

Public Member Functions

 PulserRawGainPin ()
 PulserRawGainPin (Int_t aggNo, PlexPinDiodeId pinid, Float_t *mean, Float_t *error, Float_t *num_entries)
virtual ~PulserRawGainPin ()
void New (Int_t aggNo, Int_t points, PlexPinDiodeId pinid)
void AddPoint (Int_t point, const PulserSummary &ps)
Int_t GetAggregateNo () const
UInt_t GetIndex (UInt_t) const
PlexPinDiodeId GetPinDiodeId () const
Int_t GetNumPoints () const
const Float_t * GetMean () const
const Float_t * GetError () const
const Float_t * GetNumEntries () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Attributes

Int_t fAggregateNo
PlexPinDiodeId fPlexPinDiodeId
Int_t fNumPoints
Float_t fMean [40]
Float_t fError [40]
Float_t fNumEntries [40]

Constructor & Destructor Documentation

PulserRawGainPin::PulserRawGainPin  ) 
 

Definition at line 48 of file PulserRawGainPin.cxx.

00049 {
00050   fAggregateNo = -1;
00051   //  fPinId = -1;
00052   memset(fMean,0,40*sizeof(Float_t));
00053   memset(fError,0,40*sizeof(Float_t));
00054   memset(fNumEntries,0,40*sizeof(Float_t));
00055 }

PulserRawGainPin::PulserRawGainPin Int_t  aggNo,
PlexPinDiodeId  pinid,
Float_t *  mean,
Float_t *  error,
Float_t *  num_entries
 

Definition at line 57 of file PulserRawGainPin.cxx.

References fError, fMean, and fNumEntries.

00059                                                                          :
00060   fAggregateNo(aggNo) , fPlexPinDiodeId(pinid) 
00061 {
00062    for (int i=0;i<40;i++) {
00063     fMean[i] = mean[i];
00064     fError[i] = error[i];
00065     fNumEntries[i] = num_entries[i];
00066   }
00067 }

virtual PulserRawGainPin::~PulserRawGainPin  )  [inline, virtual]
 

Definition at line 42 of file PulserRawGainPin.h.

00042 {};


Member Function Documentation

void PulserRawGainPin::AddPoint Int_t  point,
const PulserSummary ps
 

Definition at line 79 of file PulserRawGainPin.cxx.

References fError, fMean, fNumEntries, fNumPoints, PulserSummary::GetEntries(), PulserSummary::GetError(), and PulserSummary::GetMean().

Referenced by PulserFromRawCollectorModule::Reco(), and PulserCollectorModule::Reco().

00080 {
00081   fMean[point-1] = ps.GetMean();
00082   fError[point-1] =ps.GetError();
00083   fNumEntries[point-1] = ps.GetEntries();
00084   fNumPoints = point;
00085 }

virtual DbiTableRow* PulserRawGainPin::CreateTableRow  )  const [inline, virtual]
 

Implements DbiTableRow.

Definition at line 55 of file PulserRawGainPin.h.

00055 { return new PulserRawGainPin;}

void PulserRawGainPin::Fill DbiResultSet rs,
const DbiValidityRec vrec
[virtual]
 

Implements DbiTableRow.

Definition at line 87 of file PulserRawGainPin.cxx.

References det, fAggregateNo, fError, fMean, fNumEntries, fPlexPinDiodeId, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), and ElecType::StringToEnum().

00089 {
00090    Detector::Detector_t det =
00091       (Detector::Detector_t) 
00092       ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00093    
00094    string elecName="Unknown";
00095    char   elecType = ElecType::kUnknown;
00096    char   rackEastWest='?', rackLevel='?';
00097    int    rackBay=0, muxboxInRack=0;
00098    int    diodeinbox=0, gain=0;
00099    rs >> fAggregateNo
00100       >> elecName
00101       >> rackEastWest
00102       >> rackLevel
00103       >> rackBay
00104       >> muxboxInRack
00105       >> diodeinbox
00106       >> gain
00107       >> fNumPoints;
00108    for (int i=0;i<40;i++) rs >> fMean[i];
00109    for (int i=0;i<40;i++) rs >> fError[i];
00110    for (int i=0;i<40;i++) rs >> fNumEntries[i];
00111 
00112    ElecType::Elec_t elec = ElecType::StringToEnum(elecName.c_str(),1);
00113    if (ElecType::kUnknown == elec)  elec = (ElecType::Elec_t) elecType;
00114 
00115    fPlexPinDiodeId = PlexPinDiodeId(det,elec,rackEastWest,rackLevel,
00116                                     rackBay,muxboxInRack,diodeinbox,gain);
00117 
00118 } 

Int_t PulserRawGainPin::GetAggregateNo  )  const [inline, virtual]
 

Reimplemented from DbiTableRow.

Definition at line 47 of file PulserRawGainPin.h.

00047 { return fAggregateNo; }

const Float_t* PulserRawGainPin::GetError  )  const [inline]
 

Definition at line 52 of file PulserRawGainPin.h.

Referenced by Plotter::BasicPlot(), MakeLin::DoCalc(), and Plotter::Plot().

00052 {return fError;}

UInt_t PulserRawGainPin::GetIndex UInt_t   )  const [inline, virtual]
 

Reimplemented from DbiTableRow.

Definition at line 48 of file PulserRawGainPin.h.

References fPlexPinDiodeId, and PlexPinDiodeId::GetEncoded().

00048 { return fPlexPinDiodeId.GetEncoded(); }

const Float_t* PulserRawGainPin::GetMean  )  const [inline]
 

Definition at line 51 of file PulserRawGainPin.h.

Referenced by Plotter::BasicPlot(), MakeLin::DoCalc(), and Plotter::Plot().

00051 {return fMean;}

const Float_t* PulserRawGainPin::GetNumEntries  )  const [inline]
 

Definition at line 53 of file PulserRawGainPin.h.

00053 {return fNumEntries;}

Int_t PulserRawGainPin::GetNumPoints  )  const [inline]
 

Definition at line 50 of file PulserRawGainPin.h.

Referenced by MakeLin::DoCalc(), and Plotter::Plot().

00050 {return fNumPoints;}

PlexPinDiodeId PulserRawGainPin::GetPinDiodeId  )  const [inline]
 

Definition at line 49 of file PulserRawGainPin.h.

00049 {return fPlexPinDiodeId;}

void PulserRawGainPin::New Int_t  aggNo,
Int_t  points,
PlexPinDiodeId  pinid
 

Definition at line 69 of file PulserRawGainPin.cxx.

References fAggregateNo, fError, fMean, fNumEntries, fNumPoints, and fPlexPinDiodeId.

Referenced by PulserFromRawCollectorModule::Reco(), and PulserCollectorModule::Reco().

00070 {
00071   fAggregateNo = aggNo;
00072   fPlexPinDiodeId = pinid;
00073   fNumPoints =points;
00074   memset(fMean,0,40*sizeof(Float_t));
00075   memset(fError,0,40*sizeof(Float_t));
00076   memset(fNumEntries,0,40*sizeof(Float_t));
00077 }

void PulserRawGainPin::Store DbiOutRowStream ors,
const DbiValidityRec vrec
const [virtual]
 

Reimplemented from DbiTableRow.

Definition at line 120 of file PulserRawGainPin.cxx.

References ElecType::AsString(), fAggregateNo, fError, fMean, fNumEntries, fPlexPinDiodeId, PlexMuxBoxId::GetEastWest(), PlexMuxBoxId::GetElecType(), PlexPinDiodeId::GetGain(), PlexPinDiodeId::GetInBox(), PlexMuxBoxId::GetInRack(), PlexMuxBoxId::GetRackBay(), and PlexMuxBoxId::GetRackLevel().

00122 {
00123    ElecType::Elec_t elec = fPlexPinDiodeId.GetElecType();
00124    //   int  numeric      = fPlexPinDiodeId.GetNumericMuxBox();
00125    char rackEastWest = fPlexPinDiodeId.GetEastWest();
00126    char rackLevel    = fPlexPinDiodeId.GetRackLevel();
00127    int  rackBay      = fPlexPinDiodeId.GetRackBay();
00128    int  muxInRack    = fPlexPinDiodeId.GetInRack();
00129    ors << fAggregateNo
00130        << ElecType::AsString(elec)
00131        << rackEastWest
00132        << rackLevel
00133        << rackBay
00134        << muxInRack
00135        << fPlexPinDiodeId.GetInBox()
00136        << fPlexPinDiodeId.GetGain()
00137        << fNumPoints;
00138    for (int i=0;i<40;i++) ors << fMean[i];
00139    for (int i=0;i<40;i++) ors << fError[i];
00140    for (int i=0;i<40;i++) ors << fNumEntries[i];
00141 }


Member Data Documentation

Int_t PulserRawGainPin::fAggregateNo [private]
 

Definition at line 64 of file PulserRawGainPin.h.

Referenced by Fill(), New(), and Store().

Float_t PulserRawGainPin::fError[40] [private]
 

Definition at line 68 of file PulserRawGainPin.h.

Referenced by AddPoint(), Fill(), New(), PulserRawGainPin(), and Store().

Float_t PulserRawGainPin::fMean[40] [private]
 

Definition at line 67 of file PulserRawGainPin.h.

Referenced by AddPoint(), Fill(), New(), PulserRawGainPin(), and Store().

Float_t PulserRawGainPin::fNumEntries[40] [private]
 

Definition at line 69 of file PulserRawGainPin.h.

Referenced by AddPoint(), Fill(), New(), PulserRawGainPin(), and Store().

Int_t PulserRawGainPin::fNumPoints [private]
 

Definition at line 66 of file PulserRawGainPin.h.

Referenced by AddPoint(), and New().

PlexPinDiodeId PulserRawGainPin::fPlexPinDiodeId [private]
 

Definition at line 65 of file PulserRawGainPin.h.

Referenced by Fill(), GetIndex(), New(), and Store().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:06 2010 for loon by  doxygen 1.3.9.1