CMS 3D CMS Logo

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

Enumerator:
singleChannel 
bySuperModule 
all 

Definition at line 42 of file EcalPedestalsPyWrapper.cc.

Enumerator:
mean_x12 
mean_x6 
mean_x3 

Definition at line 41 of file EcalPedestalsPyWrapper.cc.

{ mean_x12=1, mean_x6=2, mean_x3=3 };

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().

                                                                      {
                        return std::accumulate(
                                boost::make_transform_iterator(peds.barrelItems().begin(),bind(&EcalPedestal::mean,_1,q)),
                                boost::make_transform_iterator(peds.barrelItems().end(),bind(&EcalPedestal::mean,_1,q)),
                                0.)/float(peds.barrelItems().size());
                }
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().

                                                                                                                                {
                        result.resize(1);
                        result[0] = average(peds,q);
                }
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().

                                                                                                                                            {
                        for (unsigned int i=0; i<which.size();i++) {
                                // absolutely arbitraty
                                if ((unsigned int) (which[i])<  peds.barrelItems().size())
                                        result.push_back( peds.barrelItems()[which[i]].mean(q));
                        }
                }
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().

                                                                                                                                           {
                        // bho...
                }