ChannelNoiseRates Class Reference

#include <ChannelNoiseRates.h>

Inheritance diagram for ChannelNoiseRates:
DbiTableRow

List of all members.

Public Member Functions

 ChannelNoiseRates ()
 ChannelNoiseRates (Int_t pCrate, Int_t pChAdd, Float_t pNormRate)
virtual DbiTableRowCreateTableRow () const
void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *) const
void WriteRates ()
Int_t GetCrate () const
Int_t GetChAdd () const
Float_t GetNormRate () const

Private Member Functions

 ClassDef (ChannelNoiseRates, 1)

Private Attributes

Int_t fCrate
Int_t fChAdd
Float_t fNormRate

Detailed Description

Definition at line 8 of file ChannelNoiseRates.h.


Constructor & Destructor Documentation

ChannelNoiseRates::ChannelNoiseRates (  ) 

Definition at line 17 of file ChannelNoiseRates.cxx.

00018   : fCrate(0), fChAdd(0), fNormRate(0)
00019 {
00020   // Do nothing
00021 } 

ChannelNoiseRates::ChannelNoiseRates ( Int_t  pCrate,
Int_t  pChAdd,
Float_t  pNormRate 
)

Definition at line 23 of file ChannelNoiseRates.cxx.

00024   : fCrate(pCrate), fChAdd(pChAdd), fNormRate(pNormRate)
00025 {
00026   // Do nothing
00027 } 


Member Function Documentation

ChannelNoiseRates::ClassDef ( ChannelNoiseRates  ,
 
) [private]
DbiTableRow * ChannelNoiseRates::CreateTableRow (  )  const [virtual]

Implements DbiTableRow.

Definition at line 60 of file ChannelNoiseRates.cxx.

00061 {
00062   return new ChannelNoiseRates;
00063 }

void ChannelNoiseRates::Fill ( DbiResultSet rs,
const DbiValidityRec vrec 
) [virtual]

Implements DbiTableRow.

Definition at line 65 of file ChannelNoiseRates.cxx.

References fChAdd, fCrate, and fNormRate.

00065                                                                             {
00066   rs >> fCrate >> fChAdd >> fNormRate;
00067 }

Int_t ChannelNoiseRates::GetChAdd (  )  const [inline]

Definition at line 25 of file ChannelNoiseRates.h.

References fChAdd.

Referenced by PhotonDefaultModel::Reset().

00025 {return fChAdd; };

Int_t ChannelNoiseRates::GetCrate (  )  const [inline]

Definition at line 24 of file ChannelNoiseRates.h.

References fCrate.

Referenced by PhotonDefaultModel::Reset().

00024 {return fCrate; };

Float_t ChannelNoiseRates::GetNormRate (  )  const [inline]

Definition at line 26 of file ChannelNoiseRates.h.

References fNormRate.

Referenced by PhotonDefaultModel::Reset().

00026 {return fNormRate; };

void ChannelNoiseRates::Store ( DbiOutRowStream ors,
const DbiValidityRec  
) const [virtual]

Reimplemented from DbiTableRow.

Definition at line 71 of file ChannelNoiseRates.cxx.

References fChAdd, fCrate, and fNormRate.

00071                                                                                         {
00072   ors << fCrate << fChAdd << fNormRate;
00073 }

void ChannelNoiseRates::WriteRates (  ) 

Definition at line 29 of file ChannelNoiseRates.cxx.

References DbiWriter< T >::Close(), VldTimeStamp::GetEOT(), SimFlag::kData, Detector::kFar, and SimFlag::kMC.

00030 {
00031   // Write rates to the database from a file containing the rates
00032   VldRange vr(Detector::kFar, SimFlag::kMC || SimFlag::kData,
00033               VldTimeStamp(2006, 8, 15, 12, 0, 0),
00034               VldTimeStamp::GetEOT(),
00035               "Testing");
00036  
00037   VldTimeStamp now;
00038   DbiWriter<ChannelNoiseRates> writer(vr, -1, 0, now);
00039 
00040   fstream chanhitsfile;
00041 
00042   chanhitsfile.open("chanhits_norm");
00043   if ( !chanhitsfile ) {
00044     cout << "FastPhotonModel: No chanhits file!!!" << std::endl;
00045   }
00046 
00047   Int_t _chanadd;
00048   Float_t _chanrate;
00049   Int_t _crate;
00050   while (!chanhitsfile.eof()) {
00051     chanhitsfile >> _crate >> _chanadd >> _chanrate;
00052     ChannelNoiseRates row(_crate, _chanadd, _chanrate);
00053     writer << row;
00054   }
00055 
00056   writer.Close();
00057 
00058 }


Member Data Documentation

Int_t ChannelNoiseRates::fChAdd [private]

Definition at line 29 of file ChannelNoiseRates.h.

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

Int_t ChannelNoiseRates::fCrate [private]

Definition at line 26 of file ChannelNoiseRates.h.

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

Float_t ChannelNoiseRates::fNormRate [private]

Definition at line 30 of file ChannelNoiseRates.h.

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


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1