CMS 3D CMS Logo

LASModuleProfile Class Reference

#include <Alignment/LaserAlignment/src/LASModuleProfile.h>

List of all members.

Public Member Functions

void DumpToArray (double[512])
double GetValue (unsigned int theStripNumber) const
 LASModuleProfile (int *)
 LASModuleProfile (double *)
 LASModuleProfile ()
 container class for a LAS SiStrip module's 512 strip signals
LASModuleProfile operator+ (const double[512])
LASModuleProfile operator+ (const LASModuleProfile &)
LASModuleProfileoperator+= (const int[512])
LASModuleProfileoperator+= (const double[512])
LASModuleProfileoperator+= (const LASModuleProfile &)
LASModuleProfile operator- (const double[512])
LASModuleProfile operator- (const LASModuleProfile &)
LASModuleProfileoperator-= (const int[512])
LASModuleProfileoperator-= (const double[512])
LASModuleProfileoperator-= (const LASModuleProfile &)
LASModuleProfileoperator/= (const double)
LASModuleProfileoperator= (const LASModuleProfile &)
void SetAllValuesTo (const double &)
void SetData (int *)
void SetData (double *)
void SetValue (unsigned int theStripNumber, const double &theValue)

Private Member Functions

void Init (void)

Private Attributes

std::vector< double > data


Detailed Description

Definition at line 8 of file LASModuleProfile.h.


Constructor & Destructor Documentation

LASModuleProfile::LASModuleProfile (  ) 

container class for a LAS SiStrip module's 512 strip signals

def constructor

Definition at line 9 of file LASModuleProfile.cc.

References Init().

Referenced by operator+(), and operator-().

00009                                    {
00013 
00014   Init();
00015 
00016 }

LASModuleProfile::LASModuleProfile ( double *   ) 

LASModuleProfile::LASModuleProfile ( int  ) 


Member Function Documentation

void LASModuleProfile::DumpToArray ( double  array[512]  ) 

fill array

Definition at line 116 of file LASModuleProfile.cc.

References data, and i.

00116                                                       {
00120 
00121   for( unsigned int i = 0; i < 512; ++i ) {
00122     array[i] = data.at( i );
00123   }
00124 
00125 }

double LASModuleProfile::GetValue ( unsigned int  theStripNumber  )  const [inline]

Definition at line 20 of file LASModuleProfile.h.

References data.

Referenced by LaserAlignment::endJob(), LASPeakFinder::FindPeakIn(), LASProfileJudge::GetNegativity(), LASProfileJudge::IsNegativePeaksInProfile(), LASProfileJudge::IsPeaksInProfile(), operator+(), operator+=(), operator-(), operator-=(), and operator=().

00020 { return( data[theStripNumber] ); } // return an element

void LASModuleProfile::Init ( void   )  [private]

everything needed for initialization

Definition at line 131 of file LASModuleProfile.cc.

References data.

Referenced by LASModuleProfile().

00131                                   {
00135 
00136   data.resize( 512 );
00137 
00138 }

LASModuleProfile LASModuleProfile::operator+ ( const   double[512]  ) 

add a double[512]

Definition at line 202 of file LASModuleProfile.cc.

References GetValue(), i, and LASModuleProfile().

00202                                                                   {
00206 
00207   double theArray[512];
00208   for( unsigned int i = 0; i < 512; ++i ) {
00209     theArray[i] = this->GetValue( i ) + b[i];
00210   }
00211   
00212   return( LASModuleProfile( theArray ) );
00213 
00214 }

LASModuleProfile LASModuleProfile::operator+ ( const LASModuleProfile anotherProfile  ) 

Definition at line 166 of file LASModuleProfile.cc.

References GetValue(), i, and LASModuleProfile().

00166                                                                                      {
00170 
00171   double theArray[512];
00172   for( unsigned int i = 0; i < 512; ++i ) {
00173     theArray[i] = this->GetValue( i ) + anotherProfile.GetValue( i );
00174   }
00175   
00176   return( LASModuleProfile( theArray ) );
00177   
00178 }

LASModuleProfile & LASModuleProfile::operator+= ( const   int[512]  ) 

temporary workaround as long as data is provided in int arrays

Definition at line 305 of file LASModuleProfile.cc.

References data, and i.

00305                                                                  {
00310 
00311   for( unsigned int i = 0; i < 512; ++i ) {
00312     data.at( i ) += b[i];
00313   }
00314   
00315   return *this;
00316   
00317 }

LASModuleProfile & LASModuleProfile::operator+= ( const   double[512]  ) 

Definition at line 272 of file LASModuleProfile.cc.

References data, and i.

00272                                                                     {
00276 
00277   for( unsigned int i = 0; i < 512; ++i ) {
00278     data.at( i ) += b[i];
00279   }
00280   
00281   return *this;
00282   
00283 }

