CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/FWCore/Sources/interface/DaqProvenanceHelper.h

Go to the documentation of this file.
00001 #ifndef FWCore_Sources_DaqProvenanceHelper_h
00002 #define FWCore_Sources_DaqProvenanceHelper_h
00003 
00004 #include <map>
00005 #include <string>
00006 #include <vector>
00007 
00008 #include "DataFormats/Provenance/interface/ConstBranchDescription.h"
00009 #include "DataFormats/Provenance/interface/ParentageID.h"
00010 #include "DataFormats/Provenance/interface/ProcessConfiguration.h"
00011 #include "DataFormats/Provenance/interface/ProcessHistoryID.h"
00012 #include "DataFormats/Provenance/interface/ProductProvenance.h"
00013 #include "DataFormats/Provenance/interface/BranchID.h"
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 
00016 namespace edm {
00017   class BranchChildren;
00018   struct DaqProvenanceHelper {
00019     typedef std::map<ProcessHistoryID, ProcessHistoryID> ProcessHistoryIDMap;
00020     typedef std::map<ParentageID, ParentageID> ParentageIDMap;
00021     explicit DaqProvenanceHelper(TypeID const& rawDataType);
00022     ProcessHistoryID daqInit(ProductRegistry& productRegistry) const;
00023     void saveInfo(BranchDescription const& oldBD, BranchDescription const& newBD) {
00024       oldProcessName_ = oldBD.processName();
00025       oldBranchID_ = oldBD.branchID();
00026       newBranchID_ = newBD.branchID();
00027     }
00028     void fixMetaData(std::vector<ProcessConfiguration>& pcv);
00029     void fixMetaData(std::vector<ProcessHistory>& phv);
00030     void fixMetaData(std::vector<BranchID>& branchIDs) const;
00031     void fixMetaData(BranchIDLists const&) const;
00032     void fixMetaData(BranchChildren& branchChildren) const;
00033     ProcessHistoryID const& mapProcessHistoryID(ProcessHistoryID const& phid);
00034     ParentageID const& mapParentageID(ParentageID const& phid) const;
00035     BranchID const& mapBranchID(BranchID const& branchID) const;
00036 
00037     ConstBranchDescription constBranchDescription_;
00038     ProductProvenance dummyProvenance_;
00039     ParameterSet processParameterSet_;
00040 
00041     std::string oldProcessName_;
00042     BranchID oldBranchID_;
00043     BranchID newBranchID_;
00044     ProcessHistoryID const* oldProcessHistoryID_;
00045     ProcessConfiguration processConfiguration_;
00046     ProcessHistoryIDMap phidMap_;
00047     ParentageIDMap parentageIDMap_;
00048   };
00049 }
00050 #endif