CMS 3D CMS Logo

Functions
OpticalAlignInfo.cc File Reference
#include "CondFormats/OptAlignObjects/interface/OpticalAlignInfo.h"
#include <iostream>
#include <iomanip>

Go to the source code of this file.

Functions

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

Function Documentation

◆ operator<<() [1/2]

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

Definition at line 11 of file OpticalAlignInfo.cc.

11  {
12  os << "Name: " << r.name_ << std::endl;
13  os << "Parent Name: " << r.parentName_ << std::endl;
14  os << "Type: " << r.type_ << " ID: " << r.ID_ << std::endl;
15  int iw = os.width(); // save current width
16  int ip = os.precision(); // save current precision
17  int now = 12;
18  int nop = 5;
19  os << std::setw(now) << std::setprecision(nop) << "member";
20  os << std::setw(now) << std::setprecision(nop) << "dim_type";
21  os << std::setw(now) << std::setprecision(nop) << "value";
22  os << std::setw(now) << std::setprecision(nop) << "error";
23  os << std::setw(now) << std::setprecision(nop) << "quality" << std::endl;
24  os << std::setw(now) << std::setprecision(nop) << r.x_ << std::endl;
25  os << std::setw(now) << std::setprecision(nop) << r.y_ << std::endl;
26  os << std::setw(now) << std::setprecision(nop) << r.z_ << std::endl;
27  os << std::setw(now) << std::setprecision(nop) << r.angx_ << std::endl;
28  os << std::setw(now) << std::setprecision(nop) << r.angy_ << std::endl;
29  os << std::setw(now) << std::setprecision(nop) << r.angz_ << std::endl;
30  os << std::setw(now) << std::setprecision(nop) << "--- Extra Entries --- " << std::endl;
31  size_t max = r.extraEntries_.size();
32  size_t iE = 0;
33  while (iE < max) {
34  os << "[" << iE << "]" << r.extraEntries_[iE];
35  iE++;
36  }
37  os << std::setprecision(ip) << std::setw(iw);
38  return os;
39 }

References SiStripPI::max, submitPVValidationJobs::now, and alignCSCRings::r.

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  os,
const OpticalAlignParam r 
)

Definition at line 41 of file OpticalAlignInfo.cc.

41  {
42  int iw = std::cout.width(); // save current width
43  int ip = std::cout.precision(); // save current precision
44  int now = 12;
45  int nop = 5;
46  os << std::setw(now) << std::setprecision(nop) << r.name_;
47  os << std::setw(now) << std::setprecision(nop) << r.dim_type_;
48  os << std::setw(now) << std::setprecision(nop) << r.value_;
49  os << std::setw(now) << std::setprecision(nop) << r.error_;
50  os << std::setw(now) << std::setprecision(nop) << r.quality_ << std::endl;
51 
52  // Reset the values we changed
53  std::cout << std::setprecision(ip) << std::setw(iw);
54  return os;
55 }

References gather_cfg::cout, submitPVValidationJobs::now, and alignCSCRings::r.

submitPVValidationJobs.now
now
Definition: submitPVValidationJobs.py:639
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
alignCSCRings.r
r
Definition: alignCSCRings.py:93