CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
float getBinSize() const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
std::vector< float > theBinValues
float getTimeOffset() const
float peakTime() const
the time when the signal peaks