CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

LASModuleProfile Class Reference

#include <LASModuleProfile.h>

List of all members.

Public Member Functions

void DumpToArray (double[512])
double GetValue (unsigned int theStripNumber) const
 LASModuleProfile (double *)
 LASModuleProfile ()
 LASModuleProfile (int *)
LASModuleProfile operator+ (const LASModuleProfile &)
LASModuleProfile operator+ (const double[512])
LASModuleProfileoperator+= (const double[512])
LASModuleProfileoperator+= (const int[512])
LASModuleProfileoperator+= (const LASModuleProfile &)
LASModuleProfile operator- (const LASModuleProfile &)
LASModuleProfile operator- (const double[512])
LASModuleProfileoperator-= (const LASModuleProfile &)
LASModuleProfileoperator-= (const int[512])
LASModuleProfileoperator-= (const double[512])
LASModuleProfileoperator/= (const double)
LASModuleProfileoperator= (const LASModuleProfile &)
void SetAllValuesTo (const double &)
void SetData (double *)
void SetData (int *)
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-().

                                   {

  Init();

}
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.

                                                      {

  for( unsigned int i = 0; i < 512; ++i ) {
    array[i] = data.at( i );
  }

}
double LASModuleProfile::GetValue ( unsigned int  theStripNumber) const [inline]
void LASModuleProfile::Init ( void  ) [private]

everything needed for initialization

Definition at line 131 of file LASModuleProfile.cc.

References data.

Referenced by LASModuleProfile().

                                  {

  data.resize( 512 );

}
LASModuleProfile LASModuleProfile::operator+ ( const LASModuleProfile anotherProfile)

Definition at line 166 of file LASModuleProfile.cc.

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

                                                                                     {

  double theArray[512];
  for( unsigned int i = 0; i < 512; ++i ) {
    theArray[i] = this->GetValue( i ) + anotherProfile.GetValue( i );
  }
  
  return( LASModuleProfile( theArray ) );
  
}
LASModuleProfile LASModuleProfile::operator+ ( const double  b[512])

add a double[512]

Definition at line 202 of file LASModuleProfile.cc.

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

                                                                  {

  double theArray[512];
  for( unsigned int i = 0; i < 512; ++i ) {
    theArray[i] = this->GetValue( i ) + b[i];
  }
  
  return( LASModuleProfile( theArray ) );

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

temporary workaround as long as data is provided in int arrays

Definition at line 305 of file LASModuleProfile.cc.

References data, and i.

                                                                 {

  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) += b[i];
  }
  
  return *this;
  
}
LASModuleProfile & LASModuleProfile::operator+= ( const LASModuleProfile anotherProfile)

Definition at line 238 of file LASModuleProfile.cc.

References data, GetValue(), and i.

                                                                                       {

  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) += anotherProfile.GetValue( i );
  }
  
  return *this;
  
}
LASModuleProfile & LASModuleProfile::operator+= ( const double  b[512])

Definition at line 272 of file LASModuleProfile.cc.

References data, and i.

                                                                    {

  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) += b[i];
  }
  
  return *this;
  
}
LASModuleProfile LASModuleProfile::operator- ( const LASModuleProfile anotherProfile)

Definition at line 184 of file LASModuleProfile.cc.

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

                                                                                     {

  double theArray[512];
  for( unsigned int i = 0; i < 512; ++i ) {
    theArray[i] = this->GetValue( i ) - anotherProfile.GetValue( i );
  }
  
  return( LASModuleProfile( theArray ) );

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

subtract a double[512]

Definition at line 220 of file LASModuleProfile.cc.

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

                                                                  {

  double theArray[512];
  for( unsigned int i = 0; i < 512; ++i ) {
    theArray[i] = this->GetValue( i ) - b[i];
  }
  
  return( LASModuleProfile( theArray ) );

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

Definition at line 289 of file LASModuleProfile.cc.

References data, and i.

                                                                    {

  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) -= b[i];
  }
  
  return *this;

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

temporary workaround as long as data is provided in int arrays

Definition at line 323 of file LASModuleProfile.cc.

References data, and i.

                                                                 {

  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) -= b[i];
  }
  
  return *this;

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

Definition at line 255 of file LASModuleProfile.cc.

References data, GetValue(), and i.

                                                                                       {

  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) -= anotherProfile.GetValue( i );
  }
  
  return *this;

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

handle with care!!

Definition at line 341 of file LASModuleProfile.cc.

References data, and i.

                                                                     {
  
  for( unsigned int i = 0; i < 512; ++i ) {
    data.at( i ) /= divisor;
  }
  
  return *this;

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

Definition at line 144 of file LASModuleProfile.cc.

References data, GetValue(), and i.

                                                                                      {

  // check for self-assignment
  if( this != &anotherProfile ) {

    for( unsigned int i = 0; i < 512; ++i ) {
      data.at( i ) = anotherProfile.GetValue( i );
    }

  }
  
  return *this;
  
}
void LASModuleProfile::SetAllValuesTo ( const double &  theValue)

Definition at line 103 of file LASModuleProfile.cc.

References data, and i.

Referenced by LaserAlignment::beginJob(), and LaserAlignment::fillDataProfiles().

                                                              {

  for( unsigned int i = 0; i < data.size(); ++i ) data.at( i ) = theValue;

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

Definition at line 21 of file LASModuleProfile.h.

References data.

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

{ data.at( theStripNumber ) = theValue; }

Member Data Documentation

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