29 void checkHistoryConsistency(Principal
const& primary, Principal
const& secondary) {
30 ProcessHistory
const& ph1 = primary.processHistory();
31 ProcessHistory
const& ph2 = secondary.processHistory();
34 "The secondary file is not an ancestor of the primary file\n";
37 void checkConsistency(EventPrincipal
const& primary, EventPrincipal
const& secondary) {
40 primary.id() <<
" has inconsistent EventAuxiliary data in the primary and secondary file\n";
43 void checkConsistency(LuminosityBlockAuxiliary
const& primary, LuminosityBlockAuxiliary
const& secondary) {
44 if(primary.id() != secondary.id()) {
46 primary.id() <<
" has inconsistent LuminosityBlockAuxiliary data in the primary and secondary file\n";
49 void checkConsistency(RunAuxiliary
const& primary, RunAuxiliary
const& secondary) {
50 if(primary.id() != secondary.id()) {
52 primary.id() <<
" has inconsistent RunAuxiliary data in the primary and secondary file\n";
59 rootServiceChecker_(),
65 secondaryRunPrincipal_(),
66 secondaryLumiPrincipal_(),
67 secondaryEventPrincipals_(),
68 branchIDsToReplace_(),
69 resourceSharedWithDelayedReaderPtr_(primary()?
74 unsigned int nStreams = desc.allocations_->numberOfStreams();
87 typedef ProductRegistry::ProductList::const_iterator const_iterator;
88 typedef ProductRegistry::ProductList::iterator iterator;
91 for(const_iterator it = secondary.begin(), itEnd = secondary.end(); it != itEnd; ++it) {
92 if(it->second.present()) {
93 idsToReplace[it->second.branchType()].insert(it->second.branchID());
95 iterator itFound = fullList.find(it->first);
96 if(itFound != fullList.end()) {
97 itFound->second.setDropped(
false);
101 for(const_iterator it = primary.begin(), itEnd = primary.end(); it != itEnd; ++it) {
102 if(it->second.present()) idsToReplace[it->second.branchType()].erase(it->second.branchID());
109 for(std::set<BranchID>::const_iterator it = idsToReplace[
i].
begin(), itEnd = idsToReplace[
i].
end();
127 std::unique_ptr<FileBlock>
133 return std::move(fb);
140 boost::shared_ptr<RunAuxiliary>
145 boost::shared_ptr<LuminosityBlockAuxiliary>
157 checkConsistency(runPrincipal.
aux(), *secondaryAuxiliary);
162 runPrincipal.
index()));
168 <<
" Run " << runPrincipal.
run()
169 <<
" is not found in the secondary input files\n";
180 boost::shared_ptr<LuminosityBlockAuxiliary> secondaryAuxiliary =
secondaryFileSequence_->readLuminosityBlockAuxiliary_();
181 checkConsistency(lumiPrincipal.
aux(), *secondaryAuxiliary);
186 lumiPrincipal.
index()));
192 <<
" Run " << lumiPrincipal.
run()
194 <<
" is not found in the secondary input files\n";
209 checkConsistency(eventPrincipal, secondaryEventPrincipal);
210 checkHistoryConsistency(eventPrincipal, secondaryEventPrincipal);
216 eventPrincipal.
id() <<
" is not found in the secondary input files\n";
224 if(!found)
return false;
318 descriptions.
add(
"source", desc);
virtual boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
PoolSource(ParameterSet const &pset, InputSourceDescription const &desc)
EventNumber_t event() const
SharedResourcesAcquirer createAcquirerForSourceDelayedReader()
bool isSameEvent(EventAuxiliary const &a, EventAuxiliary const &b)
std::unique_ptr< SharedResourcesAcquirer > resourceSharedWithDelayedReaderPtr_
virtual std::unique_ptr< FileBlock > readFile_()
virtual ProcessingController::ForwardState forwardState_() const
unsigned int EventNumber_t
virtual bool goToEvent_(EventID const &eventID)
virtual void readOneRandom(EventPrincipal &cache, CLHEP::HepRandomEngine *) override
std::map< BranchKey, BranchDescription > ProductList
EventID const & id() const
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
LuminosityBlockAuxiliary const & aux() const
void mergeProvenanceRetrievers(EventPrincipal const &other)
LuminosityBlockIndex index() const
LuminosityBlockNumber_t luminosityBlock() const
unsigned int LuminosityBlockNumber_t
static EventNumber_t const invalidEvent
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)
void setComment(std::string const &value)
bool isAncestor(ProcessHistory const &a, ProcessHistory const &b)
LuminosityBlockNumber_t luminosityBlock() const
virtual bool randomAccess_() const
static RunNumber_t const invalidRun
virtual ProcessingController::ReverseState reverseState_() const
boost::shared_ptr< RunPrincipal > secondaryRunPrincipal_
static SharedResourcesRegistry * instance()
StreamID streamID() const
RunAuxiliary const & aux() const
SharedResourcesAcquirer * resourceSharedWithDelayedReader_() const override
unsigned int offset(bool)
virtual void readRun_(RunPrincipal &runPrincipal)
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)
unsigned int value() const
virtual void readOneSpecified(EventPrincipal &cache, EventID const &id)
static LuminosityBlockNumber_t const invalidLumi
virtual bool readIt(EventID const &id, EventPrincipal &eventPrincipal, StreamContext &streamContext) override
virtual void readEvent_(EventPrincipal &eventPrincipal)
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 ItemType getNextItemType()
virtual void skip(int offset)
virtual bool readOneSequentialWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
virtual void preForkReleaseResources()
void recombine(Principal &other, std::vector< BranchID > const &bids)
virtual bool readOneSequential(EventPrincipal &cache)
virtual bool readOneRandomWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID, CLHEP::HepRandomEngine *) override
std::vector< std::unique_ptr< EventPrincipal > > secondaryEventPrincipals_
tuple size
Write out results.
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)