test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
tuple lumi
Definition: fjr2json.py:35
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
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_