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 <memory>
18 
34 
35 class TTree;
36 class TFile;
37 class TClass;
38 
39 namespace edm {
40  class ModuleCallingContext;
41  class PoolOutputModule;
42 
43 
45  public:
48  typedef std::array<RootOutputTree*, NumBranchTypes> RootOutputTreePtrArray;
50  std::string const& logicalFileName);
52  void writeOne(EventPrincipal const& e, ModuleCallingContext const*);
53  //void endFile();
55  void writeRun(RunPrincipal const& r, ModuleCallingContext const*);
57  void writeFileIdentifier();
58  void writeIndexIntoFile();
66 
67  void finishEndFile();
68  void beginInputFile(FileBlock const& fb, int remainingEvents);
70  bool shouldWeCloseFile() const;
71 
72  std::string const& fileName() const {return file_;}
73 
74  private:
75 
76  //-------------------------------
77  // Local types
78  //
79 
80  //-------------------------------
81  // Private functions
82 
83  void setBranchAliases(TTree* tree, SelectedProducts const& branches) const;
84 
86  Principal const& principal,
87  StoredProductProvenanceVector* productProvenanceVecPtr,
88  ModuleCallingContext const*);
89 
90  void insertAncestors(ProductProvenance const& iGetParents,
92  bool produced,
93  std::set<StoredProductProvenance>& oToFill,
94  ModuleCallingContext const*);
95 
97  std::set<StoredProductProvenance>& oToInsert);
98  //-------------------------------
99  // Member data
100 
107  std::shared_ptr<TFile> filePtr_;
131  std::map<ParentageID,unsigned int> parentageIDs_;
132  std::set<BranchID> branchesWithStoredHistory_;
134  };
135 
136 }
137 
138 #endif
void fillBranches(BranchType const &branchType, Principal const &principal, StoredProductProvenanceVector *productProvenanceVecPtr, ModuleCallingContext const *)
void beginInputFile(FileBlock const &fb, int remainingEvents)
LuminosityBlockAuxiliary lumiAux_
std::shared_ptr< TFile > filePtr_
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
void writeThinnedAssociationsHelper()
std::map< ParentageID, unsigned int > parentageIDs_
RootOutputTree eventTree_
std::vector< BranchListIndex > BranchListIndexes
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 * om_
PoolOutputModule::OutputItemList OutputItemList
std::size_t Token
Definition: JobReport.h:106
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_
RunAuxiliary const * pRunAux_
JobReport::Token reportToken_