Skip to content

Commit

Permalink
Fix un-init member warnings in DataFormats/SiStripCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodozov committed Oct 5, 2017
1 parent 92082ad commit 1b7a1c7
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions DataFormats/SiStripCluster/interface/SiStripCluster.h
Expand Up @@ -15,28 +15,23 @@ class SiStripCluster {
static const uint16_t stripIndexMask = 0x7FFF; // The first strip index is in the low 15 bits of firstStrip_
static const uint16_t mergedValueMask = 0x8000; // The merged state is given by the high bit of firstStrip_


/** Construct from a range of digis that form a cluster and from
* a DetID. The range is assumed to be non-empty.
*/

SiStripCluster() : error_x( -99999.9 ) {}
SiStripCluster() {}

explicit SiStripCluster(const SiStripDigiRange& range);

template<typename Iter>
SiStripCluster(const uint16_t& firstStrip,
Iter begin, Iter end ):
amplitudes_(begin,end), firstStrip_(firstStrip),
// ggiurgiu@fnal.gov, 01/05/12
// Initialize the split cluster errors to un-physical values.
// The CPE will check these errors and if they are not un-physical,
// it will recognize the clusters as split and assign these (increased)
// errors to the corresponding rechit.
error_x(-99999.9){}
amplitudes_(begin,end), firstStrip_(firstStrip) {}

template<typename Iter>
SiStripCluster(const uint16_t& firstStrip, Iter begin, Iter end, bool merged):
amplitudes_(begin,end), firstStrip_(firstStrip), error_x(-99999.9) {
amplitudes_(begin,end), firstStrip_(firstStrip) {
if (merged) firstStrip_ |= mergedValueMask; // if this is a candidate merged cluster
}

Expand Down Expand Up @@ -82,7 +77,7 @@ class SiStripCluster {

std::vector<uint8_t> amplitudes_;

uint16_t firstStrip_;
uint16_t firstStrip_ = 0;

// ggiurgiu@fnal.gov, 01/05/12
// Add cluster errors to be used by rechits from split clusters.
Expand All @@ -92,7 +87,13 @@ class SiStripCluster {
// appropriate errors for split clusters.
// To avoid increase of data size on disk,these new data members are set as transient in:
// DataFormats/SiStripCluster/src/classes_def.xml
float error_x;
float error_x = -99999.9;

// ggiurgiu@fnal.gov, 01/05/12
// Initialize the split cluster errors to un-physical values.
// The CPE will check these errors and if they are not un-physical,
// it will recognize the clusters as split and assign these (increased)
// errors to the corresponding rechit.

};

Expand Down

0 comments on commit 1b7a1c7

Please sign in to comment.