CMS 3D CMS Logo

CSCAnalogSignal.cc
Go to the documentation of this file.
2 #include <algorithm>
3 #include <iostream>
4 
5 // =================================
6 float CSCAnalogSignal::peakTime() const {
7  size_t imax = std::max_element(theBinValues.begin(), theBinValues.end()) - theBinValues.begin();
8  return imax / invBinSize + theTimeOffset;
9 }
10 
11 std::ostream &operator<<(std::ostream &stream, const CSCAnalogSignal &signal) {
12  stream << "CSCAnalogSignal: Element " << signal.theElement << " Total " << signal.theTotal << std::endl;
13  for (int i = 0; i < int(signal.theBinValues.size()); ++i) {
14  //@@ ptc 26-Feb-02 Don't both with very small amplitudes
15 
16  if (signal.theBinValues[i] > 1.E-10) {
17  stream << i * signal.getBinSize() + signal.getTimeOffset() << "\t" << signal.theBinValues[i] << std::endl;
18  }
19  }
20  return stream;
21 }
CSCAnalogSignal::invBinSize
float invBinSize
Definition: CSCAnalogSignal.h:115
CSCAnalogSignal::theTotal
float theTotal
Definition: CSCAnalogSignal.h:117
mps_fire.i
i
Definition: mps_fire.py:355
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
operator<<
std::ostream & operator<<(std::ostream &stream, const CSCAnalogSignal &signal)
Definition: CSCAnalogSignal.cc:11
CSCAnalogSignal.h
CSCAnalogSignal::theBinValues
std::vector< float > theBinValues
Definition: CSCAnalogSignal.h:116
CSCAnalogSignal::theTimeOffset
float theTimeOffset
Definition: CSCAnalogSignal.h:118
CSCAnalogSignal::peakTime
float peakTime() const
the time when the signal peaks
Definition: CSCAnalogSignal.cc:6
CSCAnalogSignal::theElement
int theElement
Definition: CSCAnalogSignal.h:114
CSCAnalogSignal::getTimeOffset
float getTimeOffset() const
Definition: CSCAnalogSignal.h:72
createfilelist.int
int
Definition: createfilelist.py:10
CSCAnalogSignal
Definition: CSCAnalogSignal.h:32
CSCAnalogSignal::getBinSize
float getBinSize() const
Definition: CSCAnalogSignal.h:70