CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
LASModuleProfile Class Reference

#include <LASModuleProfile.h>

Public Member Functions

void DumpToArray (double[512])
 
double GetValue (unsigned int theStripNumber) const
 
 LASModuleProfile ()
 
 LASModuleProfile (double *)
 
 LASModuleProfile (int *)
 
LASModuleProfile operator+ (const LASModuleProfile &)
 
LASModuleProfile operator+ (const double[512])
 
LASModuleProfileoperator+= (const LASModuleProfile &)
 
LASModuleProfileoperator+= (const double[512])
 
LASModuleProfileoperator+= (const int[512])
 
LASModuleProfile operator- (const LASModuleProfile &)
 
LASModuleProfile operator- (const double[512])
 
LASModuleProfileoperator-= (const LASModuleProfile &)
 
LASModuleProfileoperator-= (const double[512])
 
LASModuleProfileoperator-= (const int[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 data, mps_fire::i, Init(), and SetData().

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

9  {
13 
14  Init();
15 
16 }
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 mps_fire::i.

Referenced by SetValue().

116  {
120 
121  for( unsigned int i = 0; i < 512; ++i ) {
122  array[i] = data.at( i );
123  }
124 
125 }
std::vector< double > data
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(), and SetValue().

131  {
135 
136  data.resize( 512 );
137 
138 }
std::vector< double > data
LASModuleProfile LASModuleProfile::operator+ ( const LASModuleProfile anotherProfile)

Definition at line 166 of file LASModuleProfile.cc.

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

Referenced by SetValue().

166  {
170 
171  double theArray[512];
172  for( unsigned int i = 0; i < 512; ++i ) {
173  theArray[i] = this->GetValue( i ) + anotherProfile.GetValue( i );
174  }
175 
176  return( LASModuleProfile( theArray ) );
177 
178 }
double GetValue(unsigned int theStripNumber) const
LASModuleProfile LASModuleProfile::operator+ ( const double  b[512])

add a double[512]

Definition at line 202 of file LASModuleProfile.cc.

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

202  {
206 
207  double theArray[512];
208  for( unsigned int i = 0; i < 512; ++i ) {
209  theArray[i] = this->GetValue( i ) + b[i];
210  }
211 
212  return( LASModuleProfile( theArray ) );
213 
214 }
double GetValue(unsigned int theStripNumber) const
double b
Definition: hdecay.h:120
LASModuleProfile & LASModuleProfile::operator+= ( const LASModuleProfile anotherProfile)

Definition at line 238 of file LASModuleProfile.cc.

References data, GetValue(), and mps_fire::i.

Referenced by SetValue().

238  {
242 
243  for( unsigned int i = 0; i < 512; ++i ) {
244  data.at( i ) += anotherProfile.GetValue( i );
245  }
246 
247  return *this;
248 
249 }
double GetValue(unsigned int theStripNumber) const
std::vector< double > data
LASModuleProfile & LASModuleProfile::operator+= ( const double  b[512])

Definition at line 272 of file LASModuleProfile.cc.

References data, and mps_fire::i.

272  {
276 
277  for( unsigned int i = 0; i < 512; ++i ) {
278  data.at( i ) += b[i];
279  }
280 
281  return *this;
282 
283 }
std::vector< double > data
double b
Definition: hdecay.h:120
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 mps_fire::i.

305  {
310 
311  for( unsigned int i = 0; i < 512; ++i ) {
312  data.at( i ) += b[i];
313  }
314 
315  return *this;
316 
317 }
std::vector< double > data
double b
Definition: hdecay.h:120
LASModuleProfile LASModuleProfile::operator- ( const LASModuleProfile anotherProfile)

Definition at line 184 of file LASModuleProfile.cc.

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

Referenced by SetValue().

184  {
188 
189  double theArray[512];
190  for( unsigned int i = 0; i < 512; ++i ) {
191  theArray[i] = this->GetValue( i ) - anotherProfile.GetValue( i );
192  }
193 
194  return( LASModuleProfile( theArray ) );
195 
196 }
double GetValue(unsigned int theStripNumber) const
LASModuleProfile LASModuleProfile::operator- ( const double  b[512])

subtract a double[512]

Definition at line 220 of file LASModuleProfile.cc.

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

220  {
224 
225  double theArray[512];
226  for( unsigned int i = 0; i < 512; ++i ) {
227  theArray[i] = this->GetValue( i ) - b[i];
228  }
229 
230  return( LASModuleProfile( theArray ) );
231 
232 }
double GetValue(unsigned int theStripNumber) const
double b
Definition: hdecay.h:120
LASModuleProfile & LASModuleProfile::operator-= ( const LASModuleProfile anotherProfile)

Definition at line 255 of file LASModuleProfile.cc.

References data, GetValue(), and mps_fire::i.

Referenced by SetValue().

255  {
259 
260  for( unsigned int i = 0; i < 512; ++i ) {
261  data.at( i ) -= anotherProfile.GetValue( i );
262  }
263 
264  return *this;
265 
266 }
double GetValue(unsigned int theStripNumber) const
std::vector< double > data
LASModuleProfile & LASModuleProfile::operator-= ( const double  b[512])

Definition at line 289 of file LASModuleProfile.cc.

References data, and mps_fire::i.

289  {
293 
294  for( unsigned int i = 0; i < 512; ++i ) {
295  data.at( i ) -= b[i];
296  }
297 
298  return *this;
299 
300 }
std::vector< double > data
double b
Definition: hdecay.h:120
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 mps_fire::i.

323  {
328 
329  for( unsigned int i = 0; i < 512; ++i ) {
330  data.at( i ) -= b[i];
331  }
332 
333  return *this;
334 
335 }
std::vector< double > data
double b
Definition: hdecay.h:120
LASModuleProfile & LASModuleProfile::operator/= ( const double  divisor)

handle with care!!

Definition at line 341 of file LASModuleProfile.cc.

References data, and mps_fire::i.

Referenced by SetValue().

341  {
345 
346  for( unsigned int i = 0; i < 512; ++i ) {
347  data.at( i ) /= divisor;
348  }
349 
350  return *this;
351 
352 }
std::vector< double > data
LASModuleProfile & LASModuleProfile::operator= ( const LASModuleProfile anotherProfile)

Definition at line 144 of file LASModuleProfile.cc.

References data, GetValue(), and mps_fire::i.

Referenced by SetValue().

144  {
148 
149  // check for self-assignment
150  if( this != &anotherProfile ) {
151 
152  for( unsigned int i = 0; i < 512; ++i ) {
153  data.at( i ) = anotherProfile.GetValue( i );
154  }
155 
156  }
157 
158  return *this;
159 
160 }
double GetValue(unsigned int theStripNumber) const
std::vector< double > data
void LASModuleProfile::SetAllValuesTo ( const double &  theValue)

Definition at line 103 of file LASModuleProfile.cc.

References data, and mps_fire::i.

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

103  {
107 
108  for( unsigned int i = 0; i < data.size(); ++i ) data.at( i ) = theValue;
109 
110 }
std::vector< double > data
void LASModuleProfile::SetData ( double *  )

Referenced by LASModuleProfile().

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

Definition at line 21 of file LASModuleProfile.h.

References data, DumpToArray(), Init(), operator+(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and SetAllValuesTo().

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

21 { data.at( theStripNumber ) = theValue; }
std::vector< double > data

Member Data Documentation

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