00001 #ifndef FWCore_Framework_FileBlock_h
00002 #define FWCore_Framework_FileBlock_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "DataFormats/Provenance/interface/FileFormatVersion.h"
00013 #include "DataFormats/Provenance/interface/BranchChildren.h"
00014 class TTree;
00015 #include "boost/shared_ptr.hpp"
00016 #include <map>
00017 #include <string>
00018 #include <vector>
00019
00020 namespace edm {
00021 class BranchDescription;
00022 class FileBlock {
00023 public:
00024 FileBlock() :
00025 fileFormatVersion_(),
00026 tree_(0), metaTree_(0),
00027 lumiTree_(0), lumiMetaTree_(0),
00028 runTree_(0), runMetaTree_(0),
00029 fastCopyable_(false), fileName_(),
00030 branchChildren_(new BranchChildren) {}
00031
00032 FileBlock(FileFormatVersion const& version,
00033 TTree const* ev, TTree const* meta,
00034 TTree const* lumi, TTree const* lumiMeta,
00035 TTree const* run, TTree const* runMeta,
00036 bool fastCopy,
00037 std::string const& fileName,
00038 boost::shared_ptr<BranchChildren> branchChildren) :
00039 fileFormatVersion_(version),
00040 tree_(const_cast<TTree *>(ev)),
00041 metaTree_(const_cast<TTree *>(meta)),
00042 lumiTree_(const_cast<TTree *>(lumi)),
00043 lumiMetaTree_(const_cast<TTree *>(lumiMeta)),
00044 runTree_(const_cast<TTree *>(run)),
00045 runMetaTree_(const_cast<TTree *>(runMeta)),
00046 fastCopyable_(fastCopy),
00047 fileName_(fileName),
00048 branchChildren_(branchChildren) {}
00049
00050 ~FileBlock() {}
00051
00052 FileFormatVersion const& fileFormatVersion() const {return fileFormatVersion_;}
00053 TTree * const tree() const {return tree_;}
00054 TTree * const metaTree() const {return metaTree_;}
00055 TTree * const lumiTree() const {return lumiTree_;}
00056 TTree * const lumiMetaTree() const {return lumiMetaTree_;}
00057 TTree * const runTree() const {return runTree_;}
00058 TTree * const runMetaTree() const {return runMetaTree_;}
00059
00060 bool fastClonable() const {return fastCopyable_;}
00061 std::string const& fileName() const {return fileName_;}
00062
00063 void setNotFastCopyable() {fastCopyable_ = false;}
00064 BranchChildren const& branchChildren() const { return *branchChildren_; }
00065
00066 private:
00067 FileFormatVersion fileFormatVersion_;
00068
00069 TTree * tree_;
00070 TTree * metaTree_;
00071 TTree * lumiTree_;
00072 TTree * lumiMetaTree_;
00073 TTree * runTree_;
00074 TTree * runMetaTree_;
00075 bool fastCopyable_;
00076 std::string fileName_;
00077 boost::shared_ptr<BranchChildren> branchChildren_;
00078 };
00079 }
00080 #endif