23 #include <boost/shared_ptr.hpp>
44 explicit TypeID(
const type_info& iInfo): edm::
TypeIDBase(iInfo) {}
48 struct FWLiteESGenericHandle {
49 FWLiteESGenericHandle(
const TypeID& iType):
54 FWLiteESGenericHandle(
const void* iData):
62 m_exception(iException){}
64 const std::type_info& typeInfo()
const {
65 return m_type.typeInfo();
82 FWLiteESGenericHandle
h(m_type);
85 if(0!=
h.m_exception) {
86 throw *(
h.m_exception);
133 std::map<edm::eventsetup::EventSetupRecordKey, fwlite::RecordID>
m_keyToID;
150 m_file( TFile::Open(iPS.getParameter<std::
string>(
"fileName").c_str())),
197 typedef std::vector<std::pair<std::string,std::string> > TypesAndLabels;
200 std::cout <<
"Looking for data in record "<<iRecordKey.
name()<<std::endl;
201 for(TypesAndLabels::const_iterator it = typesAndLabels.begin(), itEnd = typesAndLabels.end();
204 std::cout <<
" need type "<<it->first<<std::endl;
206 if(tt != HCTypeTag() ) {
208 aProxyList.push_back(std::make_pair(dk,
209 boost::shared_ptr<edm::eventsetup::DataProxy>(
new FWLiteProxy(TypeID(tt.value()),&rec))));
211 LogDebug(
"UnknownESType")<<
"The type '"<<it->first<<
"' is unknown in this job";
212 std::cout <<
" *****FAILED*****"<<std::endl;
244 for(std::vector<std::string>::const_iterator it = recordNames.begin(),
245 itEnd = recordNames.end();
249 if(t != HCTypeTag() ) {
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
virtual void delaySettingRecords() override
void usingRecordWithKey(const EventSetupRecordKey &)
std::auto_ptr< TFile > m_file
const std::type_info & typeInfo() const
const FWLiteESSource & operator=(const FWLiteESSource &)
RecordID recordID(const char *iRecordName) const
virtual void registerProxies(const edm::eventsetup::EventSetupRecordKey &iRecordKey, KeyedProxies &aProxyList) override
void invalidateProxies(const EventSetupRecordKey &iRecordKey)
std::vector< std::pair< DataKey, boost::shared_ptr< DataProxy > > > KeyedProxies
const char * name() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
std::vector< std::pair< std::string, std::string > > typeAndLabelOfAvailableData() const
virtual ~FWLiteESSource()
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
const TypeTag & type() const
FWLiteESSource(edm::ParameterSet const &iPS)
const edm::Timestamp & time() const
const NameTag & name() const
const char * value() const
const Timestamp & time() const
virtual void newInterval(const edm::eventsetup::EventSetupRecordKey &iRecordType, const edm::ValidityInterval &iInterval) override
called when a new interval of validity occurs for iRecordType
const Record & get(const RecordID &) const
virtual void invalidateCache()=0
virtual void const * getImpl(EventSetupRecord const &, DataKey const &iKey)=0
TimeValue_t value() const
T get(const Candidate &c)
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
const edm::EventID & eventID() const
const IOVSyncValue & endSyncValue() const