Next: IOData() Up: Creating a New Previous: The Data

print() and info()

These two member functions are not absolutely required for the FARFALLA package to function but should be provided for application programs to pass written information about the node to the user. The print() function provides full information about the node, while the info() function provides a one-line summary. Both functions take one argument, which is an output stream to which the information is directed. The print() function will be invoked automatically when you output a node to an output stream; i.e. the line cout << *erpPtr; is equivalent to erpPtr->print(cout);


  virtual inline void print(ostream& o)
  {
    o << "Erp Node v" << (short) version << endl << endl;
    o << "Box Num: " << boxnum << endl;
    o << "ADC0u:   " << adc0u  << endl;
    o << "ADC1u:   " << adc1u  << endl;
    o << "ADC0a:   " << adc0a  << endl;
    o << "ADC1a:   " << adc1a  << endl;
    o << "TDC0h:   " << tdc0h  << endl;
    o << "TDC1h:   " << tdc1h  << endl;
    o << "TDC0l:   " << tdc0l  << endl;
    o << "TDC1l:   " << tdc1l  << endl;
    o << "Energy:  " << energy << endl;
    o << "Time:    " << time   << endl;
    o << "Pos High:" << posh   << endl << endl;
  }

  virtual inline void info(ostream& o)
  {
    o << "Box " << boxnum << "; Energy " << energy << "; Time " << time <<
      "; Posh " << posh << endl;
  }


walter@
Wed Aug 10 11:53:26 PDT 1994