CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Enumerations | Functions
cond::ecalpulsecovariance Namespace Reference

Typedefs

typedef boost::function< void(EcalPulseCovariances
const &pulseshapes, Quantity q,
std::vector< int > const
&which, std::vector< float >
&result)> 
PulseCovarianceExtractor
 

Enumerations

enum  How { singleChannel, bySuperModule, all }
 
enum  Quantity {
  sample_0 =1, sample_1 =2, sample_2 =3, sample_3 =4,
  sample_4 =5, sample_5 =6, sample_6 =7, sample_7 =8,
  sample_8 =9, sample_9 =10, sample_10 =11, sample_11 =12
}
 

Functions

float average (EcalPulseCovariances const &pulseshapes, Quantity q)
 
void extractAverage (EcalPulseCovariances const &pulseshapes, Quantity q, std::vector< int > const &, std::vector< float > &result)
 
void extractSingleChannel (EcalPulseCovariances const &pulseshapes, Quantity q, std::vector< int > const &which, std::vector< float > &result)
 
void extractSuperModules (EcalPulseCovariances const &pulseshapes, Quantity q, std::vector< int > const &which, std::vector< float > &result)
 

Typedef Documentation

typedef boost::function<void(EcalPulseCovariances const & pulseshapes, Quantity q, std::vector<int> const & which, std::vector<float> & result)> cond::ecalpulsecovariance::PulseCovarianceExtractor

Definition at line 72 of file EcalPulseCovariancesPyWrapper.cc.

Enumeration Type Documentation

Function Documentation

float cond::ecalpulsecovariance::average ( EcalPulseCovariances const &  pulseshapes,
Quantity  q 
)

Definition at line 48 of file EcalPulseCovariancesPyWrapper.cc.

References EcalCondObjectContainer< T >::barrelItems(), THERAW, and EcalPulseCovariance::val().

Referenced by extractAverage().

48  {
49  return std::accumulate(
50  boost::make_transform_iterator(pulseshapes.barrelItems().begin(),bind(&EcalPulseCovariance::val,_1,THERAW,q-1)),
51  boost::make_transform_iterator(pulseshapes.barrelItems().end(),bind(&EcalPulseCovariance::val,_1,THERAW,q-1)),
52  0.)/float(pulseshapes.barrelItems().size());
53  }
float val(int i, int j) const
void cond::ecalpulsecovariance::extractAverage ( EcalPulseCovariances const &  pulseshapes,
Quantity  q,
std::vector< int > const &  ,
std::vector< float > &  result 
)

Definition at line 55 of file EcalPulseCovariancesPyWrapper.cc.

References average().

Referenced by cond::ValueExtractor< EcalPulseCovariances >::extractor().

55  {
56  result.resize(1);
57  result[0] = average(pulseshapes,q);
58  }
tuple result
Definition: query.py:137
int average
Definition: PDRates.py:137
void cond::ecalpulsecovariance::extractSingleChannel ( EcalPulseCovariances const &  pulseshapes,
Quantity  q,
std::vector< int > const &  which,
std::vector< float > &  result 
)

Definition at line 64 of file EcalPulseCovariancesPyWrapper.cc.

References EcalCondObjectContainer< T >::barrelItems(), i, and THERAW.

Referenced by cond::ValueExtractor< EcalPulseCovariances >::extractor().

64  {
65  for (unsigned int i=0; i<which.size();i++) {
66  // absolutely arbitraty
67  if ((unsigned int) (which[i])< pulseshapes.barrelItems().size())
68  result.push_back( pulseshapes.barrelItems()[which[i]].val(THERAW,q-1));
69  }
70  }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
void cond::ecalpulsecovariance::extractSuperModules ( EcalPulseCovariances const &  pulseshapes,
Quantity  q,
std::vector< int > const &  which,
std::vector< float > &  result 
)

Definition at line 60 of file EcalPulseCovariancesPyWrapper.cc.

Referenced by cond::ValueExtractor< EcalPulseCovariances >::extractor().

60  {
61  // bho...
62  }