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:
SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >

Public Member Functions

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

Private Member Functions

SiStripBackPlaneCorrectioncreateObject ()
 

Additional Inherited Members

- Protected Attributes inherited from SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >
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 16 of file SiStripBackPlaneCorrectionGenerator.h.

Constructor & Destructor Documentation

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

Definition at line 15 of file SiStripBackPlaneCorrectionGenerator.cc.

15  :
17 {
18  edm::LogInfo("SiStripBackPlaneCorrectionGenerator") << "[SiStripBackPlaneCorrectionGenerator::SiStripBackPlaneCorrectionGenerator]";
19 }
SiStripCondObjBuilderBase(const edm::ParameterSet &pset)
SiStripBackPlaneCorrectionGenerator::~SiStripBackPlaneCorrectionGenerator ( )

Definition at line 22 of file SiStripBackPlaneCorrectionGenerator.cc.

22  {
23  edm::LogInfo("SiStripBackPlaneCorrectionGenerator") << "[SiStripBackPlaneCorrectionGenerator::~SiStripBackPlaneCorrectionGenerator]";
24 }

Member Function Documentation

SiStripBackPlaneCorrection * SiStripBackPlaneCorrectionGenerator::createObject ( )
private

Definition at line 26 of file SiStripBackPlaneCorrectionGenerator.cc.

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

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

27 {
29 
31  std::vector<double> valuePerModuleGeometry(_pset.getParameter<std::vector<double> >("BackPlaneCorrection_PerModuleGeometry"));
32 
34  const std::vector<uint32_t> DetIds = reader.getAllDetIds();
35  for(std::vector<uint32_t>::const_iterator detit=DetIds.begin(); detit!=DetIds.end(); detit++){
36  SiStripDetId SSdetId(*detit);
37  unsigned int moduleGeometry = (SSdetId.moduleGeometry()-1);
38  if(moduleGeometry>valuePerModuleGeometry.size())edm::LogError("SiStripBackPlaneCorrectionGenerator")<<" BackPlaneCorrection_PerModuleGeometry only contains "<< valuePerModuleGeometry.size() << "elements and module is out of range"<<std::endl;
39  float value = valuePerModuleGeometry[moduleGeometry];
40 
41  if (!obj->putBackPlaneCorrection(*detit, value) ) {
42  edm::LogError("SiStripBackPlaneCorrectionGenerator")<<" detid already exists"<<std::endl;
43  }
44  }
45  return obj;
46 }
T getParameter(std::string const &) const
bool putBackPlaneCorrection(const uint32_t &, float)
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
std::string fullPath() const
Definition: FileInPath.cc:165
void SiStripBackPlaneCorrectionGenerator::getObj ( SiStripBackPlaneCorrection *&  obj)
inlinevirtual

Returns the CondObj

Reimplemented from SiStripCondObjBuilderBase< SiStripBackPlaneCorrection >.

Definition at line 22 of file SiStripBackPlaneCorrectionGenerator.h.

References createObject().

22 {obj=createObject();}