15 #include "TTreeCache.h"
25 void checkHistoryConsistency(Principal
const& primary, Principal
const& secondary) {
26 ProcessHistory
const& ph1 = primary.processHistory();
27 ProcessHistory
const& ph2 = secondary.processHistory();
30 "The secondary file is not an ancestor of the primary file\n";
33 void checkConsistency(EventPrincipal
const& primary, EventPrincipal
const& secondary) {
36 primary.id() <<
" has inconsistent EventAuxiliary data in the primary and secondary file\n";
39 void checkConsistency(LuminosityBlockAuxiliary
const& primary, LuminosityBlockAuxiliary
const& secondary) {
40 if (primary.id() != secondary.id()) {
42 primary.id() <<
" has inconsistent LuminosityBlockAuxiliary data in the primary and secondary file\n";
45 void checkConsistency(RunAuxiliary
const& primary, RunAuxiliary
const& secondary) {
46 if (primary.id() != secondary.id()) {
48 primary.id() <<
" has inconsistent RunAuxiliary data in the primary and secondary file\n";
55 rootServiceChecker_(),
59 secondaryRunPrincipal_(),
60 secondaryLumiPrincipal_(),
61 secondaryEventPrincipal_(secondaryFileSequence_ ? new
EventPrincipal(secondaryFileSequence_->fileProductRegistry(), processConfiguration()) : 0),
62 branchIDsToReplace_(),
63 numberOfEventsBeforeBigSkip_(0)
69 typedef ProductRegistry::ProductList::const_iterator const_iterator;
70 typedef ProductRegistry::ProductList::iterator iterator;
73 for (const_iterator it = secondary.begin(), itEnd = secondary.end(); it != itEnd; ++it) {
74 if (it->second.present()) {
75 idsToReplace[it->second.branchType()].insert(it->second.branchID());
77 iterator itFound = fullList.find(it->first);
78 if(itFound != fullList.end()) {
79 itFound->second.dropped()=
false;
83 for (const_iterator it = primary.begin(), itEnd = primary.end(); it != itEnd; ++it) {
84 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();
109 boost::shared_ptr<FileBlock>
122 boost::shared_ptr<RunAuxiliary>
127 boost::shared_ptr<LuminosityBlockAuxiliary>
132 boost::shared_ptr<RunPrincipal>
139 checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
146 <<
" Run " << primaryPrincipal->run()
147 <<
" is not found in the secondary input files\n";
149 return primaryPrincipal;
154 boost::shared_ptr<LuminosityBlockPrincipal>
157 boost::shared_ptr<LuminosityBlockPrincipal> primaryPrincipal =
primaryFileSequence_->readLuminosityBlock_(lbCache);
160 boost::shared_ptr<LuminosityBlockAuxiliary> secondaryAuxiliary =
secondaryFileSequence_->readLuminosityBlockAuxiliary_();
161 checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
168 <<
" Run " << primaryPrincipal->run()
169 <<
" LuminosityBlock " << primaryPrincipal->luminosityBlock()
170 <<
" is not found in the secondary input files\n";
172 return primaryPrincipal;
184 primaryPrincipal->
id().
event());
187 checkConsistency(*primaryPrincipal, *secondaryPrincipal);
188 checkHistoryConsistency(*primaryPrincipal, *secondaryPrincipal);
193 primaryPrincipal->
id() <<
" is not found in the secondary input files\n";
199 return primaryPrincipal;
205 if (!found)
return 0;
214 unsigned long toSkip =
receiver_->numberToSkip();
246 unsigned int numberToSkip =
receiver_->numberToSkip();
247 if(0 != numberToSkip) {
305 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_()