Builds hashed DetId map based on list of DetIds read from ascii file. More...
#include <SiStripHashedDetIdFakeESSource.h>
Public Member Functions | |
SiStripHashedDetIdFakeESSource (const edm::ParameterSet &) | |
virtual | ~SiStripHashedDetIdFakeESSource () |
Protected Member Functions | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Member Functions | |
virtual SiStripHashedDetId * | make (const SiStripHashedDetIdRcd &) |
Private Attributes | |
edm::FileInPath | detIds_ |
Builds hashed DetId map based on list of DetIds read from ascii file.
Definition at line 17 of file SiStripHashedDetIdFakeESSource.h.
SiStripHashedDetIdFakeESSource::SiStripHashedDetIdFakeESSource | ( | const edm::ParameterSet & | pset | ) | [explicit] |
Definition at line 14 of file SiStripHashedDetIdFakeESSource.cc.
: SiStripHashedDetIdESProducer( pset ), detIds_( pset.getParameter<edm::FileInPath>("DetIdsFile") ) { findingRecord<SiStripHashedDetIdRcd>(); edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" << " Constructing object..."; }
SiStripHashedDetIdFakeESSource::~SiStripHashedDetIdFakeESSource | ( | ) | [virtual] |
Definition at line 26 of file SiStripHashedDetIdFakeESSource.cc.
{ edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" << " Destructing object..."; }
SiStripHashedDetId * SiStripHashedDetIdFakeESSource::make | ( | const SiStripHashedDetIdRcd & | ) | [private, virtual] |
Builds hashed DetId map based on ascii file.
Implements SiStripHashedDetIdESProducer.
Definition at line 34 of file SiStripHashedDetIdFakeESSource.cc.
References detIds_, edm::FileInPath::fullPath(), cond::hash, LogTrace, and OfflineSiStripConfigDb_cff::SiStripDetInfoFileReader.
{ edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" << " Building \"fake\" hashed DetId map from ascii file"; typedef std::map<uint32_t,SiStripDetInfoFileReader::DetInfo> Dets; Dets det_info = SiStripDetInfoFileReader( detIds_.fullPath() ).getAllData(); std::vector<uint32_t> dets; dets.reserve(16000); Dets::const_iterator idet = det_info.begin(); Dets::const_iterator jdet = det_info.end(); for ( ; idet != jdet; ++idet ) { dets.push_back( idet->first ); } edm::LogVerbatim("HashedDetId") << "[SiStripHashedDetIdESProducer::" << __func__ << "]" << " Retrieved " << dets.size() << " DetIds from ascii file!"; SiStripHashedDetId* hash = new SiStripHashedDetId( dets ); LogTrace("HashedDetId") << "[SiStripHashedDetIdESProducer::" << __func__ << "]" << " DetId hash map: " << std::endl << *hash; return hash; }
void SiStripHashedDetIdFakeESSource::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | key, |
const edm::IOVSyncValue & | iov_sync, | ||
edm::ValidityInterval & | iov_validity | ||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 65 of file SiStripHashedDetIdFakeESSource.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
{ edm::ValidityInterval infinity( iov_sync.beginOfTime(), iov_sync.endOfTime() ); iov_validity = infinity; }
Location of ascii file containing DetIds.
Definition at line 36 of file SiStripHashedDetIdFakeESSource.h.
Referenced by make().