CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RecordWriter.h
Go to the documentation of this file.
1 #ifndef PhysicsTools_CondLiteIO_RecordWriter_h
2 #define PhysicsTools_CondLiteIO_RecordWriter_h
3 // -*- C++ -*-
4 //
5 // Package: CondLiteIO
6 // Class : RecordWriter
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Wed Dec 9 17:00:53 CST 2009
19 //
20 
21 // system include files
22 #include <map>
23 // user include files
26 
27 // forward declarations
28 class TFile;
29 class TBranch;
30 class TTree;
31 
32 namespace fwlite {
34 {
35 
36  public:
37  RecordWriter(const char* iName, TFile* iFile);
38  virtual ~RecordWriter();
39 
40  struct DataBuffer {
41  const void* pBuffer_;
42  TBranch* branch_;
44  };
45  // ---------- const member functions ---------------------
46 
47  // ---------- static member functions --------------------
48 
49  // ---------- member functions ---------------------------
50  void update(const void* iData, const std::type_info& iType, const char* iLabel);
51 
52  //call update before calling write
53  void fill(const edm::ESRecordAuxiliary&);
54 
55  void write();
56 
57  private:
58  RecordWriter(const RecordWriter&); // stop default
59 
60  const RecordWriter& operator=(const RecordWriter&); // stop default
61 
62  // ---------- member data --------------------------------
63  TTree* tree_;
66  TBranch* auxBranch_;
67  std::map<std::pair<edm::TypeIDBase,std::string>, DataBuffer> idToBuffer_;
68 };
69 }
70 
71 #endif
edm::ESRecordAuxiliary aux_
Definition: RecordWriter.h:64
edm::ESRecordAuxiliary * pAux_
Definition: RecordWriter.h:65
void fill(const edm::ESRecordAuxiliary &)
const RecordWriter & operator=(const RecordWriter &)
std::map< std::pair< edm::TypeIDBase, std::string >, DataBuffer > idToBuffer_
Definition: RecordWriter.h:67
void update(const void *iData, const std::type_info &iType, const char *iLabel)
Definition: RecordWriter.cc:72
RecordWriter(const char *iName, TFile *iFile)
Definition: RecordWriter.cc:38