|
|
Go to the documentation of this file.
50 explicit TypeID(
const std::type_info& iInfo) :
edm::
TypeIDBase(iInfo) {}
52 using TypeIDBase::typeInfo;
54 struct FWLiteESGenericHandle {
55 FWLiteESGenericHandle(
const TypeID& iType) : m_type(iType), m_data(nullptr), m_exception(nullptr) {}
57 FWLiteESGenericHandle(
const void* iData) : m_type(), m_data(iData), m_exception(nullptr) {}
59 FWLiteESGenericHandle(
cms::Exception* iException) : m_type(), m_data(nullptr), m_exception(iException) {}
61 const std::type_info& typeInfo()
const {
return m_type.typeInfo(); }
74 assert(iKey.type() == m_type);
76 FWLiteESGenericHandle
h(m_type);
77 m_record->get(
h, iKey.name().value());
80 if (
nullptr !=
h.m_exception) {
81 throw *(
h.m_exception);
85 void invalidateCache()
override {
90 void const* getAfterPrefetchImpl()
const final {
return m_data; }
118 std::map<EventSetupRecordKey, fwlite::RecordID>
m_keyToID;
124 : m_file(TFile::Open(iPS.getParameter<
std::
string>(
"fileName").c_str())), m_es(m_file.
get()) {}
135 typedef std::vector<std::pair<std::string, std::string> > TypesAndLabels;
138 std::cout <<
"Looking for data in record " << iRecordKey.
name() << std::endl;
139 for (TypesAndLabels::const_iterator it = typesAndLabels.begin(), itEnd = typesAndLabels.end(); it != itEnd; ++it) {
140 std::cout <<
" need type " << it->first << std::endl;
142 if (
tt != HCTypeTag()) {
144 keyedProxiesVector.emplace_back(dk, std::make_shared<FWLiteProxy>(TypeID(
tt.value()), &rec, &
m_queue, &
m_mutex));
146 LogDebug(
"UnknownESType") <<
"The type '" << it->first <<
"' is unknown in this job";
147 std::cout <<
" *****FAILED*****" << std::endl;
150 return keyedProxiesVector;
170 for (std::vector<std::string>::const_iterator it = recordNames.begin(), itEnd = recordNames.end(); it != itEnd;
173 if (
t != HCTypeTag()) {
const Record & get(const RecordID &) const
const IOVSyncValue & startSyncValue() const
void invalidateCache() override
std::pair< const char *, const std::type_info * > findType(const char *iClassName)
edm::SerialTaskQueue m_queue
KeyedProxiesVector registerProxies(const EventSetupRecordKey &, unsigned int iovIndex) override
RecordID recordID(const char *iRecordName) const
std::vector< std::string > namesOfAvailableRecords() const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void delaySettingRecords() override
const IOVSyncValue & endSyncValue() const
TimeValue_t value() const
~FWLiteESSource() override
const FWLiteESSource & operator=(const FWLiteESSource &)=delete
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
std::unique_ptr< TFile > m_file
const char * name() const
void setIntervalFor(const EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
const EventID & eventID() const
static const IOVSyncValue & endOfTime()
void syncTo(const edm::EventID &, const edm::Timestamp &)
std::map< EventSetupRecordKey, fwlite::RecordID > m_keyToID
std::vector< std::pair< std::string, std::string > > typeAndLabelOfAvailableData() const
std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >> KeyedProxiesVector
void usingRecordWithKey(const EventSetupRecordKey &key)
const Timestamp & time() const
std::pair< Time_t, Time_t > ValidityInterval
FWLiteESSource(edm::ParameterSet const &iPS)
const edm::Timestamp & time() const
const edm::EventID & eventID() const