24 #include <boost/shared_ptr.hpp>
45 explicit TypeID(
const type_info& iInfo): edm::
TypeIDBase(iInfo) {}
49 struct FWLiteESGenericHandle {
50 FWLiteESGenericHandle(
const TypeID& iType):
55 FWLiteESGenericHandle(
const void* iData):
63 m_exception(iException){}
65 const std::type_info& typeInfo()
const {
66 return m_type.typeInfo();
81 assert(iKey.
type() == m_type);
83 FWLiteESGenericHandle
h(m_type);
86 if(0!=
h.m_exception) {
87 throw *(
h.m_exception);
134 std::map<edm::eventsetup::EventSetupRecordKey, fwlite::RecordID>
m_keyToID;
151 m_file( TFile::Open(iPS.getParameter<std::
string>(
"fileName").c_str())),
198 typedef std::vector<std::pair<std::string,std::string> > TypesAndLabels;
201 std::cout <<
"Looking for data in record "<<iRecordKey.
name()<<std::endl;
202 for(TypesAndLabels::const_iterator it = typesAndLabels.begin(), itEnd = typesAndLabels.end();
205 std::cout <<
" need type "<<it->first<<std::endl;
207 if(tt != HCTypeTag() ) {
209 aProxyList.push_back(std::make_pair(dk,
210 boost::shared_ptr<edm::eventsetup::DataProxy>(
new FWLiteProxy(TypeID(tt.value()),&rec))));
212 LogDebug(
"UnknownESType")<<
"The type '"<<it->first<<
"' is unknown in this job";
213 std::cout <<
" *****FAILED*****"<<std::endl;
245 for(std::vector<std::string>::const_iterator it = recordNames.begin(),
246 itEnd = recordNames.end();
250 if(t != HCTypeTag() ) {
virtual void delaySettingRecords()
std::pair< const char *, const std::type_info * > findType(const char *iClassName)
void syncTo(const edm::EventID &, const edm::Timestamp &)
const EventID & eventID() const
std::vector< std::string > namesOfAvailableRecords() const
std::map< edm::eventsetup::EventSetupRecordKey, fwlite::RecordID > m_keyToID
static const IOVSyncValue & endOfTime()
const IOVSyncValue & startSyncValue() const
std::pair< Time_t, Time_t > ValidityInterval
void usingRecordWithKey(const EventSetupRecordKey &)
std::auto_ptr< TFile > m_file
const std::type_info & typeInfo() const
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
const FWLiteESSource & operator=(const FWLiteESSource &)
RecordID recordID(const char *iRecordName) const
void invalidateProxies(const EventSetupRecordKey &iRecordKey)
std::vector< std::pair< DataKey, boost::shared_ptr< DataProxy > > > KeyedProxies
const char * name() const
virtual void registerProxies(const edm::eventsetup::EventSetupRecordKey &iRecordKey, KeyedProxies &aProxyList)
std::vector< std::pair< std::string, std::string > > typeAndLabelOfAvailableData() const
virtual ~FWLiteESSource()
TimeValue_t value() const
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
const TypeTag & type() const
virtual void newInterval(const edm::eventsetup::EventSetupRecordKey &iRecordType, const edm::ValidityInterval &iInterval)
called when a new interval of validity occurs for iRecordType
FWLiteESSource(edm::ParameterSet const &iPS)
const edm::Timestamp & time() const
const NameTag & name() const
const char * value() const
const Timestamp & time() const
const Record & get(const RecordID &) const
virtual void invalidateCache()=0
virtual void const * getImpl(EventSetupRecord const &, DataKey const &iKey)=0
T get(const Candidate &c)
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
const edm::EventID & eventID() const
const IOVSyncValue & endSyncValue() const