CMS 3D CMS Logo

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

Typedefs

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

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

Typedef Documentation

typedef boost::function<void(EcalPulseShapes const & pulseshapes, Quantity q, std::vector<int> const & which, std::vector<float> & result)> cond::ecalpulseshape::PulseShapeExtractor

Definition at line 68 of file EcalPulseShapesPyWrapper.cc.

Enumeration Type Documentation

Function Documentation

float cond::ecalpulseshape::average ( EcalPulseShapes const &  pulseshapes,
Quantity  q 
)

Definition at line 44 of file EcalPulseShapesPyWrapper.cc.

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

Referenced by extractAverage().

44  {
45  return std::accumulate(
46  boost::make_transform_iterator(pulseshapes.barrelItems().begin(),bind(&EcalPulseShape::val,_1,q-1)),
47  boost::make_transform_iterator(pulseshapes.barrelItems().end(),bind(&EcalPulseShape::val,_1,q-1)),
48  0.)/float(pulseshapes.barrelItems().size());
49  }
float val(int isample) const
void cond::ecalpulseshape::extractAverage ( EcalPulseShapes const &  pulseshapes,
Quantity  q,
std::vector< int > const &  ,
std::vector< float > &  result 
)

Definition at line 51 of file EcalPulseShapesPyWrapper.cc.

References average().

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

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

Definition at line 60 of file EcalPulseShapesPyWrapper.cc.

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

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

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

Definition at line 56 of file EcalPulseShapesPyWrapper.cc.

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

56  {
57  // bho...
58  }