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(); }
79 FWLiteESGenericHandle
h(m_type);
83 if (
nullptr !=
h.m_exception) {
84 throw *(
h.m_exception);
88 void invalidateCache()
override {
93 void const* getAfterPrefetchImpl()
const final {
return m_data; }
121 std::map<EventSetupRecordKey, fwlite::RecordID>
m_keyToID;
127 : m_file(TFile::Open(iPS.getParameter<std::
string>(
"fileName").c_str())), m_es(m_file.
get()) {}
138 typedef std::vector<std::pair<std::string, std::string> > TypesAndLabels;
141 std::cout <<
"Looking for data in record " << iRecordKey.
name() << std::endl;
142 for (TypesAndLabels::const_iterator it = typesAndLabels.begin(), itEnd = typesAndLabels.end(); it != itEnd; ++it) {
143 std::cout <<
" need type " << it->first << std::endl;
145 if (tt != HCTypeTag()) {
147 keyedProxiesVector.emplace_back(dk, std::make_shared<FWLiteProxy>(TypeID(tt.value()), &rec, &
m_queue, &
m_mutex));
149 LogDebug(
"UnknownESType") <<
"The type '" << it->first <<
"' is unknown in this job";
150 std::cout <<
" *****FAILED*****" << std::endl;
153 return keyedProxiesVector;
173 for (std::vector<std::string>::const_iterator it = recordNames.begin(), itEnd = recordNames.end(); it != itEnd;
176 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)
const EventID & eventID() const
std::vector< std::string > namesOfAvailableRecords() const
void invalidateCache() override
static const IOVSyncValue & endOfTime()
const IOVSyncValue & startSyncValue() const
std::pair< Time_t, Time_t > ValidityInterval
void delaySettingRecords() override
~FWLiteESSource() override
RecordID recordID(const char *iRecordName) const
void setIntervalFor(const EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
const char * name() const
tuple key
prepare the HTCondor submission files and eventually submit them
std::vector< std::pair< std::string, std::string > > typeAndLabelOfAvailableData() const
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
std::vector< std::pair< DataKey, std::shared_ptr< DataProxy >>> KeyedProxiesVector
const TypeTag & type() const
edm::SerialTaskQueue m_queue
FWLiteESSource(edm::ParameterSet const &iPS)
const edm::Timestamp & time() const
const NameTag & name() const
const char * value() const
const Timestamp & time() const
KeyedProxiesVector registerProxies(const EventSetupRecordKey &, unsigned int iovIndex) override
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const Record & get(const RecordID &) const
TimeValue_t value() const
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
const edm::EventID & eventID() const
const IOVSyncValue & endSyncValue() const