Ignore:
Timestamp:
01/31/05 02:27:49 (19 years ago)
Author:
kil064
Message:

add class SDDataDesc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDContainer.cc

    r308 r326  
    409409  rfunit = restFreqUnit_;
    410410}
     411
     412
     413uInt SDDataDesc::addEntry (const String& source, uInt freqID, const MDirection& dir)
     414{
     415
     416// See if already exists
     417
     418  if (n_ > 0) {
     419    for (uInt i=0; i<n_; i++) {
     420      if (source==source_[i] && freqID==freqID_[i]) {
     421         return i;
     422      }
     423    }
     424  }
     425
     426// Not found - add it
     427
     428  n_ += 1;
     429  source_.resize(n_,True);
     430  freqID_.resize(n_,True);
     431  dir_.resize(n_,True,True);
     432//
     433  source_[n_-1] = source;
     434  freqID_[n_-1] = freqID;
     435  dir_[n_-1] = dir;
     436//
     437  return n_-1;
     438}
     439
     440
     441void SDDataDesc::summary() const
     442{
     443   cerr << "Source    FreqID" << endl;
     444   for (uInt i=0; i<n_; i++) {
     445      cerr << source_(i) << freqID_(i) << endl;
     446   }
     447}
     448
Note: See TracChangeset for help on using the changeset viewer.