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

ChannelsToFilter Class Reference

#include <ChannelsToFilter.h>

Inheritance diagram for ChannelsToFilter:

DbiTableRow List of all members.

Public Member Functions

 ChannelsToFilter ()
 ChannelsToFilter (UInt_t encoded)
 ChannelsToFilter (const RawChannelId &rcid)
virtual ~ChannelsToFilter ()
virtual DbiTableRowCreateTableRow () const
UInt_t GetIndex (UInt_t) const
UInt_t GetEncoded () const
RawChannelId GetRawChannelId () const
bool IsSameChannel (const RawChannelId &rcid) const
bool IsSameChannel (const CandDigitHandle *dig) const
virtual void Print (Option_t *option="") const
std::ostream & Print (std::ostream &, Option_t *option="") const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Static Public Member Functions

std::string GetTableDesc ()

Private Member Functions

 ChannelsToFilter (const ChannelsToFilter &from)

Private Attributes

UInt_t fEncoded
RawChannelId fRcid

Constructor & Destructor Documentation

ChannelsToFilter::ChannelsToFilter  )  [inline]
 

Definition at line 19 of file ChannelsToFilter.h.

References fEncoded, and fRcid.

00019 : fEncoded(0), fRcid(0) { LEA_CTOR; }

ChannelsToFilter::ChannelsToFilter UInt_t  encoded  )  [inline]
 

Definition at line 20 of file ChannelsToFilter.h.

References fEncoded, and fRcid.

00021       : fEncoded(encoded), fRcid(encoded)
00022       { LEA_CTOR; }

ChannelsToFilter::ChannelsToFilter const RawChannelId rcid  )  [inline]
 

Definition at line 23 of file ChannelsToFilter.h.

References fEncoded, fRcid, and GetEncoded().

00024       : fEncoded(rcid.GetEncoded()) , fRcid(rcid)
00025       { LEA_CTOR; }

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

Definition at line 26 of file ChannelsToFilter.h.

00026 { LEA_DTOR; }

ChannelsToFilter::ChannelsToFilter const ChannelsToFilter from  )  [inline, private]
 

Definition at line 52 of file ChannelsToFilter.h.

00053           : DbiTableRow() { LEA_CTOR; *this = from; }


Member Function Documentation

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

Implements DbiTableRow.

Definition at line 30 of file ChannelsToFilter.h.

00030                                                  { 
00031           return new ChannelsToFilter; }

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

Implements DbiTableRow.

Definition at line 22 of file ChannelsToFilter.cxx.

References MSG.

00023                                                          {
00024 
00025      if ( rs.TableName() == "CHANNELSTOFILTER" ) {
00026      // dumb filling
00027           rs>> fEncoded;
00028           fRcid=RawChannelId(fEncoded);
00029      }
00030      else{
00031      // Smart method
00032       Int_t numCol = rs.NumCols();
00033       //  The first column (SeqNo) has already been processed.
00034       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00035          string colName = rs.CurColName();
00036          if (      colName == "ENCODED" ) {
00037             rs >> fEncoded;
00038             fRcid = RawChannelId(fEncoded);
00039          }
00040          else {
00041             MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00042                                    << "(" << colName << ")"
00043                                    << "; not part of ChannelsToFilter" 
00044                                    << endl;
00045          rs.IncrementCurCol();
00046          }
00047       }
00048 
00049      }
00050 }

UInt_t ChannelsToFilter::GetEncoded  )  const [inline]
 

Definition at line 34 of file ChannelsToFilter.h.

Referenced by ChannelsToFilter().

00034 {return fEncoded;}

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

Reimplemented from DbiTableRow.

Definition at line 33 of file ChannelsToFilter.h.

00033 { return fEncoded; }

RawChannelId ChannelsToFilter::GetRawChannelId  )  const [inline]
 

Definition at line 35 of file ChannelsToFilter.h.

Referenced by DumpFilterChannels().

00035 {return fRcid;}

std::string ChannelsToFilter::GetTableDesc  )  [static]
 

Definition at line 75 of file ChannelsToFilter.cxx.

00076 {
00077      return std::string("(SeqNo int, Encoded BIGINT UNSIGNED)");
00078 }

bool ChannelsToFilter::IsSameChannel const CandDigitHandle dig  )  const
 

Definition at line 84 of file ChannelsToFilter.cxx.

References CandDigitHandle::GetChannelId(), and IsSameChannel().

00084                                                                      {
00085    return IsSameChannel(dig->GetChannelId());
00086 }

bool ChannelsToFilter::IsSameChannel const RawChannelId rcid  )  const
 

Definition at line 80 of file ChannelsToFilter.cxx.

References fRcid, and RawChannelId::IsSameChannel().

Referenced by IsSameChannel(), and AlgFilterChannels::RunAlg().

00080                                                                    {
00081    if(rcid.IsSameChannel(fRcid)) return true;
00082    else return false;
00083 }

std::ostream & ChannelsToFilter::Print std::ostream &  ,
Option_t *  option = ""
const
 

Definition at line 58 of file ChannelsToFilter.cxx.

References fEncoded, and fRcid.

00059 {
00060 //   RawChannelId rcid(fEncoded);
00061    os<< "Channel: "<<fEncoded<<" = "<<fRcid<<"\n";
00062      return os;
00063 }

void ChannelsToFilter::Print Option_t *  option = ""  )  const [virtual]
 

Definition at line 70 of file ChannelsToFilter.cxx.

Referenced by operator<<().

00071 {
00072      Print(std::cout,op);
00073 }

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

Reimplemented from DbiTableRow.

Definition at line 52 of file ChannelsToFilter.cxx.

00053                                                                    {
00054 //     MSG("Dbi", Msg::kWarning)<<"Calling Store!"<<std::endl;
00055      ors<< fEncoded;
00056 }


Member Data Documentation

UInt_t ChannelsToFilter::fEncoded [private]
 

Definition at line 58 of file ChannelsToFilter.h.

Referenced by ChannelsToFilter(), and Print().

RawChannelId ChannelsToFilter::fRcid [private]
 

Definition at line 59 of file ChannelsToFilter.h.

Referenced by ChannelsToFilter(), IsSameChannel(), and Print().


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