Ignore:
Timestamp:
02/09/05 13:00:12 (19 years ago)
Author:
kil064
Message:

add a secondary index argument to the SDDataDesc container

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SDContainer.cc

    r388 r396  
    485485// SDDataDesc
    486486
    487 uInt SDDataDesc::addEntry (const String& source, uInt freqID, const MDirection& dir)
     487uInt SDDataDesc::addEntry (const String& source, uInt ID,
     488                           const MDirection& dir, uInt secID)
    488489{
    489490
     
    492493  if (n_ > 0) {
    493494    for (uInt i=0; i<n_; i++) {
    494       if (source==source_[i] && freqID==freqID_[i]) {
     495      if (source==source_[i] && ID==ID_[i]) {
    495496         return i;
    496497      }
     
    502503  n_ += 1;
    503504  source_.resize(n_,True);
    504   freqID_.resize(n_,True);
    505   dir_.resize(n_,True,True);
     505  ID_.resize(n_,True);
     506  secID_.resize(n_,True);
     507  secDir_.resize(n_,True,True);
    506508//
    507509  source_[n_-1] = source;
    508   freqID_[n_-1] = freqID;
    509   dir_[n_-1] = dir;
     510  ID_[n_-1] = ID;
     511  secID_[n_-1] = secID;
     512  secDir_[n_-1] = dir;
    510513//
    511514  return n_-1;
    512515}
    513516
    514 
    515517void SDDataDesc::summary() const
    516518{
    517    cerr << "Source    FreqID" << endl;
    518    for (uInt i=0; i<n_; i++) {
    519       cerr << setw(11) << source_(i) << freqID_(i) << endl;
     519   if (n_>0) {
     520      cerr << "Source    ID" << endl;   
     521      for (uInt i=0; i<n_; i++) {
     522         cerr << setw(11) << source_(i) << ID_(i) << endl;
     523      }
    520524   }
    521525}
    522 
    523 
Note: See TracChangeset for help on using the changeset viewer.