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 <array>
13 #include <map>
14 #include <string>
15 #include <vector>
16 
17 #include "boost/shared_ptr.hpp"
18 
34 
35 class TTree;
36 class TFile;
37 
38 namespace edm {
39  class ModuleCallingContext;
40  class PoolOutputModule;
41 
42 
44  public:
47  typedef std::array<RootOutputTree*, NumBranchTypes> RootOutputTreePtrArray;
49  std::string const& logicalFileName);
51  void writeOne(EventPrincipal const& e, ModuleCallingContext const*);
52  //void endFile();
54  void writeRun(RunPrincipal const& r, ModuleCallingContext const*);
56  void writeFileIdentifier();
57  void writeIndexIntoFile();
64 
65  void finishEndFile();
66  void beginInputFile(FileBlock const& fb, int remainingEvents);
68  bool shouldWeCloseFile() const;
69 
70  std::string const& fileName() const {return file_;}
71 
72  private:
73 
74  //-------------------------------
75  // Local types
76  //
77 
78  //-------------------------------
79  // Private functions
80 
81  void setBranchAliases(TTree* tree, SelectedProducts const& branches) const;
82 
84  Principal const& principal,
85  StoredProductProvenanceVector* productProvenanceVecPtr,
86  ModuleCallingContext const*);
87 
88  void insertAncestors(ProductProvenance const& iGetParents,
90  bool produced,
91  std::set<StoredProductProvenance>& oToFill,
92  ModuleCallingContext const*);
93 
95  std::set<StoredProductProvenance>& oToInsert);
96  //-------------------------------
97  // Member data
98 
105  boost::shared_ptr<TFile> filePtr_;
129  std::map<ParentageID,unsigned int> parentageIDs_;
130  std::set<BranchID> branchesWithStoredHistory_;
131  };
132 
133 }
134 
135 #endif
void fillBranches(BranchType const &branchType, Principal const &principal, StoredProductProvenanceVector *productProvenanceVecPtr, ModuleCallingContext const *)
void beginInputFile(FileBlock const &fb, int remainingEvents)
LuminosityBlockAuxiliary lumiAux_
void writeProcessHistoryRegistry()
std::array< RootOutputTree *, NumBranchTypes > RootOutputTreePtrArray
void writeRun(RunPrincipal const &r, ModuleCallingContext const *)
void writeOne(EventPrincipal const &e, ModuleCallingContext const *)
std::vector< OutputItem > OutputItemList
ProcessHistoryRegistry processHistoryRegistry_
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
std::map< ParentageID, unsigned int > parentageIDs_
RootOutputTree eventTree_
std::vector< BranchListIndex > BranchListIndexes
PoolOutputModule const * om_
IndexIntoFile::EntryNumber_t eventEntryNumber_
void insertAncestors(ProductProvenance const &iGetParents, EventPrincipal const &principal, bool produced, std::set< StoredProductProvenance > &oToFill, ModuleCallingContext const *)
LuminosityBlockAuxiliary const * pLumiAux_
PoolOutputModule::OutputItem OutputItem
std::string logicalFile_
PoolOutputModule::OutputItemList OutputItemList
std::size_t Token
Definition: JobReport.h:105
EventSelectionIDVector const * pEventSelectionIDs_
StoredProductProvenanceVector * pEventEntryInfoVector_
eventsetup::produce::Produce produced
Definition: ESProducts.cc:20
void setBranchAliases(TTree *tree, SelectedProducts const &branches) const
RootOutputTree runTree_
StoredProductProvenanceVector eventEntryInfoVector_
bool insertProductProvenance(const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
std::vector< StoredProductProvenance > StoredProductProvenanceVector
void respondToCloseInputFile(FileBlock const &fb)
IndexIntoFile indexIntoFile_
IndexIntoFile::EntryNumber_t runEntryNumber_
EventAuxiliary const * pEventAux_
RunAuxiliary runAux_
std::vector< BranchDescription const * > SelectedProducts
void writeProductDescriptionRegistry()
RootOutputFile(PoolOutputModule *om, std::string const &fileName, std::string const &logicalFileName)
RootOutputTreePtrArray treePointers_
BranchListIndexes const * pBranchListIndexes_
void writeLuminosityBlock(LuminosityBlockPrincipal const &lb, ModuleCallingContext const *)
IndexIntoFile::EntryNumber_t lumiEntryNumber_
RootOutputTree lumiTree_
boost::shared_ptr< TFile > filePtr_
RunAuxiliary const * pRunAux_
JobReport::Token reportToken_