62 void set(boost::shared_ptr<ProductRegistry const> iReg) { reg_ = iReg;}
67 return std::auto_ptr<EventEntryDescription>();
73 boost::shared_ptr<ProductRegistry const>(reg_);
83 ProductRegistry::ProductList::const_iterator itFind= reg_->productList().find(k);
84 if(itFind == reg_->productList().end()) {
90 if(
nullptr == branch) {
92 <<
"could not find branch named '" << bDesc.
branchName() <<
"'"
93 <<
"\n Perhaps the data being requested was not saved in this file?";
98 if(!
bool(classType)) {
100 <<
"could not find dictionary for type '" << fullName <<
"'"
101 <<
"\n Please make sure all the necessary libraries are available.";
105 void const* address = classType.construct().address();
106 if(
nullptr == address) {
107 throw cms::Exception(
"FailedToCreate") <<
"could not create an instance of '" << fullName <<
"'";
109 branch->SetAddress(&address);
133 boost::shared_ptr<ProductRegistry>
reg_;
134 boost::shared_ptr<ProcessHistoryRegistry>
phreg_;
137 boost::shared_ptr<FWLiteDelayedReader>
reader_;
138 std::vector<EventEntryDescription>
prov_;
144 boost::shared_ptr<edm::EventPrincipal>
ep_;
163 everythingOK_(
false) {
203 if(iTree ==
nullptr)
return;
213 if(
nullptr ==
m_->tree_) {
217 TFile*
file =
m_->tree_->GetCurrentFile();
218 if(
nullptr == file) {
220 TChain* chain =
dynamic_cast<TChain*
>(
m_->tree_);
221 if(
nullptr == chain) {
225 file = chain->GetFile();
226 if(
nullptr == file) {
255 branch->SetAddress(&pAux);
256 branch->GetEntry(iEntry);
268 if(!eventSelectionsBranch) {
270 <<
"Failed to find event Selections branch in event tree";
272 eventSelectionsBranch->SetAddress(&pEventSelectionIDVector);
273 eventSelectionsBranch->GetEntry(iEntry);
278 if(!branchListIndexBranch) {
280 <<
"Failed to find branch list index branch in event tree";
282 branchListIndexBranch->SetAddress(&pBranchListIndexes);
283 branchListIndexBranch->GetEntry(iEntry);
284 m_->branchIDListHelper_->fixBranchListIndexes(branchListIndexes);
287 m_->reader_->setEntry(iEntry);
289 boost::shared_ptr<edm::RunPrincipal> rp(
new edm::RunPrincipal(runAux,
m_->reg_,
m_->pc_,
nullptr, 0));
290 boost::shared_ptr<edm::LuminosityBlockAuxiliary> lumiAux(
292 boost::shared_ptr<edm::LuminosityBlockPrincipal>lbp(
294 m_->ep_->fillEventPrincipal(*eaux,
296 std::move(eventSelectionIDs),
297 std::move(branchListIndexes),
298 *(
m_->provRetriever_),
300 lbp->setRunPrincipal(rp);
301 m_->ep_->setLuminosityBlockPrincipal(lbp);
302 m_->processNames_ =
m_->ep_->processHistory();
307 Operate sentry(
m_->ep_->prodGetter());
310 std::cout <<
"While processing entry " << iEntry <<
" the following exception was caught \n"
311 << iEx.what() << std::endl;
313 std::cout <<
"While processing entry " << iEntry <<
" an unknown exception was caught" << std::endl;
350 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob> PsetMap;
352 PsetMap *psetMapPtr = &psetMap;
357 if(
nullptr == psetTree) {
359 <<
" in the input file.\n";
361 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
363 IdToBlobs* pIdToBlob = &idToBlob;
365 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
366 psetTree->GetEntry(
i);
367 psetMap.insert(idToBlob);
390 metaDataTree->GetEntry(0);
392 for(
auto&
prod :
m_->reg_->productListUpdator()) {
398 for(
auto const& entry : psetMap) {
400 pset.
setID(entry.first);
404 for(
auto const& ph : pHistVector) {
405 m_->phreg_->registerProcessHistory(ph);
408 m_->pointerToBranchBuffer_.erase(
m_->pointerToBranchBuffer_.begin(),
409 m_->pointerToBranchBuffer_.end());
415 for(
auto& item : prodList) {
420 newReg->copyProduct(prod);
422 if(
m_->fileFormatVersion_.splitProductIDs()) {
424 <<
"Cannot change friendly class name algorithm without more development work\n"
425 <<
"to update BranchIDLists. Contact the framework group.\n";
429 newReg->copyProduct(newBD);
434 m_->reg_.reset(newReg.release());
440 std::vector<edm::EventEntryDescription>::iterator itB =
m_->prov_.begin();
441 m_->pointerToBranchBuffer_.reserve(prodList2.size());
443 for(
auto& item : prodList2) {
448 if(
m_->tree_->GetBranch(prod.
branchName().c_str()) ==
nullptr) {
460 m_->branchIDListHelper_->updateFromInput(*branchIDListsPtr);
461 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::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
BranchType const & branchType() const
virtual ~TFWLiteSelectorBasic()
static TypeWithDict byName(std::string const &className)
std::vector< BranchIDList > BranchIDLists
boost::shared_ptr< BranchIDListHelper > branchIDListHelper_
std::vector< EventEntryDescription * > pointerToBranchBuffer_
void setTree(TTree *iTree)
virtual void preProcessing(const TList *in, TList &out)=0
std::vector< EventEntryDescription > prov_
std::map< BranchKey, BranchDescription > ProductList
virtual void SlaveTerminate()
virtual std::auto_ptr< EventEntryDescription > getProvenance_(BranchKey const &) const
virtual Bool_t Process(Long64_t)
boost::shared_ptr< ProductRegistry > reg_
Timestamp const & time() const
void setRefCoreStreamer(bool resetAll=false)
virtual void SlaveBegin(TTree *)
std::string const & fileFormatVersionBranchName()
virtual void postProcessing(TList &out)=0
std::string const & eventSelectionsBranchName()
WrapperOwningHolder getTheProduct(BranchKey const &k) const
edm::ModuleDescription md_
boost::shared_ptr< edm::EventPrincipal > ep_
virtual void process(const edm::Event &event)=0
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & parameterSetsTreeName()
virtual WrapperOwningHolder getProduct_(BranchKey const &k, WrapperInterfaceBase const *interface, EDProductGetter const *ep) const override
FileFormatVersion fileFormatVersion_
std::vector< BranchListIndex > BranchListIndexes
std::string const & className() const
std::string friendlyName(std::string const &iFullName)
boost::shared_ptr< edm::ProductProvenanceRetriever > provRetriever_
std::string const & friendlyClassName() const
WrapperInterfaceBase const * getInterface() 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()
ProcessHistoryVector vector_type
std::string const & processHistoryBranchName()
boost::shared_ptr< edm::root::TFWLiteSelectorMembers > m_
ProcessHistory processNames_
void setupNewFile(TFile &)
void setTree(TTree *iTree)
void set(boost::shared_ptr< ProductRegistry const > iReg)
std::string wrappedClassName(std::string const &iFullName)
virtual void reset_() override
virtual void Init(TTree *)
boost::shared_ptr< ProcessHistoryRegistry > phreg_
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
boost::shared_ptr< FWLiteDelayedReader > reader_
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