LASModuleProfile & LASModuleProfile::operator+= ( const LASModuleProfile anotherProfile  ) 

Definition at line 238 of file LASModuleProfile.cc.

References data, GetValue(), and i.

00238                                                                                        {
00242 
00243   for( unsigned int i = 0; i < 512; ++i ) {
00244     data.at( i ) += anotherProfile.GetValue( i );
00245   }
00246   
00247   return *this;
00248   
00249 }

LASModuleProfile LASModuleProfile::operator- ( const   double[512]  ) 

subtract a double[512]

Definition at line 220 of file LASModuleProfile.cc.

References GetValue(), i, and LASModuleProfile().

00220                                                                   {
00224 
00225   double theArray[512];
00226   for( unsigned int i = 0; i < 512; ++i ) {
00227     theArray[i] = this->GetValue( i ) - b[i];
00228   }
00229   
00230   return( LASModuleProfile( theArray ) );
00231 
00232 }

LASModuleProfile LASModuleProfile::operator- ( const LASModuleProfile anotherProfile  ) 

Definition at line 184 of file LASModuleProfile.cc.

References GetValue(), i, and LASModuleProfile().

00184                                                                                      {
00188 
00189   double theArray[512];
00190   for( unsigned int i = 0; i < 512; ++i ) {
00191     theArray[i] = this->GetValue( i ) - anotherProfile.GetValue( i );
00192   }
00193   
00194   return( LASModuleProfile( theArray ) );
00195 
00196 }

LASModuleProfile & LASModuleProfile::operator-= ( const   int[512]  ) 

temporary workaround as long as data is provided in int arrays

Definition at line 323 of file LASModuleProfile.cc.

References data, and i.

00323                                                                  {
00328 
00329   for( unsigned int i = 0; i < 512; ++i ) {
00330     data.at( i ) -= b[i];
00331   }
00332   
00333   return *this;
00334 
00335 }

LASModuleProfile & LASModuleProfile::operator-= ( const   double[512]  ) 

Definition at line 289 of file LASModuleProfile.cc.

References data, and i.

00289                                                                     {
00293 
00294   for( unsigned int i = 0; i < 512; ++i ) {
00295     data.at( i ) -= b[i];
00296   }
00297   
00298   return *this;
00299 
00300 }

LASModuleProfile & LASModuleProfile::operator-= ( const LASModuleProfile anotherProfile  ) 

Definition at line 255 of file LASModuleProfile.cc.

References data, GetValue(), and i.

00255                                                                                        {
00259 
00260   for( unsigned int i = 0; i < 512; ++i ) {
00261     data.at( i ) -= anotherProfile.GetValue( i );
00262   }
00263   
00264   return *this;
00265 
00266 }

LASModuleProfile & LASModuleProfile::operator/= ( const   double  ) 

handle with care!!

Definition at line 341 of file LASModuleProfile.cc.

References data, and i.

00341                                                                      {
00345   
00346   for( unsigned int i = 0; i < 512; ++i ) {
00347     data.at( i ) /= divisor;
00348   }
00349   
00350   return *this;
00351 
00352 }

LASModuleProfile & LASModuleProfile::operator= ( const LASModuleProfile anotherProfile  ) 

Definition at line 144 of file LASModuleProfile.cc.

References data, GetValue(), and i.

00144                                                                                       {
00148 
00149   // check for self-assignment
00150   if( this != &anotherProfile ) {
00151 
00152     for( unsigned int i = 0; i < 512; ++i ) {
00153       data.at( i ) = anotherProfile.GetValue( i );
00154     }
00155 
00156   }
00157   
00158   return *this;
00159   
00160 }

void LASModuleProfile::SetAllValuesTo ( const double &  theValue  ) 

Definition at line 103 of file LASModuleProfile.cc.

References data, and i.

Referenced by LaserAlignment::beginJob().

00103                                                               {
00107 
00108   for( unsigned int i = 0; i < data.size(); ++i ) data.at( i ) = theValue;
00109 
00110 }

void LASModuleProfile::SetData ( int  ) 

void LASModuleProfile::SetData ( double *   ) 

void LASModuleProfile::SetValue ( unsigned int  theStripNumber,
const double &  theValue 
) [inline]

Definition at line 21 of file LASModuleProfile.h.

References data.

Referenced by LaserAlignment::fillAdcCounts(), and LaserAlignment::fillPedestalProfiles().

00021 { data.at( theStripNumber ) = theValue; }


Member Data Documentation

std::vector<double> LASModuleProfile::data [private]

Definition at line 39 of file LASModuleProfile.h.

Referenced by DumpToArray(), GetValue(), Init(), operator+=(), operator-=(), operator/=(), operator=(), SetAllValuesTo(), and SetValue().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:27 2009 for CMSSW by  doxygen 1.5.4