45 std::vector<edm::WrapperBase const*>& foundContainers,
46 std::vector<unsigned int>&
keys)
const {
72 std::vector<std::string>
const& iFileNames2,
73 bool useSecFileMapSorted)
81 event2_->setGetter(getter_);
86 std::cout <<
"------------------------------------------------------------------------" << std::endl;
87 std::cout <<
"WARNING! What you are about to do may be very slow." << std::endl;
88 std::cout <<
"The 2-file solution in FWLite works with very simple assumptions." << std::endl;
89 std::cout <<
"It will linearly search through the files in the secondary file list for Products." << std::endl;
90 std::cout <<
"There are speed improvements available to make this run faster." << std::endl;
91 std::cout <<
"***If your secondary files are sorted with a run-range within a file, (almost always the case) " << std::endl;
92 std::cout <<
"***please use the option useSecFileMapSorted=true in this constructor. " << std::endl;
93 std::cout <<
" > usage: MultiChainEvent(primaryFiles, secondaryFiles, true);" << std::endl;
94 std::cout <<
"------------------------------------------------------------------------" << std::endl;
100 std::cout <<
"------------------------------------------------------------------------" << std::endl;
101 std::cout <<
"This MultiChainEvent is now creating a (run_range)_2 ---> file_index_2 map" << std::endl;
102 std::cout <<
"for the 2-file solution. " << std::endl;
103 std::cout <<
"This is assuming the files you are giving me are sorted by run,event pairs within each secondary file." << std::endl;
104 std::cout <<
"If this is not true (rarely the case), set this option to false." << std::endl;
105 std::cout <<
" > usage: MultiChainEvent(primaryFiles, secondaryFiles, false);" << std::endl;
106 std::cout <<
"------------------------------------------------------------------------" << std::endl;
113 std::pair<event_id_range,Long64_t> eventRange;
116 bool foundAny =
false;
118 for(event2_->toBegin();
122 if (lastFile != event2_->getTFile()) {
132 eventRange.first.first = event2_->event()->id();
133 lastFile = event2_->getTFile();
139 eventRange.first.second = event2_->event()->id();
140 eventRange.second = event2_->eventIndex();
220 return event1_->to(run, lumi, event);
227 return to(run, 0U, event);
251 for (sec_file_range_index_map::const_iterator mBegin =
258 if (id < mit->
first.first ||
id > mit->first.second)
269 event2_->switchToFile(mit->second);
293 <<
" in secondary list. Exiting."
328 char const* iInstance,
329 char const* iProcess)
const
331 return event1_->getBranchNameFor(iType,iModule,iInstance,iProcess);
334 std::vector<edm::BranchDescription>
const&
337 return event1_->getBranchDescriptions();
340 std::vector<std::string>
const&
343 return event1_->getProcessHistory();
349 return event1_->processHistory();
355 return event1_->eventAuxiliary();
360 std::type_info
const& iType,
362 char const* iInstance,
363 char const* iProcess,
366 bool ret1 =
event1_->getByLabel(iType, iModule, iInstance, iProcess, iValue);
369 bool ret2 =
event2_->getByLabel(iType,iModule,iInstance,iProcess,iValue);
370 if (!ret2)
return false;
380 if (edp ==
nullptr) {
382 edp =
event2_->getByProductID(iID);
391 if (edp ==
nullptr) {
393 edp =
event2_->getThinnedProduct(pid, key);
399 std::vector<edm::WrapperBase const*>& wrappers,
400 std::vector<unsigned int>&
keys)
const {
402 event1_->getThinnedProducts(pid, wrappers, keys);
404 if(
std::find(wrappers.begin(), wrappers.end(),
nullptr) != wrappers.end()) {
406 event2_->getThinnedProducts(pid, wrappers, keys);
436 if (names != 0)
return *
names;
438 event1_->fillParameterSetRegistry();
440 if (names != 0)
return *
names;
445 event2_->fillParameterSetRegistry();
447 if (names != 0)
return *
names;
450 <<
"TriggerNames not found in ParameterSet registry";
458 hTriggerResults.
getByLabel(*
this,
"TriggerResults",
"",process.c_str());
459 if (!hTriggerResults.
isValid()) {
466 event1_->fillParameterSetRegistry();
472 event2_->fillParameterSetRegistry();
485 char const* iInstance,
486 char const* iProcess) {
std::vector< edm::BranchDescription > const & getBranchDescriptions() const
static const HistoName names[]
MultiProductGetter(MultiChainEvent const *iEvent)
MultiChainEvent const * event_
virtual ~MultiChainEvent()
unsigned long long EventNumber_t
edm::LuminosityBlockNumber_t luminosityBlock() const
virtual unsigned int transitionIndex_() const override
const MultiChainEvent & operator++()
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned int LuminosityBlockNumber_t
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
bool to(Long64_t iIndex)
Go to the event at index iIndex.
void getByLabel(const P &iP, const char *iModuleLabel, const char *iProductInstanceLabel=0, const char *iProcessLabel=0)
const MultiChainEvent & toBegin()
bool toSec(Long64_t iIndex)
Go to the event from secondary files at index iIndex.
virtual edm::WrapperBase const * getByProductID(edm::ProductID const &) const
edm::WrapperBase const * getThinnedProduct(edm::ProductID const &pid, unsigned int &key) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
std::shared_ptr< internal::MultiProductGetter > getter_
edm::ProcessHistory const & processHistory() const
bool useSecFileMapSorted_
std::vector< std::string > const & getProcessHistory() const
virtual void getThinnedProducts(edm::ProductID const &pid, std::vector< edm::WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
static std::string const triggerResults
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
sec_file_range_index_map secFileMapSorted_
virtual std::string const getBranchNameFor(std::type_info const &, char const *, char const *, char const *) const
virtual edm::WrapperBase const * getIt(edm::ProductID const &iID) const override
void getThinnedProducts(edm::ProductID const &pid, std::vector< edm::WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const
static TriggerNames const * triggerNames_(edm::TriggerResults const &triggerResults)
virtual edm::EventAuxiliary const & eventAuxiliary() const
MultiChainEvent(std::vector< std::string > const &iFileNames1, std::vector< std::string > const &iFileNames2, bool useSecFileMapSorted=false)
std::pair< edm::EventID, edm::EventID > event_id_range
virtual edm::TriggerResultsByName triggerResultsByName(std::string const &process) const
virtual edm::WrapperBase const * getThinnedProduct(edm::ProductID const &pid, unsigned int &key) const override
std::shared_ptr< ChainEvent > event2_
T const * product() const
virtual bool getByLabel(std::type_info const &, char const *, char const *, char const *, void *) const
std::shared_ptr< ChainEvent > event1_