CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventSetup.h
Go to the documentation of this file.
1 #ifndef DataFormats_FWLite_EventSetup_h
2 #define DataFormats_FWLite_EventSetup_h
3 // -*- C++ -*-
4 //
5 // Package: FWLite
6 // Class : EventSetup
7 //
41 //
42 // Original Author:
43 // Created: Thu Dec 10 15:57:46 CST 2009
44 //
45 
46 // system include files
47 #include <vector>
48 #include <string>
49 
50 // user include files
53 
54 // forward declarations
55 class TFile;
56 
57 namespace edm {
58  class EventBase;
59 }
60 
61 namespace fwlite
62 {
63  class Record;
64  typedef unsigned int RecordID;
65 
66  class EventSetup {
67 
68  public:
69  EventSetup(TFile*);
70  virtual ~EventSetup();
71 
72  // ---------- const member functions ---------------------
73  const Record& get(const RecordID&) const;
74 
79  RecordID recordID(const char* iRecordName) const;
80 
83  bool exists(const char* iRecordName) const;
84 
85  std::vector<std::string> namesOfAvailableRecords() const;
86  // ---------- static member functions --------------------
87 
88  // ---------- member functions ---------------------------
89  //void syncTo(unsigned long iRun, unsigned long iLumi);
90  //void syncTo(const edm::EventID&);
91 
94  void syncTo(const edm::EventID&, const edm::Timestamp&);
95 
96  //void autoSyncTo(const edm::EventBase&);
97 
98 
99  private:
100  EventSetup(const EventSetup&); // stop default
101 
102  const EventSetup& operator=(const EventSetup&); // stop default
103 
104  // ---------- member data --------------------------------
108 
109  TFile* m_file;
110 
111  mutable std::vector<Record*> m_records;
112  };
113 } /* fwlite */
114 
115 
116 #endif
void syncTo(const edm::EventID &, const edm::Timestamp &)
Definition: EventSetup.cc:74
EventSetup(TFile *)
Definition: EventSetup.cc:39
std::vector< std::string > namesOfAvailableRecords() const
Definition: EventSetup.cc:135
unsigned int RecordID
Definition: EventSetup.h:63
std::vector< Record * > m_records
Definition: EventSetup.h:111
RecordID recordID(const char *iRecordName) const
Definition: EventSetup.cc:99
virtual ~EventSetup()
Definition: EventSetup.cc:50
edm::EventID m_syncedEvent
Definition: EventSetup.h:106
edm::Timestamp m_syncedTimestamp
Definition: EventSetup.h:107
const edm::EventBase * m_event
Definition: EventSetup.h:105
bool exists(const char *iRecordName) const
Definition: EventSetup.cc:84
const EventSetup & operator=(const EventSetup &)