67 void set(std::shared_ptr<ProductRegistry const> iReg) { reg_ = iReg;}
72 return std::auto_ptr<EventEntryDescription>();
78 std::shared_ptr<ProductRegistry const>(reg_);
81 std::unique_ptr<WrapperBase>
86 std::unique_ptr<WrapperBase>
88 ProductRegistry::ProductList::const_iterator itFind= reg_->productList().find(k);
89 if(itFind == reg_->productList().end()) {
95 if(
nullptr == branch) {
97 <<
"could not find branch named '" << bDesc.
branchName() <<
"'"
98 <<
"\n Perhaps the data being requested was not saved in this file?";
103 if(!
bool(classType)) {
105 <<
"could not find dictionary for type '" << fullName <<
"'"
106 <<
"\n Please make sure all the necessary libraries are available.";
111 if(
nullptr == wrapperObj.
address()) {
112 throw cms::Exception(
"FailedToCreate") <<
"could not create an instance of '" << fullName <<
"'";
114 void* address = wrapperObj.
address();
115 branch->SetAddress(&address);
120 if(
nullptr == prod) {
122 <<
"failed to convert a '" << fullName
123 <<
"' to a edm::WrapperBase."
124 <<
"Please contact developers since something is very wrong.";
127 return std::unique_ptr<WrapperBase>(
prod);
155 std::shared_ptr<ProductRegistry>
reg_;
156 std::shared_ptr<ProcessHistoryRegistry>
phreg_;
161 std::vector<EventEntryDescription>
prov_;
167 std::shared_ptr<edm::EventPrincipal>
ep_;
186 everythingOK_(
false) {
226 if(iTree ==
nullptr)
return;
236 if(
nullptr ==
m_->tree_) {
240 TFile*
file =
m_->tree_->GetCurrentFile();
241 if(
nullptr == file) {
243 TChain*
chain =
dynamic_cast<TChain*
>(
m_->tree_);
244 if(
nullptr == chain) {
248 file = chain->GetFile();
249 if(
nullptr == file) {
278 branch->SetAddress(&pAux);
279 branch->GetEntry(iEntry);
291 if(!eventSelectionsBranch) {
293 <<
"Failed to find event Selections branch in event tree";
295 eventSelectionsBranch->SetAddress(&pEventSelectionIDVector);
296 eventSelectionsBranch->GetEntry(iEntry);
301 if(!branchListIndexBranch) {
303 <<
"Failed to find branch list index branch in event tree";
305 branchListIndexBranch->SetAddress(&pBranchListIndexes);
306 branchListIndexBranch->GetEntry(iEntry);
307 m_->branchIDListHelper_->fixBranchListIndexes(branchListIndexes);
310 m_->reader_->setEntry(iEntry);
311 auto runAux = std::make_shared<edm::RunAuxiliary>(aux.
run(), aux.
time(), aux.
time());
312 auto rp = std::make_shared<edm::RunPrincipal>(runAux,
m_->reg_,
m_->pc_,
nullptr, 0);
313 auto lumiAux = std::make_shared<edm::LuminosityBlockAuxiliary>(rp->run(), 1, aux.
time(), aux.
time());
314 auto lbp = std::make_shared<edm::LuminosityBlockPrincipal>(lumiAux,
m_->reg_,
m_->pc_,
nullptr, 0);
315 m_->ep_->fillEventPrincipal(*eaux,
317 std::move(eventSelectionIDs),
318 std::move(branchListIndexes),
319 *(
m_->provRetriever_),
321 lbp->setRunPrincipal(rp);
322 m_->ep_->setLuminosityBlockPrincipal(lbp);
323 m_->processNames_ =
m_->ep_->processHistory();
328 Operate sentry(
m_->ep_->prodGetter());
331 std::cout <<
"While processing entry " << iEntry <<
" the following exception was caught \n"
332 << iEx.what() << std::endl;
334 std::cout <<
"While processing entry " << iEntry <<
" an unknown exception was caught" << std::endl;
371 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob> PsetMap;
373 PsetMap *psetMapPtr = &psetMap;
378 if(
nullptr == psetTree) {
380 <<
" in the input file.\n";
382 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
384 IdToBlobs* pIdToBlob = &idToBlob;
386 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
387 psetTree->GetEntry(
i);
388 psetMap.insert(idToBlob);
405 auto branchIDListsHelper = std::make_shared<edm::BranchIDListHelper>();
411 metaDataTree->GetEntry(0);
413 for(
auto&
prod :
m_->reg_->productListUpdator()) {
419 for(
auto const& entry : psetMap) {
421 pset.
setID(entry.first);
425 for(
auto const& ph : pHistVector) {
426 m_->phreg_->registerProcessHistory(ph);
429 m_->pointerToBranchBuffer_.erase(
m_->pointerToBranchBuffer_.begin(),
430 m_->pointerToBranchBuffer_.end());
436 for(
auto& item : prodList) {
441 newReg->copyProduct(prod);
443 if(
m_->fileFormatVersion_.splitProductIDs()) {
445 <<
"Cannot change friendly class name algorithm without more development work\n"
446 <<
"to update BranchIDLists. Contact the framework group.\n";
450 newReg->copyProduct(newBD);
455 m_->reg_.reset(newReg.release());
461 m_->pointerToBranchBuffer_.reserve(prodList2.size());
463 for(
auto& item : prodList2) {
468 if(
m_->tree_->GetBranch(prod.
branchName().c_str()) ==
nullptr) {
480 m_->branchIDListHelper_->updateFromInput(*branchIDListsPtr);
481 m_->reg_->setFrozen();
void setID(ParameterSetID const &id)
std::string const & idToParameterSetBlobsBranchName()
virtual void terminate(TList &out)=0
std::vector< ProcessConfiguration > ProcessConfigurationVector
virtual void mergeReaders_(DelayedReader *) override
std::string const & branchName() const
std::shared_ptr< edm::EventPrincipal > ep_
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
BranchType const & branchType() const
virtual ~TFWLiteSelectorBasic()
std::vector< BranchIDList > BranchIDLists
std::vector< EventEntryDescription * > pointerToBranchBuffer_
void setTree(TTree *iTree)
virtual void preProcessing(const TList *in, TList &out)=0
std::vector< EventEntryDescription > prov_
std::shared_ptr< FWLiteDelayedReader > reader_
ObjectWithDict castObject(TypeWithDict const &) const
std::map< BranchKey, BranchDescription > ProductList
virtual void SlaveTerminate()
virtual std::auto_ptr< EventEntryDescription > getProvenance_(BranchKey const &) const
virtual Bool_t Process(Long64_t)
std::shared_ptr< ProcessHistoryRegistry > phreg_
Timestamp const & time() const
void setRefCoreStreamer(bool resetAll=false)
virtual void SlaveBegin(TTree *)
std::string const & fileFormatVersionBranchName()
virtual void postProcessing(TList &out)=0
std::unique_ptr< WrapperBase > getTheProduct(BranchKey const &k) const
std::string const & eventSelectionsBranchName()
edm::ModuleDescription md_
virtual void process(const edm::Event &event)=0
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & parameterSetsTreeName()
std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper_
static TypeWithDict byName(std::string const &name)
std::shared_ptr< BranchIDListHelper > branchIDListHelper_
FileFormatVersion fileFormatVersion_
std::vector< BranchListIndex > BranchListIndexes
std::string const & className() const
std::string friendlyName(std::string const &iFullName)
std::string const & friendlyClassName() const
void setDropped(bool isDropped)
void updateFriendlyClassName()
std::string const & metaDataTreeName()
edm::ProcessConfiguration pc_
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
std::string const & parameterSetMapBranchName()
void set(std::shared_ptr< ProductRegistry const > iReg)
virtual std::unique_ptr< WrapperBase > getProduct_(BranchKey const &k, EDProductGetter const *ep) const override
ProcessHistoryVector vector_type
std::string const & processHistoryBranchName()
ProcessHistory processNames_
void setupNewFile(TFile &)
std::shared_ptr< ProductRegistry > reg_
void setTree(TTree *iTree)
std::string wrappedClassName(std::string const &iFullName)
virtual void reset_() override
virtual void Init(TTree *)
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
std::shared_ptr< edm::root::TFWLiteSelectorMembers > m_
std::shared_ptr< edm::ProductProvenanceRetriever > provRetriever_
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
volatile std::atomic< bool > shutdown_flag false
virtual void Begin(TTree *)
bool insertMapped(value_type const &v)
void setEntry(Long64_t iEntry)
static Registry * instance()
virtual void begin(TList *&in)=0
string root
initialization