CMS 3D CMS Logo

StoredMergeableRunProductMetadata.cc
Go to the documentation of this file.
2 
3 namespace edm {
4 
6  allValidAndUseIndexIntoFile_(true) { }
7 
10  processesWithMergeableRunProducts_(processesWithMergeableRunProducts),
12 
14  beginProcess_(0),
15  endProcess_(0) { }
16 
18  unsigned long long iEndProcess) :
19  beginProcess_(iBeginProcess),
20  endProcess_(iEndProcess) { }
21 
23  beginLumi_(0),
24  endLumi_(0),
25  process_(0),
26  valid_(false),
27  useIndexIntoFile_(false) { }
28 
30  SingleRunEntryAndProcess(unsigned long long iBeginLumi,
31  unsigned long long iEndLumi,
32  unsigned int iProcess,
33  bool iValid,
34  bool iUseIndexIntoFile) :
35  beginLumi_(iBeginLumi),
36  endLumi_(iEndLumi),
37  process_(iProcess),
38  valid_(iValid),
39  useIndexIntoFile_(iUseIndexIntoFile) { }
40 
44  singleRunEntries_.clear();
46  lumis_.clear();
47  }
48  }
49 
51  getLumiContent(unsigned long long runEntry,
52  std::string const& process,
53  bool& valid,
54  std::vector<LuminosityBlockNumber_t>::const_iterator & lumisBegin,
55  std::vector<LuminosityBlockNumber_t>::const_iterator & lumisEnd) const {
56 
57  valid = true;
59  return false;
60  }
61 
62  SingleRunEntry const& singleRunEntry = singleRunEntries_.at(runEntry);
63  for (unsigned long long j = singleRunEntry.beginProcess(); j < singleRunEntry.endProcess(); ++j) {
64  SingleRunEntryAndProcess const& singleRunEntryAndProcess = singleRunEntryAndProcesses_.at(j);
65  // This string comparison could be optimized away by storing an index mapping in
66  // MergeableRunProductMetadata that gets recalculated each time a new input
67  // file is opened
68  if (processesWithMergeableRunProducts_.at(singleRunEntryAndProcess.process()) == process) {
69  valid = singleRunEntryAndProcess.valid();
70  if (singleRunEntryAndProcess.useIndexIntoFile()) {
71  return false;
72  } else {
73  lumisBegin = lumis_.begin() + singleRunEntryAndProcess.beginLumi();
74  lumisEnd = lumis_.begin() + singleRunEntryAndProcess.endLumi();
75  return true;
76  }
77  }
78  }
79  return false;
80  }
81 }
std::vector< std::string > const & processesWithMergeableRunProducts() const
std::vector< SingleRunEntryAndProcess > singleRunEntryAndProcesses_
static const uint16_t valid_
Definition: Constants.h:17
std::vector< LuminosityBlockNumber_t > lumis_
bool getLumiContent(unsigned long long runEntry, std::string const &process, bool &valid, std::vector< LuminosityBlockNumber_t >::const_iterator &lumisBegin, std::vector< LuminosityBlockNumber_t >::const_iterator &lumisEnd) const
HLT enums.