CMS 3D CMS Logo

CommonProvenanceFiller.cc
Go to the documentation of this file.
2 
9 
10 #include "TBranch.h"
11 #include "TTree.h"
12 
13 #include <cassert>
14 #include <utility>
15 
16 namespace edm {
17 
18  void fillParameterSetBranch(TTree* parameterSetsTree, int basketSize) {
19  std::pair<ParameterSetID, ParameterSetBlob> idToBlob;
20  std::pair<ParameterSetID, ParameterSetBlob>* pIdToBlob = &idToBlob;
21  TBranch* b =
22  parameterSetsTree->Branch(poolNames::idToParameterSetBlobsBranchName().c_str(), &pIdToBlob, basketSize, 0);
23 
24  for (auto const& pset : *pset::Registry::instance()) {
25  idToBlob.first = pset.first;
26  idToBlob.second.pset() = pset.second.toString();
27 
28  b->Fill();
29  }
30  }
31 
32  void fillProcessHistoryBranch(TTree* metaDataTree,
33  int basketSize,
34  ProcessHistoryRegistry const& processHistoryRegistry) {
35  ProcessHistoryVector procHistoryVector;
36  for (auto const& ph : processHistoryRegistry) {
37  procHistoryVector.push_back(ph.second);
38  }
39  ProcessHistoryVector* p = &procHistoryVector;
40  TBranch* b = metaDataTree->Branch(poolNames::processHistoryBranchName().c_str(), &p, basketSize, 0);
41  assert(b);
42  b->Fill();
43  }
44 
45 } // namespace edm
edm::poolNames::idToParameterSetBlobsBranchName
std::string const & idToParameterSetBlobsBranchName()
Definition: BranchType.cc:218
edm::pset::Registry::instance
static Registry * instance()
Definition: Registry.cc:12
edm
HLT enums.
Definition: AlignableModifier.h:19
ParameterSetBlob.h
cms::cuda::assert
assert(be >=bs)
ProcessHistoryRegistry.h
CommonProvenanceFiller.h
edm::poolNames::processHistoryBranchName
std::string const & processHistoryBranchName()
Definition: BranchType.cc:177
edm::fillParameterSetBranch
void fillParameterSetBranch(TTree *parameterSetsTree, int basketSize)
Definition: CommonProvenanceFiller.cc:18
b
double b
Definition: hdecay.h:118
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ProcessHistoryVector
std::vector< ProcessHistory > ProcessHistoryVector
Definition: ProcessHistoryRegistry.h:16
BranchType.h
Registry.h
edm::fillProcessHistoryBranch
void fillProcessHistoryBranch(TTree *metaDataTree, int basketSize, ProcessHistoryRegistry const &processHistoryRegistry)
Definition: CommonProvenanceFiller.cc:32
edm::ProcessHistoryRegistry
Definition: ProcessHistoryRegistry.h:18
ParameterSetID.h
ParameterSet.h
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27