CMS 3D CMS Logo

DuplicateChecker.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_DuplicateChecker_h
2 #define DataFormats_Provenance_DuplicateChecker_h
3 
4 
5 /*----------------------------------------------------------------------
6 
7 IOPool/Input/src/DuplicateChecker.h
8 
9 Used by PoolSource to detect events with
10 the same process history, run, lumi, and event number.
11 It is configurable whether it checks for duplicates
12 within the scope of each single input file or all input
13 files or does not check for duplicates at all.
14 
15 ----------------------------------------------------------------------*/
16 
20 
21 #include <memory>
22 #include <set>
23 #include <string>
24 #include <vector>
25 
26 
27 namespace edm {
28 
29  class ParameterSet;
31 
33  public:
34 
36 
37  void disable();
38 
39  void inputFileOpened(
40  bool realData,
41  IndexIntoFile const& indexIntoFile,
42  std::vector<std::shared_ptr<IndexIntoFile> > const& indexesIntoFiles,
43  std::vector<std::shared_ptr<IndexIntoFile> >::size_type currentIndexIntoFile);
44 
45  void inputFileClosed();
46 
48 
49  bool checkDisabled() const {
52  disabled_;
53  }
54 
55  // Note that all references to the ProcessHistoryID in this class are to
56  // the "reduced" process history, including the index argument to this function.
61  std::string const& fileName);
62 
64 
65  static void fillDescription(ParameterSetDescription & desc);
66 
67  private:
68 
70 
72 
74 
76 
77  // If checking the entire input for duplicates, then this holds
78  // events from previous files that duplicate events in the
79  // the current file. Plus it holds events that have been already
80  // processed in the current file. It is not used if there are
81  // no duplicates or duplicate checking has been disabled.
82  std::set<IndexIntoFile::IndexRunLumiEventKey> relevantPreviousEvents_;
83 
85 
86  bool disabled_;
87  };
88 }
89 #endif
bool checkDisabled() const
bool noDuplicatesInFile() const
unsigned long long EventNumber_t
static void fillDescription(ParameterSetDescription &desc)
bool isDuplicateAndCheckActive(int index, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, std::string const &fileName)
uint16_t size_type
unsigned int LuminosityBlockNumber_t
bool checkingAllFiles() const
HLT enums.
std::set< IndexIntoFile::IndexRunLumiEventKey > relevantPreviousEvents_
unsigned int RunNumber_t
DuplicateChecker(ParameterSet const &pset)
void inputFileOpened(bool realData, IndexIntoFile const &indexIntoFile, std::vector< std::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile)
DuplicateCheckMode duplicateCheckMode_
Definition: event.py:1