FairRoot/PandaRoot
Functions
RhoError.cxx File Reference
#include <stdio.h>
#include <assert.h>
#include "RhoError.h"
#include <iostream>

Go to the source code of this file.

Functions

std::ostreamoperator<< (std::ostream &out, const RhoError &mat)
 
std::istreamoperator>> (std::istream &in, RhoError &mat)
 
RhoError operator* (Double_t t, const RhoError &m1)
 
RhoError operator* (const RhoError &m1, Double_t t)
 
RhoError operator+ (const RhoError &m1, const RhoError &m2)
 
RhoError operator- (const RhoError &m1, const RhoError &m2)
 

Function Documentation

RhoError operator* ( Double_t  t,
const RhoError m1 
)

Definition at line 213 of file RhoError.cxx.

References t.

214 {
215  RhoError mret ( m1 );
216  //mret.ResizeTo ( m1 );
217  //mret = m1;
218  mret *= t;
219  return mret;
220 }
TTree * t
Definition: bump_analys.C:13
RhoError operator* ( const RhoError m1,
Double_t  t 
)

Definition at line 222 of file RhoError.cxx.

References t.

223 {
224  RhoError mret ( m1 );
225  //mret.ResizeTo ( m1 );
226  //mret = m1;
227  mret *= t;
228  return mret;
229 }
TTree * t
Definition: bump_analys.C:13
RhoError operator+ ( const RhoError m1,
const RhoError m2 
)

Definition at line 245 of file RhoError.cxx.

References m2().

246 {
247  RhoError mret ( m1 );
248  //mret.ResizeTo ( m1 );
249  //mret = m1;
250  mret += m2;
251  //std::cout<<" -- Adding two matrices: -- m1:"<<&m1<<" m2:"<<&m2<<std::endl;
252  return mret;
253 }
TString m2(TString pts, TString exts="e px py pz")
Definition: invexp.C:117
RhoError operator- ( const RhoError m1,
const RhoError m2 
)

Definition at line 255 of file RhoError.cxx.

References m2().

256 {
257  RhoError mret ( m1 );
258  //mret.ResizeTo ( m1 );
259  mret -= m2;
260  return mret;
261 }
TString m2(TString pts, TString exts="e px py pz")
Definition: invexp.C:117
std::ostream& operator<< ( std::ostream out,
const RhoError mat 
)

Definition at line 179 of file RhoError.cxx.

References out.

180 {
181  out << "Bbr Covariance Matrix:";
182  out << ( TMatrixD& ) mat;
183  return out;
184 }
TFile * out
Definition: reco_muo.C:20
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
std::istream& operator>> ( std::istream in,
RhoError mat 
)

Definition at line 186 of file RhoError.cxx.

References col, and row.

187 {
188  // Peek at the next non-space character:
189  char nextChar = ' ';
190  while ( isspace ( nextChar ) ) {
191  nextChar = in.get();
192  }
193  in.putback ( nextChar );
194 
195  if ( EOF != nextChar ) {
196  if ( !isdigit ( nextChar ) ) {
197  // Remove the "Bbr Covariance Matrix:" line:
198  const int DUMMY_SIZE = 1000;
199  char dummy[DUMMY_SIZE];
200  in.getline ( dummy, DUMMY_SIZE );
201  }
202  // Read in the matrix:
203  for ( int row = 1; row <= mat.GetNrows(); ++row ) {
204  for ( int col = 1; col <= mat.GetNcols(); ++col ) {
205  in >> mat ( row, col );
206  }
207  }
208  }
209  return in;
210 }
int row
Definition: anaLmdDigi.C:67
int col
Definition: anaLmdDigi.C:67