CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
SiStripBackPlaneCorrectionGenerator Class Reference

#include <SiStripBackPlaneCorrectionGenerator.h>

Inheritance diagram for SiStripBackPlaneCorrectionGenerator:
SiStripDepCondObjBuilderBase< SiStripBackPlaneCorrection, TrackerTopology >

Public Member Functions

void getObj (SiStripBackPlaneCorrection *&obj, const TrackerTopology *tTopo)
 
 SiStripBackPlaneCorrectionGenerator (const edm::ParameterSet &, const edm::ActivityRegistry &)
 
 ~SiStripBackPlaneCorrectionGenerator ()
 
- Public Member Functions inherited from SiStripDepCondObjBuilderBase< SiStripBackPlaneCorrection, TrackerTopology >
virtual bool checkForCompatibility (std::string ss)
 
virtual void getMetaDataString (std::stringstream &ss)
 
virtual void initialize ()
 
 SiStripDepCondObjBuilderBase (const edm::ParameterSet &pset)
 
virtual ~SiStripDepCondObjBuilderBase ()
 

Private Member Functions

SiStripBackPlaneCorrectioncreateObject (const TrackerTopology *tTopo)
 

Additional Inherited Members

- Protected Attributes inherited from SiStripDepCondObjBuilderBase< SiStripBackPlaneCorrection, TrackerTopology >
edm::ParameterSet _pset
 
SiStripBackPlaneCorrectionobj_
 

Detailed Description

Generator of the ideal/fake conditions for the BackPlaneCorrection.
It receives input values for each module geometry type and it creates a per detIt reccord.

Definition at line 18 of file SiStripBackPlaneCorrectionGenerator.h.

Constructor & Destructor Documentation

SiStripBackPlaneCorrectionGenerator::SiStripBackPlaneCorrectionGenerator ( const edm::ParameterSet iConfig,
const edm::ActivityRegistry aReg 
)
explicit

Definition at line 13 of file SiStripBackPlaneCorrectionGenerator.cc.

13  :
15 {
16  edm::LogInfo("SiStripBackPlaneCorrectionGenerator") << "[SiStripBackPlaneCorrectionGenerator::SiStripBackPlaneCorrectionGenerator]";
17 }
SiStripDepCondObjBuilderBase(const edm::ParameterSet &pset)
SiStripBackPlaneCorrectionGenerator::~SiStripBackPlaneCorrectionGenerator ( )

Definition at line 20 of file SiStripBackPlaneCorrectionGenerator.cc.

20  {
21  edm::LogInfo("SiStripBackPlaneCorrectionGenerator") << "[SiStripBackPlaneCorrectionGenerator::~SiStripBackPlaneCorrectionGenerator]";
22 }

Member Function Documentation

SiStripBackPlaneCorrection * SiStripBackPlaneCorrectionGenerator::createObject ( const TrackerTopology tTopo)
private

Definition at line 24 of file SiStripBackPlaneCorrectionGenerator.cc.

References SiStripDepCondObjBuilderBase< SiStripBackPlaneCorrection, TrackerTopology >::_pset, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), TrackerTopology::moduleGeometry(), getGTfromDQMFile::obj, SiStripBackPlaneCorrection::putBackPlaneCorrection(), matplotRender::reader, and relativeConstraints::value.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::dropEvent(), and getObj().

25 {
27 
29  std::vector<double> valuePerModuleGeometry(_pset.getParameter<std::vector<double> >("BackPlaneCorrection_PerModuleGeometry"));
30 
32  const std::vector<uint32_t> DetIds = reader.getAllDetIds();
33  for(std::vector<uint32_t>::const_iterator detit=DetIds.begin(); detit!=DetIds.end(); detit++){
34  unsigned int moduleGeometry = (tTopo->moduleGeometry(DetId(*detit))-1);
35  if(moduleGeometry>valuePerModuleGeometry.size())edm::LogError("SiStripBackPlaneCorrectionGenerator")<<" BackPlaneCorrection_PerModuleGeometry only contains "<< valuePerModuleGeometry.size() << "elements and module is out of range"<<std::endl;
36  float value = valuePerModuleGeometry[moduleGeometry];
37 
38  if (!obj->putBackPlaneCorrection(*detit, value) ) {
39  edm::LogError("SiStripBackPlaneCorrectionGenerator")<<" detid already exists"<<std::endl;
40  }
41  }
42  return obj;
43 }
T getParameter(std::string const &) const
bool putBackPlaneCorrection(const uint32_t &, float)
SiStripDetId::ModuleGeometry moduleGeometry(const DetId &id) const
Definition: DetId.h:18
std::string fullPath() const
Definition: FileInPath.cc:184
void SiStripBackPlaneCorrectionGenerator::getObj ( SiStripBackPlaneCorrection *&  obj,
const TrackerTopology depObj 
)
inlinevirtual

Returns the CondObj

Reimplemented from SiStripDepCondObjBuilderBase< SiStripBackPlaneCorrection, TrackerTopology >.

Definition at line 24 of file SiStripBackPlaneCorrectionGenerator.h.

References createObject().

24 {obj=createObject(tTopo);}
SiStripBackPlaneCorrection * createObject(const TrackerTopology *tTopo)