CMS 3D CMS Logo

SiStripThresholdFakeESSource Class Reference

Fake source of SiStripThreshold. More...

#include <CalibTracker/SiStripESProducers/plugins/fake/SiStripThresholdFakeESSource.h>

Inheritance diagram for SiStripThresholdFakeESSource:

edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

virtual std::auto_ptr
< SiStripThreshold
produce (const SiStripThresholdRcd &)
 SiStripThresholdFakeESSource (const edm::ParameterSet &)
virtual ~SiStripThresholdFakeESSource ()

Protected Member Functions

virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Private Member Functions

const
SiStripThresholdFakeESSource
operator= (const SiStripThresholdFakeESSource &)
 SiStripThresholdFakeESSource (const SiStripThresholdFakeESSource &)

Private Attributes

edm::FileInPath fp_
float hTh_
float lTh_


Detailed Description

Fake source of SiStripThreshold.

Author:
D. Giordano

Definition at line 20 of file SiStripThresholdFakeESSource.h.


Constructor & Destructor Documentation

SiStripThresholdFakeESSource::SiStripThresholdFakeESSource ( const edm::ParameterSet pset  ) 

Definition at line 9 of file SiStripThresholdFakeESSource.cc.

References edm::ESProducer::setWhatProduced().

00009                                                                                        :
00010   fp_(pset.getParameter<edm::FileInPath>("file")),
00011   lTh_(pset.getParameter<double>("LowTh")),
00012   hTh_(pset.getParameter<double>("HighTh")){
00013 
00014   edm::LogInfo("SiStripThresholdFakeESSource::SiStripThresholdFakeESSource");
00015 
00016   setWhatProduced( this );
00017   findingRecord<SiStripThresholdRcd>();
00018 }

virtual SiStripThresholdFakeESSource::~SiStripThresholdFakeESSource (  )  [inline, virtual]

Definition at line 25 of file SiStripThresholdFakeESSource.h.

00025 {;}

SiStripThresholdFakeESSource::SiStripThresholdFakeESSource ( const SiStripThresholdFakeESSource  )  [private]


Member Function Documentation

const SiStripThresholdFakeESSource& SiStripThresholdFakeESSource::operator= ( const SiStripThresholdFakeESSource  )  [private]

std::auto_ptr< SiStripThreshold > SiStripThresholdFakeESSource::produce ( const SiStripThresholdRcd  )  [virtual]

Definition at line 21 of file SiStripThresholdFakeESSource.cc.

References lat::endl(), fp_, edm::FileInPath::fullPath(), hTh_, it, LogDebug, lTh_, VarParsing::obj, SiStripThreshold::put(), SiStripThreshold::setData(), and strip().

00021                                                                                                 { 
00022   
00023   SiStripThreshold * obj = new SiStripThreshold();
00024 
00025   SiStripDetInfoFileReader reader(fp_.fullPath());
00026  
00027   const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > DetInfos  = reader.getAllData();
00028   
00029   for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){    
00030     //Generate Thresholds for det detid
00031     SiStripThreshold::Container theSiStripVector;   
00032     uint16_t strip=0;
00033     float lTh = lTh_;
00034     float hTh = hTh_;
00035 
00036     obj->setData(strip,lTh,hTh,theSiStripVector);
00037     LogDebug("SiStripThresholdFakeESSource::produce") <<"detid: "  << it->first << " \t"
00038                                                           << "firstStrip: " << strip << " \t" << theSiStripVector.back().getFirstStrip() << " \t"
00039                                                           << "lTh: " << lTh       << " \t" << theSiStripVector.back().getLth() << " \t"
00040                                                           << "hTh: " << hTh       << " \t" << theSiStripVector.back().getHth() << " \t"
00041                                                           << "FirstStrip_and_Hth: " << theSiStripVector.back().FirstStrip_and_Hth << " \t"
00042                                                           << std::endl;             
00043     
00044     if ( ! obj->put(it->first,theSiStripVector) )
00045       edm::LogError("SiStripThresholdFakeESSource::produce ")<<" detid already exists"<<std::endl;
00046   }
00047   
00048   return std::auto_ptr<SiStripThreshold>(obj);
00049 
00050 }

void SiStripThresholdFakeESSource::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue iosv,
edm::ValidityInterval oValidity 
) [protected, virtual]

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 53 of file SiStripThresholdFakeESSource.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.

00055                                                                                  {
00056 
00057   edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() );
00058   oValidity = infinity;
00059   
00060 }


Member Data Documentation

edm::FileInPath SiStripThresholdFakeESSource::fp_ [private]

Definition at line 43 of file SiStripThresholdFakeESSource.h.

Referenced by produce().

float SiStripThresholdFakeESSource::hTh_ [private]

Definition at line 44 of file SiStripThresholdFakeESSource.h.

Referenced by produce().

float SiStripThresholdFakeESSource::lTh_ [private]

Definition at line 44 of file SiStripThresholdFakeESSource.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:35 2009 for CMSSW by  doxygen 1.5.4