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(); }
70 FWLiteProductResolver(
const TypeID& iTypeID,
74 :
edm::eventsetup::ESSourceProductResolverNonConcurrentBase(iQueue, iMutex),
80 assert(iKey.type() == m_type);
82 FWLiteESGenericHandle
h(m_type);
83 m_record->get(
h, iKey.name().value());
86 if (
nullptr !=
h.m_exception) {
87 throw *(
h.m_exception);
91 void invalidateCache()
override {
96 void const* getAfterPrefetchImpl()
const final {
return m_data; }
124 std::map<EventSetupRecordKey, fwlite::RecordID>
m_keyToID;
130 : m_file(TFile::Open(iPS.getParameter<
std::
string>(
"fileName").c_str())), m_es(m_file.
get()) {}
141 typedef std::vector<std::pair<std::string, std::string> > TypesAndLabels;
144 std::cout <<
"Looking for data in record " << iRecordKey.
name() << std::endl;
145 for (TypesAndLabels::const_iterator
it = typesAndLabels.begin(), itEnd = typesAndLabels.end();
it != itEnd; ++
it) {
146 std::cout <<
" need type " <<
it->first << std::endl;
148 if (
tt != HCTypeTag()) {
150 keyedProxiesVector.emplace_back(
151 dk, std::make_shared<FWLiteProductResolver>(TypeID(
tt.value()), &rec, &
m_queue, &
m_mutex));
153 LogDebug(
"UnknownESType") <<
"The type '" <<
it->first <<
"' is unknown in this job";
154 std::cout <<
" *****FAILED*****" << std::endl;
157 return keyedProxiesVector;
177 for (std::vector<std::string>::const_iterator
it = recordNames.begin(), itEnd = recordNames.end();
it != itEnd;
180 if (
t != HCTypeTag()) {
std::map< EventSetupRecordKey, fwlite::RecordID > m_keyToID
std::pair< const char *, const std::type_info * > findType(const char *iClassName)
void syncTo(const edm::EventID &, const edm::Timestamp &)
const FWLiteESSource & operator=(const FWLiteESSource &)=delete
std::unique_ptr< TFile > m_file
void usingRecordWithKey(const EventSetupRecordKey &key)
static const IOVSyncValue & endOfTime()
std::pair< Time_t, Time_t > ValidityInterval
void delaySettingRecords() override
~FWLiteESSource() override
const IOVSyncValue & startSyncValue() const
RecordID recordID(const char *iRecordName) const
KeyedResolversVector registerResolvers(const EventSetupRecordKey &, unsigned int iovIndex) override
void setIntervalFor(const EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
const Record & get(const RecordID &) const
key
prepare the HTCondor submission files and eventually submit them
std::vector< std::string > namesOfAvailableRecords() const
const IOVSyncValue & endSyncValue() const
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
TimeValue_t value() const
const edm::EventID & eventID() const
std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> KeyedResolversVector
const EventID & eventID() const
edm::SerialTaskQueue m_queue
FWLiteESSource(edm::ParameterSet const &iPS)
const Timestamp & time() const
void invalidateCache() override
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const char * name() const
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
std::vector< std::pair< std::string, std::string > > typeAndLabelOfAvailableData() const
const edm::Timestamp & time() const