CMS 3D CMS Logo

Namespaces | Functions
EcalPyUtils.cc File Reference
#include "DataFormats/EcalDetId/interface/EBDetId.h"
#include "DataFormats/EcalDetId/interface/EEDetId.h"
#include "CondTools/Ecal/interface/EcalFloatCondObjectContainerXMLTranslator.h"
#include <pybind11/pybind11.h>

Go to the source code of this file.

Namespaces

 ecalpyutils
 

Functions

std::string ecalpyutils::arraystoXML (const std::vector< float > &eb, const std::vector< float > &ee)
 
int ecalpyutils::hashedIndex (int ieta, int iphi)
 
int ecalpyutils::hashedIndexEE (int ix, int iy, int iz)
 
std::vector< int > ecalpyutils::hashedIndexToEtaPhi (int hashedindex)
 
std::vector< int > ecalpyutils::hashedIndexToXY (int hashedindex)
 
int ecalpyutils::ism (int ieta, int iphi)
 
 PYBIND11_MODULE (pluginEcalPyUtils, m)
 

Function Documentation

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( pluginEcalPyUtils  ,
 
)

Definition at line 60 of file EcalPyUtils.cc.

References ecalpyutils::arraystoXML(), EcalFloatCondObjectContainerXMLTranslator::barrelfromXML(), EcalFloatCondObjectContainerXMLTranslator::endcapfromXML(), ecalpyutils::hashedIndex(), ecalpyutils::hashedIndexEE(), ecalpyutils::hashedIndexToEtaPhi(), ecalpyutils::hashedIndexToXY(), ecalpyutils::ism(), and visualization-live-secondInstance_cfg::m.

60  {
61  // looks like these are already defined somewhere
62 
63  // python access to stl integer vectors
64  // class_< std::vector<int> >("vectorInt")
65  // .def(vector_indexing_suite<std::vector<int> >())
66  // ;
67 
68  // class_< std::vector<float> >("vectorFloat")
69  // .def(vector_indexing_suite<std::vector<float> >())
70  // ;
71 
72  m.def("hashedIndexToEtaPhi", &ecalpyutils::hashedIndexToEtaPhi);
73  m.def("hashedIndexToXY", &ecalpyutils::hashedIndexToXY);
74  m.def("hashedIndex", &ecalpyutils::hashedIndex);
75  m.def("hashedIndexEE", &ecalpyutils::hashedIndexEE);
76  m.def("ism", &ecalpyutils::ism);
79  m.def("arraystoXML", &ecalpyutils::arraystoXML);
80 }
static std::vector< float > barrelfromXML(const std::string &filename)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
int hashedIndexEE(int ix, int iy, int iz)
Definition: EcalPyUtils.cc:41
std::string arraystoXML(const std::vector< float > &eb, const std::vector< float > &ee)
Definition: EcalPyUtils.cc:54
static std::vector< float > endcapfromXML(const std::string &filename)
std::vector< int > hashedIndexToXY(int hashedindex)
Definition: EcalPyUtils.cc:25
std::vector< int > hashedIndexToEtaPhi(int hashedindex)
Definition: EcalPyUtils.cc:16
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:49