24 void checkHistoryConsistency(Principal
const& primary, Principal
const& secondary) {
25 ProcessHistory
const& ph1 = primary.processHistory();
26 ProcessHistory
const& ph2 = secondary.processHistory();
29 "The secondary file is not an ancestor of the primary file\n";
32 void checkConsistency(EventPrincipal
const& primary, EventPrincipal
const& secondary) {
35 primary.id() <<
" has inconsistent EventAuxiliary data in the primary and secondary file\n";
38 void checkConsistency(LuminosityBlockAuxiliary
const& primary, LuminosityBlockAuxiliary
const& secondary) {
39 if (primary.id() != secondary.id()) {
41 primary.id() <<
" has inconsistent LuminosityBlockAuxiliary data in the primary and secondary file\n";
44 void checkConsistency(RunAuxiliary
const& primary, RunAuxiliary
const& secondary) {
45 if (primary.id() != secondary.id()) {
47 primary.id() <<
" has inconsistent RunAuxiliary data in the primary and secondary file\n";
54 rootServiceChecker_(),
58 secondaryRunPrincipal_(),
59 secondaryLumiPrincipal_(),
60 secondaryEventPrincipal_(secondaryFileSequence_ ? new
EventPrincipal(secondaryFileSequence_->fileProductRegistry(), processConfiguration()) : 0),
61 branchIDsToReplace_(),
62 numberOfEventsBeforeBigSkip_(0)
68 typedef ProductRegistry::ProductList::const_iterator const_iterator;
69 typedef ProductRegistry::ProductList::iterator iterator;
72 for (const_iterator it = secondary.begin(), itEnd = secondary.end(); it != itEnd; ++it) {
73 if (it->second.present()) {
74 idsToReplace[it->second.branchType()].insert(it->second.branchID());
76 iterator itFound = fullList.find(it->first);
77 if(itFound != fullList.end()) {
78 itFound->second.dropped()=
false;
82 for (const_iterator it = primary.begin(), itEnd = primary.end(); it != itEnd; ++it) {
83 if (it->second.present()) idsToReplace[it->second.branchType()].erase(it->second.branchID());
91 for (std::set<BranchID>::const_iterator it = idsToReplace[
i].
begin(), itEnd = idsToReplace[
i].
end();
108 boost::shared_ptr<FileBlock>
121 boost::shared_ptr<RunAuxiliary>
126 boost::shared_ptr<LuminosityBlockAuxiliary>
131 boost::shared_ptr<RunPrincipal>
138 checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
145 <<
" Run " << primaryPrincipal->run()
146 <<
" is not found in the secondary input files\n";
148 return primaryPrincipal;
153 boost::shared_ptr<LuminosityBlockPrincipal>
156 boost::shared_ptr<LuminosityBlockPrincipal> primaryPrincipal =
primaryFileSequence_->readLuminosityBlock_(lbCache);
159 boost::shared_ptr<LuminosityBlockAuxiliary> secondaryAuxiliary =
secondaryFileSequence_->readLuminosityBlockAuxiliary_();
160 checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
167 <<
" Run " << primaryPrincipal->run()
168 <<
" LuminosityBlock " << primaryPrincipal->luminosityBlock()
169 <<
" is not found in the secondary input files\n";
171 return primaryPrincipal;
183 primaryPrincipal->
id().
event());
186 checkConsistency(*primaryPrincipal, *secondaryPrincipal);
187 checkHistoryConsistency(*primaryPrincipal, *secondaryPrincipal);
192 primaryPrincipal->
id() <<
" is not found in the secondary input files\n";
198 return primaryPrincipal;
204 if (!found)
return 0;
213 unsigned long toSkip =
receiver_->numberToSkip();
245 unsigned int numberToSkip =
receiver_->numberToSkip();
246 if(0 != numberToSkip) {
304 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 void readMany_(int number, EventPrincipalVector &result)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
virtual ProcessingController::ForwardState forwardState_() const
virtual boost::shared_ptr< LuminosityBlockPrincipal > readLuminosityBlock_(boost::shared_ptr< LuminosityBlockPrincipal > lbCache)
virtual void readManySpecified_(std::vector< EventID > const &events, EventPrincipalVector &result)
virtual bool goToEvent_(EventID const &eventID)
virtual boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > rpCache)
std::map< BranchKey, BranchDescription > ProductList
EventID const & id() const
LuminosityBlockNumber_t luminosityBlock() const
virtual void readManyRandom_(int number, EventPrincipalVector &result, unsigned int &fileSeqNumber)
boost::scoped_ptr< EventPrincipal > secondaryEventPrincipal_
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_
unsigned int numberOfEventsBeforeBigSkip_
virtual EventPrincipal * readEvent_()
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
virtual void readManySequential_(int number, EventPrincipalVector &result, unsigned int &fileSeqNumber)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
virtual void postForkReacquireResources(boost::shared_ptr< edm::multicore::MessageReceiverForSource >)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
boost::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
ProductList & productListUpdator()
boost::scoped_ptr< RootInputFileSequence > primaryFileSequence_
virtual void closeFile_()
boost::shared_ptr< edm::multicore::MessageReceiverForSource > receiver_
virtual ItemType getNextItemType()
virtual void skip(int offset)
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
boost::scoped_ptr< RootInputFileSequence > secondaryFileSequence_
virtual void preForkReleaseResources()
virtual boost::shared_ptr< FileBlock > readFile_()
virtual EventPrincipal * readIt(EventID const &id)
void recombine(Principal &other, std::vector< BranchID > const &bids)
tuple size
Write out results.
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()