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 IOPool/Input/src/DuplicateChecker.h
7 
8 Used by PoolSource to detect events with
9 the same process history, run, lumi, and event number.
10 It is configurable whether it checks for duplicates
11 within the scope of each single input file or all input
12 files or does not check for duplicates at all.
13 
14 ----------------------------------------------------------------------*/
15 
19 
20 #include <memory>
21 #include <set>
22 #include <string>
23 #include <vector>
24 
25 namespace edm {
26 
27  class ParameterSet;
29 
31  public:
33 
34  void disable();
35 
36  void inputFileOpened(bool realData,
37  IndexIntoFile const& indexIntoFile,
38  std::vector<std::shared_ptr<IndexIntoFile> > const& indexesIntoFiles,
39  std::vector<std::shared_ptr<IndexIntoFile> >::size_type currentIndexIntoFile);
40 
41  void inputFileClosed();
42 
44 
45  bool checkDisabled() const {
48  }
49 
50  // Note that all references to the ProcessHistoryID in this class are to
51  // the "reduced" process history, including the index argument to this function.
54 
56 
57  static void fillDescription(ParameterSetDescription& desc);
58 
59  private:
61 
63 
65 
67 
68  // If checking the entire input for duplicates, then this holds
69  // events from previous files that duplicate events in the
70  // the current file. Plus it holds events that have been already
71  // processed in the current file. It is not used if there are
72  // no duplicates or duplicate checking has been disabled.
73  std::set<IndexIntoFile::IndexRunLumiEventKey> relevantPreviousEvents_;
74 
76 
77  bool disabled_;
78  };
79 } // namespace edm
80 #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