CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RootOutputFile.h
Go to the documentation of this file.
1 #ifndef IOPool_Output_RootOutputFile_h
2 #define IOPool_Output_RootOutputFile_h
3 
5 //
6 // Class RootOutputFile
7 //
8 // Current Author: Bill Tanenbaum
9 //
11 
12 #include <map>
13 #include <string>
14 #include <vector>
15 
16 #include "boost/array.hpp"
17 #include "boost/shared_ptr.hpp"
18 
32 
33 class TTree;
34 class TFile;
35 
36 namespace edm {
37  class PoolOutputModule;
38 
40  public:
43  typedef boost::array<RootOutputTree*, NumBranchTypes> RootOutputTreePtrArray;
44  explicit RootOutputFile(PoolOutputModule* om, std::string const& fileName,
45  std::string const& logicalFileName);
47  void writeOne(EventPrincipal const& e);
48  //void endFile();
50  void writeRun(RunPrincipal const& r);
52  void writeFileIdentifier();
53  void writeIndexIntoFile();
61 
62  void finishEndFile();
63  void beginInputFile(FileBlock const& fb, int remainingEvents);
65  bool shouldWeCloseFile() const;
66 
67  std::string const& fileName() const {return file_;}
68 
69  private:
70 
71  //-------------------------------
72  // Local types
73  //
74 
75  //-------------------------------
76  // Private functions
77 
78  void setBranchAliases(TTree* tree, Selections const& branches) const;
79 
81  Principal const& principal,
82  ProductProvenanceVector* productProvenanceVecPtr);
83 
84  void insertAncestors(ProductProvenance const& iGetParents,
85  Principal const& principal,
86  bool produced,
87  std::set<ProductProvenance>& oToFill);
88 
89  //-------------------------------
90  // Member data
91 
92  std::string file_;
93  std::string logicalFile_;
98  boost::shared_ptr<TFile> filePtr_;
125  std::set<ParentageID> parentageIDs_;
126  std::set<BranchID> branchesWithStoredHistory_;
127  };
128 
129 }
130 
131 #endif
std::set< ParentageID > parentageIDs_
void beginInputFile(FileBlock const &fb, int remainingEvents)
LuminosityBlockAuxiliary lumiAux_
void writeProcessHistoryRegistry()
void writeOne(EventPrincipal const &e)
void fillBranches(BranchType const &branchType, Principal const &principal, ProductProvenanceVector *productProvenanceVecPtr)
void writeProcessConfigurationRegistry()
ProductProvenanceVector eventEntryInfoVector_
std::vector< OutputItem > OutputItemList
ProductProvenanceVector * pRunEntryInfoVector_
void setBranchAliases(TTree *tree, Selections const &branches) const
bool shouldWeCloseFile() const
long long EntryNumber_t
BranchType
Definition: BranchType.h:11
std::set< BranchID > branchesWithStoredHistory_
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & fileName() const
ProductProvenanceVector * pLumiEntryInfoVector_
RootOutputTree eventTree_
std::vector< BranchListIndex > BranchListIndexes
void writeRun(RunPrincipal const &r)
PoolOutputModule const * om_
IndexIntoFile::EntryNumber_t eventEntryNumber_
LuminosityBlockAuxiliary const * pLumiAux_
PoolOutputModule::OutputItem OutputItem
std::string logicalFile_
PoolOutputModule::OutputItemList OutputItemList
std::vector< ProductProvenance > ProductProvenanceVector
std::size_t Token
Definition: JobReport.h:44
EventSelectionIDVector const * pEventSelectionIDs_
eventsetup::produce::Produce produced
Definition: ESProducts.cc:21
RootOutputTree runTree_
boost::array< RootOutputTree *, NumBranchTypes > RootOutputTreePtrArray
void respondToCloseInputFile(FileBlock const &fb)
IndexIntoFile indexIntoFile_
IndexIntoFile::EntryNumber_t runEntryNumber_
void insertAncestors(ProductProvenance const &iGetParents, Principal const &principal, bool produced, std::set< ProductProvenance > &oToFill)
void writeLuminosityBlock(LuminosityBlockPrincipal const &lb)
EventAuxiliary const * pEventAux_
RunAuxiliary runAux_
void writeProductDescriptionRegistry()
RootOutputFile(PoolOutputModule *om, std::string const &fileName, std::string const &logicalFileName)
ProductProvenanceVector runEntryInfoVector_
RootOutputTreePtrArray treePointers_
BranchListIndexes const * pBranchListIndexes_
IndexIntoFile::EntryNumber_t lumiEntryNumber_
RootOutputTree lumiTree_
boost::shared_ptr< TFile > filePtr_
RunAuxiliary const * pRunAux_
JobReport::Token reportToken_
ProductProvenanceVector lumiEntryInfoVector_
ProductProvenanceVector * pEventEntryInfoVector_