#include <CalibTracker/SiStripESProducers/plugins/fake/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 &) |
Builds hashed DetId map based on ascii file. | |
Private Attributes | |
edm::FileInPath | detIds_ |
Location of ascii file containing 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.
00015 : SiStripHashedDetIdESProducer( pset ), 00016 detIds_( pset.getParameter<edm::FileInPath>("DetIdsFile") ) 00017 { 00018 findingRecord<SiStripHashedDetIdRcd>(); 00019 edm::LogVerbatim("HashedDetId") 00020 << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" 00021 << " Constructing object..."; 00022 }
SiStripHashedDetIdFakeESSource::~SiStripHashedDetIdFakeESSource | ( | ) | [virtual] |
Definition at line 26 of file SiStripHashedDetIdFakeESSource.cc.
00026 { 00027 edm::LogVerbatim("HashedDetId") 00028 << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" 00029 << " Destructing object..."; 00030 }
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_, lat::endl(), edm::FileInPath::fullPath(), and LogTrace.
00034 { 00035 edm::LogVerbatim("HashedDetId") 00036 << "[SiStripHashedDetIdFakeESSource::" << __func__ << "]" 00037 << " Building \"fake\" hashed DetId map from ascii file"; 00038 00039 typedef std::map<uint32_t,SiStripDetInfoFileReader::DetInfo> Dets; 00040 Dets det_info = SiStripDetInfoFileReader( detIds_.fullPath() ).getAllData(); 00041 00042 std::vector<uint32_t> dets; 00043 dets.reserve(16000); 00044 00045 Dets::const_iterator idet = det_info.begin(); 00046 Dets::const_iterator jdet = det_info.end(); 00047 for ( ; idet != jdet; ++idet ) { dets.push_back( idet->first ); } 00048 edm::LogVerbatim("HashedDetId") 00049 << "[SiStripHashedDetIdESProducer::" << __func__ << "]" 00050 << " Retrieved " << dets.size() 00051 << " DetIds from ascii file!"; 00052 00053 SiStripHashedDetId* hash = new SiStripHashedDetId( dets ); 00054 LogTrace("HashedDetId") 00055 << "[SiStripHashedDetIdESProducer::" << __func__ << "]" 00056 << " DetId hash map: " << std::endl 00057 << *hash; 00058 00059 return hash; 00060 00061 }
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.
00067 { 00068 edm::ValidityInterval infinity( iov_sync.beginOfTime(), iov_sync.endOfTime() ); 00069 iov_validity = infinity; 00070 }
Location of ascii file containing DetIds.
Definition at line 36 of file SiStripHashedDetIdFakeESSource.h.
Referenced by make().