11 #include "Riostream.h" 40 Error(
"TFoamVect",
"Constructor failed to allocate\n");
42 for (i=0; i<n; i++) *(
fCoords+i)=0.0;
44 if(gDebug) Info(
"TFoamVect",
"USER CONSTRUCTOR TFoamVect(const Int_t)\n ");
57 Error(
"TFoamVect",
"Constructor failed to allocate fCoords\n");
61 for(Int_t i=0; i<
fDim; i++)
71 if(gDebug) Info(
"TFoamVect",
" DESTRUCTOR TFoamVect~ \n");
87 if (&Vect ==
this)
return *
this;
89 Error(
"TFoamVect",
"operator= : invalid dimensions : %d and %d \n ",
fDim,Vect.
fDim);
97 if(gDebug) Info(
"TFoamVect",
"SUBSITUTE operator =\n ");
109 if ((n<0) || (n>=
fDim)) {
110 Error(
"TFoamVect",
"operator[], out of range \n");
120 for(Int_t i=0;i<
fDim;i++)
131 Error(
"TFoamVect",
"operator+, different dimensions= %d %d \n",
fDim,Shift.
fDim);
133 for(Int_t i=0;i<
fDim;i++)
144 Error(
"TFoamVect",
"operator+, different dimensions= %d %d \n",
fDim,Shift.
fDim);
146 for(Int_t i=0;i<
fDim;i++)
181 for(i=0; i<
fDim; i++)
192 for(Int_t i=0; i<
fDim; i++)
206 if(!option) Error(
"Print ",
"No option set \n");
208 Int_t pr = std::cout.precision(7);
210 for(i=0; i<
fDim-1; i++) std::cout << std::setw(12) << *(
fCoords+i) <<
",";
211 std::cout << std::setw(12) << *(
fCoords+fDim-1);
213 std::cout.precision(pr);
virtual ~TFoamVect()
Destructor.
Double_t & operator[](Int_t)
[] is for access to elements as in ordinary matrix like a[j]=bj Range protection is built in...
TFoamVect operator-(const TFoamVect &)
subtraction operator -; difference of 2 vectors; c=a-b, a=a-b, NEVER USE IT, VERY SLOW!!! ...
TFoamVect & operator=(const TFoamVect &)
substitution operator
TFoamVect & operator-=(const TFoamVect &)
unary subtraction operator -=
TFoamVect & operator+=(const TFoamVect &)
unary addition operator +=; adding vector c*=x,
TFoamVect & operator*=(const Double_t &)
unary multiplication operator *=
TFoamVect()
Default constructor for streamer.
* x
Deprecated and error prone model selection interface.
void Print(Option_t *option) const
Printout of all vector components on "std::cout".
TFoamVect operator+(const TFoamVect &)
addition operator +; sum of 2 vectors: c=a+b, a=a+b, NEVER USE IT, VERY SLOW!!!