CMS 3D CMS Logo

Classes | Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondFormats/OptAlignObjects/interface/OpticalAlignInfo.h File Reference

#include <string>
#include <vector>
#include <iostream>
#include "CondFormats/OptAlignObjects/interface/OAQuality.h"

Go to the source code of this file.

Classes

class  OpticalAlignInfo
class  OpticalAlignParam

Functions

std::ostream & operator<< (std::ostream &, const OpticalAlignInfo &)
std::ostream & operator<< (std::ostream &, const OpticalAlignParam &)

Function Documentation

std::ostream& operator<< ( std::ostream &  ,
const OpticalAlignInfo  
)

Definition at line 12 of file OpticalAlignInfo.cc.

References OpticalAlignInfo::angx_, OpticalAlignInfo::angy_, OpticalAlignInfo::angz_, OpticalAlignInfo::extraEntries_, OpticalAlignInfo::ID_, max(), OpticalAlignInfo::name_, cmsPerfSuiteHarvest::now, OpticalAlignInfo::parentName_, OpticalAlignInfo::type_, OpticalAlignInfo::x_, OpticalAlignInfo::y_, and OpticalAlignInfo::z_.

{
  os << "Name: " << r.name_ << std::endl;
  os << "Parent Name: " << r.parentName_ << std::endl; 
  os << "Type: " << r.type_ << "  ID: " << r.ID_ << std::endl;
  int iw = os.width(); // save current width
  int ip = os.precision(); // save current precision
  int now = 12;
  int nop = 5;
  os << std::setw( now ) << std::setprecision( nop ) << "member";
  os << std::setw( now ) << std::setprecision( nop ) << "dim_type";
  os << std::setw( now ) << std::setprecision( nop ) << "value";
  os << std::setw( now ) << std::setprecision( nop ) << "error";
  os << std::setw( now ) << std::setprecision( nop ) << "quality" << std::endl;
  os << std::setw( now ) << std::setprecision( nop ) << r.x_ << std::endl;
  os << std::setw( now ) << std::setprecision( nop ) << r.y_ << std::endl;
  os << std::setw( now ) << std::setprecision( nop ) << r.z_ << std::endl;
  os << std::setw( now ) << std::setprecision( nop ) << r.angx_ << std::endl;
  os << std::setw( now ) << std::setprecision( nop ) << r.angy_ << std::endl;
  os << std::setw( now ) << std::setprecision( nop ) << r.angz_ << std::endl;
  os <<  std::setw( now ) << std::setprecision( nop ) << "--- Extra Entries --- " << std::endl;
  size_t max = r.extraEntries_.size();
  size_t iE = 0;
  while ( iE < max ) {
    os << "[" << iE << "]" << r.extraEntries_[iE];
    iE++;
  }
  os << std::setprecision( ip ) << std::setw( iw );
  return os;
}
std::ostream& operator<< ( std::ostream &  ,
const OpticalAlignParam  
)

Definition at line 44 of file OpticalAlignInfo.cc.

References gather_cfg::cout, OpticalAlignParam::dim_type_, OpticalAlignParam::error_, OpticalAlignParam::name_, cmsPerfSuiteHarvest::now, OpticalAlignParam::quality_, and OpticalAlignParam::value_.

{
  int iw = std::cout.width(); // save current width
  int ip = std::cout.precision(); // save current precision
  int now = 12;
  int nop = 5;
  os << std::setw( now ) << std::setprecision( nop ) << r.name_;
  os << std::setw( now ) << std::setprecision( nop ) << r.dim_type_;
  os << std::setw( now ) << std::setprecision( nop ) << r.value_;
  os << std::setw( now ) << std::setprecision( nop ) << r.error_;
  os << std::setw( now ) << std::setprecision( nop ) << r.quality_ << std::endl;

  // Reset the values we changed
  std::cout << std::setprecision( ip ) << std::setw( iw );
  return os;
}