26 void checkHistoryConsistency(Principal
const& primary, Principal
const& secondary) {
27 ProcessHistory
const& ph1 = primary.processHistory();
28 ProcessHistory
const& ph2 = secondary.processHistory();
31 "The secondary file is not an ancestor of the primary file\n";
34 void checkConsistency(EventPrincipal
const& primary, EventPrincipal
const& secondary) {
37 primary.id() <<
" has inconsistent EventAuxiliary data in the primary and secondary file\n";
40 void checkConsistency(LuminosityBlockAuxiliary
const& primary, LuminosityBlockAuxiliary
const& secondary) {
41 if(primary.id() != secondary.id()) {
43 primary.id() <<
" has inconsistent LuminosityBlockAuxiliary data in the primary and secondary file\n";
46 void checkConsistency(RunAuxiliary
const& primary, RunAuxiliary
const& secondary) {
47 if(primary.id() != secondary.id()) {
49 primary.id() <<
" has inconsistent RunAuxiliary data in the primary and secondary file\n";
56 rootServiceChecker_(),
61 secondaryRunPrincipal_(),
62 secondaryLumiPrincipal_(),
63 secondaryEventPrincipal_(secondaryFileSequence_ ? new
EventPrincipal(secondaryFileSequence_->fileProductRegistry(), secondaryFileSequence_->fileBranchIDListHelper(), processConfiguration(),
nullptr) : 0),
64 branchIDsToReplace_() {
70 typedef ProductRegistry::ProductList::const_iterator const_iterator;
71 typedef ProductRegistry::ProductList::iterator iterator;
74 for(const_iterator it = secondary.begin(), itEnd = secondary.end(); it != itEnd; ++it) {
75 if(it->second.present()) {
76 idsToReplace[it->second.branchType()].insert(it->second.branchID());
78 iterator itFound = fullList.find(it->first);
79 if(itFound != fullList.end()) {
80 itFound->second.dropped()=
false;
84 for(const_iterator it = primary.begin(), itEnd = primary.end(); it != itEnd; ++it) {
85 if(it->second.present()) idsToReplace[it->second.branchType()].erase(it->second.branchID());
92 for(std::set<BranchID>::const_iterator it = idsToReplace[
i].
begin(), itEnd = idsToReplace[
i].
end();
110 std::unique_ptr<FileBlock>
116 return std::move(fb);
123 boost::shared_ptr<RunAuxiliary>
128 boost::shared_ptr<LuminosityBlockAuxiliary>
133 boost::shared_ptr<RunPrincipal>
136 boost::shared_ptr<RunPrincipal> primaryPrincipal =
primaryFileSequence_->readRun_(runPrincipal);
140 checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
147 <<
" Run " << primaryPrincipal->run()
148 <<
" is not found in the secondary input files\n";
150 return primaryPrincipal;
155 boost::shared_ptr<LuminosityBlockPrincipal>
158 boost::shared_ptr<LuminosityBlockPrincipal> primaryPrincipal =
primaryFileSequence_->readLuminosityBlock_(lumiPrincipal);
161 boost::shared_ptr<LuminosityBlockAuxiliary> secondaryAuxiliary =
secondaryFileSequence_->readLuminosityBlockAuxiliary_();
162 checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
169 <<
" Run " << primaryPrincipal->run()
170 <<
" LuminosityBlock " << primaryPrincipal->luminosityBlock()
171 <<
" is not found in the secondary input files\n";
173 return primaryPrincipal;
185 primaryPrincipal->
id().
event());
188 checkConsistency(*primaryPrincipal, *secondaryPrincipal);
189 checkHistoryConsistency(*primaryPrincipal, *secondaryPrincipal);
195 primaryPrincipal->
id() <<
" is not found in the secondary input files\n";
198 return primaryPrincipal;
280 descriptions.
add(
"source", desc);
virtual boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
PoolSource(ParameterSet const &pset, InputSourceDescription const &desc)
EventNumber_t event() const
bool isSameEvent(EventAuxiliary const &a, EventAuxiliary const &b)
virtual std::unique_ptr< FileBlock > readFile_()
virtual ProcessingController::ForwardState forwardState_() const
virtual EventPrincipal * readIt(EventID const &id, EventPrincipal &eventPrincipal)
virtual boost::shared_ptr< LuminosityBlockPrincipal > readLuminosityBlock_(boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal)
virtual bool goToEvent_(EventID const &eventID)
std::map< BranchKey, BranchDescription > ProductList
EventID const & id() const
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
LuminosityBlockNumber_t luminosityBlock() const
virtual EventPrincipal * readOneSequential(EventPrincipal &cache)
virtual EventPrincipal * readOneRandomWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
virtual EventPrincipal * readOneSpecified(EventPrincipal &cache, EventID const &id)
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)
void setComment(std::string const &value)
bool isAncestor(ProcessHistory const &a, ProcessHistory const &b)
virtual bool randomAccess_() const
virtual ProcessingController::ReverseState reverseState_() const
boost::shared_ptr< RunPrincipal > secondaryRunPrincipal_
std::unique_ptr< EventPrincipal > secondaryEventPrincipal_
void mergeMappers(EventPrincipal const &other)
unsigned int offset(bool)
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
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual EventPrincipal * readOneRandom(EventPrincipal &cache)
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ProductList & productListUpdator()
virtual void closeFile_()
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
virtual EventPrincipal * readOneSequentialWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
virtual ItemType getNextItemType()
virtual void skip(int offset)
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
virtual void preForkReleaseResources()
void recombine(Principal &other, std::vector< BranchID > const &bids)
virtual boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > runPrincipal)
tuple size
Write out results.
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
virtual EventPrincipal * readEvent_(EventPrincipal &eventPrincipal)