3 #include "cetlib_except/exception.h" 16 duplicateCheckMode_(checkEachRealDataFile)
19 , itIsKnownTheFileHasNoDuplicates_(false)
21 std::string
const& duplicateCheckMode = config().duplicateCheckMode();
23 if (duplicateCheckMode == std::string(
"noDuplicateCheck"))
25 else if (duplicateCheckMode == std::string(
"checkEachFile"))
27 else if (duplicateCheckMode == std::string(
"checkEachRealDataFile"))
29 else if (duplicateCheckMode == std::string(
"checkAllFilesOpened"))
33 <<
"Illegal configuration parameter value passed to RootInput for\n" 34 <<
"the \"duplicateCheckMode\" parameter, legal values are:\n" 35 <<
"\"noDuplicateCheck\", \"checkEachFile\", " 36 "\"checkEachRealDataFile\", \"checkAllFilesOpened\"\n";
79 std::string
const& fileName)
94 bool duplicate = !
eventIDs_.insert(eventID).second;
99 <<
"Duplicate Events found in entire set of input files.\n" 100 <<
"Both events were from " << eventID <<
".\n" 101 <<
"The duplicate was from file " << fileName <<
".\n" 102 <<
"The duplicate will be skipped.\n";
105 <<
"Duplicate Events found in file " << fileName <<
".\n" 106 <<
"Both events were " << eventID <<
".\n" 107 <<
"The duplicate will be skipped.\n";
void init(bool realData, FileIndex const &fileIndex)
DuplicateCheckMode duplicateCheckMode_
bool isDuplicateAndCheckActive(EventID const &eventID, std::string const &fileName)
bool itIsKnownTheFileHasNoDuplicates_
DuplicateChecker(fhicl::TableFragment< Config > const &config)
bool eventsUniqueAndOrdered() const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
std::set< EventID > eventIDs_
cet::coded_exception< error, detail::translate > exception