27 void checkHistoryConsistency(Principal
const& primary, Principal
const& secondary) {
28 ProcessHistory
const& ph1 = primary.processHistory();
29 ProcessHistory
const& ph2 = secondary.processHistory();
32 "The secondary file is not an ancestor of the primary file\n";
35 void checkConsistency(EventPrincipal
const& primary, EventPrincipal
const& secondary) {
38 primary.id() <<
" has inconsistent EventAuxiliary data in the primary and secondary file\n";
41 void checkConsistency(LuminosityBlockAuxiliary
const& primary, LuminosityBlockAuxiliary
const& secondary) {
42 if(primary.id() != secondary.id()) {
44 primary.id() <<
" has inconsistent LuminosityBlockAuxiliary data in the primary and secondary file\n";
47 void checkConsistency(RunAuxiliary
const& primary, RunAuxiliary
const& secondary) {
48 if(primary.id() != secondary.id()) {
50 primary.id() <<
" has inconsistent RunAuxiliary data in the primary and secondary file\n";
57 rootServiceChecker_(),
63 secondaryRunPrincipal_(),
64 secondaryLumiPrincipal_(),
65 secondaryEventPrincipals_(),
66 branchIDsToReplace_() {
81 typedef ProductRegistry::ProductList::const_iterator const_iterator;
82 typedef ProductRegistry::ProductList::iterator iterator;
85 for(const_iterator it = secondary.begin(), itEnd = secondary.end(); it != itEnd; ++it) {
86 if(it->second.present()) {
87 idsToReplace[it->second.branchType()].insert(it->second.branchID());
89 iterator itFound = fullList.find(it->first);
90 if(itFound != fullList.end()) {
91 itFound->second.setDropped(
false);
95 for(const_iterator it = primary.begin(), itEnd = primary.end(); it != itEnd; ++it) {
96 if(it->second.present()) idsToReplace[it->second.branchType()].erase(it->second.branchID());
103 for(std::set<BranchID>::const_iterator it = idsToReplace[
i].
begin(), itEnd = idsToReplace[
i].
end();
121 std::unique_ptr<FileBlock>
127 return std::move(fb);
134 boost::shared_ptr<RunAuxiliary>
139 boost::shared_ptr<LuminosityBlockAuxiliary>
151 checkConsistency(runPrincipal.
aux(), *secondaryAuxiliary);
156 runPrincipal.
index()));
162 <<
" Run " << runPrincipal.
run()
163 <<
" is not found in the secondary input files\n";
174 boost::shared_ptr<LuminosityBlockAuxiliary> secondaryAuxiliary =
secondaryFileSequence_->readLuminosityBlockAuxiliary_();
175 checkConsistency(lumiPrincipal.
aux(), *secondaryAuxiliary);
180 lumiPrincipal.
index()));
186 <<
" Run " << lumiPrincipal.
run()
188 <<
" is not found in the secondary input files\n";
203 checkConsistency(eventPrincipal, secondaryEventPrincipal);
204 checkHistoryConsistency(eventPrincipal, secondaryEventPrincipal);
210 eventPrincipal.
id() <<
" is not found in the secondary input files\n";
218 if(!found)
return false;
307 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
unsigned int EventNumber_t
virtual bool goToEvent_(EventID const &eventID)
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_
StreamID streamID() const
RunAuxiliary const & aux() const
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 bool readOneRandomWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
virtual ItemType getNextItemType()
unsigned int numberOfStreams() const
virtual void skip(int offset)
virtual bool readOneSequentialWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
virtual void preForkReleaseResources()
virtual void readOneRandom(EventPrincipal &cache)
void recombine(Principal &other, std::vector< BranchID > const &bids)
virtual bool readOneSequential(EventPrincipal &cache)
std::vector< std::unique_ptr< EventPrincipal > > secondaryEventPrincipals_
tuple size
Write out results.
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)