|
|
Go to the documentation of this file.
46 explicit TypeID(
const std::type_info& iInfo) :
edm::
TypeIDBase(iInfo) {}
48 using TypeIDBase::typeInfo;
50 struct FWLiteESGenericHandle {
51 FWLiteESGenericHandle(
const TypeID& iType) : m_type(iType), m_data(nullptr), m_exception(nullptr) {}
53 FWLiteESGenericHandle(
const void* iData) : m_type(), m_data(iData), m_exception(nullptr) {}
55 FWLiteESGenericHandle(
cms::Exception* iException) : m_type(), m_data(nullptr), m_exception(iException) {}
57 const std::type_info& typeInfo()
const {
return m_type.typeInfo(); }
66 FWLiteProxy(
const TypeID& iTypeID,
const fwlite::Record* iRecord) : m_type(iTypeID), m_record(iRecord) {}
73 FWLiteESGenericHandle
h(m_type);
76 if (
nullptr !=
h.m_exception) {
77 throw *(
h.m_exception);
82 void invalidateCache()
override {}
109 std::map<EventSetupRecordKey, fwlite::RecordID>
m_keyToID;
113 : m_file(TFile::Open(iPS.getParameter<
std::
string>(
"fileName").c_str())), m_es(m_file.
get()) {}
124 typedef std::vector<std::pair<std::string, std::string> > TypesAndLabels;
127 std::cout <<
"Looking for data in record " << iRecordKey.
name() << std::endl;
128 for (TypesAndLabels::const_iterator it = typesAndLabels.begin(), itEnd = typesAndLabels.end(); it != itEnd; ++it) {
129 std::cout <<
" need type " << it->first << std::endl;
131 if (
tt != HCTypeTag()) {
133 keyedProxiesVector.emplace_back(dk, std::make_shared<FWLiteProxy>(TypeID(
tt.value()), &rec));
135 LogDebug(
"UnknownESType") <<
"The type '" << it->first <<
"' is unknown in this job";
136 std::cout <<
" *****FAILED*****" << std::endl;
139 return keyedProxiesVector;
159 for (std::vector<std::string>::const_iterator it = recordNames.begin(), itEnd = recordNames.end(); it != itEnd;
162 if (
t != HCTypeTag()) {
const Record & get(const RecordID &) const
const IOVSyncValue & startSyncValue() const
std::pair< const char *, const std::type_info * > findType(const char *iClassName)
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 NameTag & name() const
const FWLiteESSource & operator=(const FWLiteESSource &)=delete
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
std::unique_ptr< TFile > m_file
const char * value() const
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 TypeTag & type() const
const edm::EventID & eventID() const