test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 Init().

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

116  {
120 
121  for( unsigned int i = 0; i < 512; ++i ) {
122  array[i] = data.at( i );
123  }
124 
125 }
int i
Definition: DBlmapReader.cc:9
tuple array
Definition: mps_check.py:181
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().

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(), i, and LASModuleProfile().

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 }
int i
Definition: DBlmapReader.cc:9
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(), 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 }
int i
Definition: DBlmapReader.cc:9
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 i.

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 }
int i
Definition: DBlmapReader.cc:9
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 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 }
int i
Definition: DBlmapReader.cc:9
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 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 }
int i
Definition: DBlmapReader.cc:9
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(), i, and LASModuleProfile().

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 }
int i
Definition: DBlmapReader.cc:9
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(), 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 }
int i
Definition: DBlmapReader.cc:9
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 i.

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 }
int i
Definition: DBlmapReader.cc:9
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 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 }
int i
Definition: DBlmapReader.cc:9
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 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 }
int i
Definition: DBlmapReader.cc:9
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 i.

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

Definition at line 144 of file LASModuleProfile.cc.

References data, GetValue(), and i.

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 }
int i
Definition: DBlmapReader.cc:9
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 i.

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

103  {
107 
108  for( unsigned int i = 0; i < data.size(); ++i ) data.at( i ) = theValue;
109 
110 }
int i
Definition: DBlmapReader.cc:9
std::vector< double > data
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().

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

Member Data Documentation

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