test
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(EcalPulseSymmCovariances
const &pulseshapes, Quantity q,
std::vector< int > const
&which, std::vector< float >
&result)> 
PulseSymmCovarianceExtractor
 

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 (EcalPulseSymmCovariances const &pulseshapes, Quantity q)
 
void extractAverage (EcalPulseSymmCovariances const &pulseshapes, Quantity q, std::vector< int > const &, std::vector< float > &result)
 
void extractSingleChannel (EcalPulseSymmCovariances const &pulseshapes, Quantity q, std::vector< int > const &which, std::vector< float > &result)
 
void extractSuperModules (EcalPulseSymmCovariances const &pulseshapes, Quantity q, std::vector< int > const &which, std::vector< float > &result)
 

Typedef Documentation

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

Definition at line 72 of file EcalPulseSymmCovariancesPyWrapper.cc.

Enumeration Type Documentation

Function Documentation

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

Definition at line 48 of file EcalPulseSymmCovariancesPyWrapper.cc.

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

Referenced by extractAverage().

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

Definition at line 55 of file EcalPulseSymmCovariancesPyWrapper.cc.

References average().

Referenced by cond::ValueExtractor< EcalPulseSymmCovariances >::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 ( EcalPulseSymmCovariances const &  pulseshapes,
Quantity  q,
std::vector< int > const &  which,
std::vector< float > &  result 
)

Definition at line 64 of file EcalPulseSymmCovariancesPyWrapper.cc.

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

Referenced by cond::ValueExtractor< EcalPulseSymmCovariances >::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
def which
Definition: eostools.py:335
tuple result
Definition: query.py:137
void cond::ecalpulsecovariance::extractSuperModules ( EcalPulseSymmCovariances const &  pulseshapes,
Quantity  q,
std::vector< int > const &  which,
std::vector< float > &  result 
)

Definition at line 60 of file EcalPulseSymmCovariancesPyWrapper.cc.

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

60  {
61  // bho...
62  }