LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
DuplicateChecker.h
Go to the documentation of this file.
1 #ifndef art_Framework_IO_Root_DuplicateChecker_h
2 #define art_Framework_IO_Root_DuplicateChecker_h
3 
4 // ======================================================================
5 //
6 // DuplicateChecker - Used by RootInput to detect events with the same
7 // run and event number.
8 //
9 // The class can be configured to check for duplicates
10 // - within the scope of each single input file, or
11 // - all input files, or
12 // - not at all.
13 //
14 // ======================================================================
15 
18 #include "fhiclcpp/types/Atom.h"
20 #include <set>
21 #include <string>
22 
23 // ----------------------------------------------------------------------
24 
25 namespace art {
26 
27  class FileIndex;
28 
30  public:
31  struct Config {
33  fhicl::Name("duplicateCheckMode"),
34  "checkEachRealDataFile"};
35  };
36 
38 
39  void init(bool realData, FileIndex const& fileIndex);
40 
41  void inputFileClosed();
42 
43  void rewind();
44 
45  bool isDuplicateAndCheckActive(EventID const& eventID,
46  std::string const& fileName);
47 
48  private:
54  };
55 
57 
59 
61 
62  std::set<EventID> eventIDs_;
63 
65  }; // DuplicateChecker
66 
67 } // art
68 
69  // ======================================================================
70 
71 #endif /* art_Framework_IO_Root_DuplicateChecker_h */
72 
73 // Local Variables:
74 // mode: c++
75 // End:
void init(bool realData, FileIndex const &fileIndex)
DuplicateCheckMode duplicateCheckMode_
bool isDuplicateAndCheckActive(EventID const &eventID, std::string const &fileName)
fhicl::Atom< std::string > duplicateCheckMode
DuplicateChecker(fhicl::TableFragment< Config > const &config)
HLT enums.
std::set< EventID > eventIDs_