CMS 3D CMS Logo

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

Typedefs

typedef boost::function< void(EcalPedestals
const &peds, Quantity q,
std::vector< int > const
&which, std::vector< float >
&result)> 
PedExtractor
 

Enumerations

enum  How { singleChannel, bySuperModule, all }
 
enum  Quantity { mean_x12 =1, mean_x6 =2, mean_x3 =3 }
 

Functions

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

Typedef Documentation

typedef boost::function<void(EcalPedestals const & peds, Quantity q, std::vector<int> const & which, std::vector<float> & result)> cond::ecalped::PedExtractor

Definition at line 68 of file EcalPedestalsPyWrapper.cc.

Enumeration Type Documentation

Function Documentation

float cond::ecalped::average ( EcalPedestals const &  peds,
Quantity  q 
)

Definition at line 44 of file EcalPedestalsPyWrapper.cc.

References EcalCondObjectContainer< T >::barrelItems(), and EcalPedestal::mean().

Referenced by extractAverage().

44  {
45  return std::accumulate(
46  boost::make_transform_iterator(peds.barrelItems().begin(),bind(&EcalPedestal::mean,_1,q)),
47  boost::make_transform_iterator(peds.barrelItems().end(),bind(&EcalPedestal::mean,_1,q)),
48  0.)/float(peds.barrelItems().size());
49  }
float mean(int i) const
Definition: EcalPedestals.h:25
void cond::ecalped::extractAverage ( EcalPedestals const &  peds,
Quantity  q,
std::vector< int > const &  ,
std::vector< float > &  result 
)

Definition at line 51 of file EcalPedestalsPyWrapper.cc.

References average().

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

51  {
52  result.resize(1);
53  result[0] = average(peds,q);
54  }
tuple result
Definition: query.py:137
int average
Definition: PDRates.py:137
void cond::ecalped::extractSingleChannel ( EcalPedestals const &  peds,
Quantity  q,
std::vector< int > const &  which,
std::vector< float > &  result 
)

Definition at line 60 of file EcalPedestalsPyWrapper.cc.

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

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

60  {
61  for (unsigned int i=0; i<which.size();i++) {
62  // absolutely arbitraty
63  if ((unsigned int) (which[i])< peds.barrelItems().size())
64  result.push_back( peds.barrelItems()[which[i]].mean(q));
65  }
66  }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: query.py:137
void cond::ecalped::extractSuperModules ( EcalPedestals const &  peds,
Quantity  q,
std::vector< int > const &  which,
std::vector< float > &  result 
)

Definition at line 56 of file EcalPedestalsPyWrapper.cc.

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

56  {
57  // bho...
58  }