53 #include "Reflex/Type.h"
62 void set(boost::shared_ptr<ProductRegistry const> iReg) { reg_ = iReg;}
66 return std::auto_ptr<EventEntryDescription>();
72 boost::shared_ptr<ProductRegistry const>(reg_);
77 ProductRegistry::ProductList::const_iterator itFind= reg_->productList().find(k);
78 if(itFind == reg_->productList().end()) {
86 <<
"could not find branch named '" << bDesc.
branchName() <<
"'"
87 <<
"\n Perhaps the data being requested was not saved in this file?";
94 <<
"could not find dictionary for type '" << fullName <<
"'"
95 <<
"\n Please make sure all the necessary libraries are available.";
99 Reflex::Object wrapperObj = classType.Construct();
100 if(0 == wrapperObj.Address()) {
101 throw cms::Exception(
"FailedToCreate") <<
"could not create an instance of '" << fullName <<
"'";
103 void*
address = wrapperObj.Address();
104 branch->SetAddress(&address);
127 boost::shared_ptr<ProductRegistry>
reg_;
129 boost::shared_ptr<FWLiteDelayedReader>
reader_;
130 std::vector<EventEntryDescription>
prov_;
136 boost::shared_ptr<edm::EventPrincipal>
ep_;
155 everythingOK_(
false) {
195 if(iTree == 0)
return;
209 TFile*
file =
m_->tree_->GetCurrentFile();
212 TChain* chain =
dynamic_cast<TChain*
>(
m_->tree_);
217 file = chain->GetFile();
247 branch->SetAddress(&pAux);
248 branch->GetEntry(iEntry);
263 if(!eventSelectionsBranch) {
265 <<
"Failed to find event Selections branch in event tree";
267 eventSelectionsBranch->SetAddress(&pEventSelectionIDVector);
268 eventSelectionsBranch->GetEntry(iEntry);
273 if(!branchListIndexBranch) {
275 <<
"Failed to find branch list index branch in event tree";
277 branchListIndexBranch->SetAddress(&pBranchListIndexes);
278 branchListIndexBranch->GetEntry(iEntry);
282 m_->reader_->setEntry(iEntry);
285 boost::shared_ptr<edm::LuminosityBlockAuxiliary> lumiAux(
287 boost::shared_ptr<edm::LuminosityBlockPrincipal>lbp(
289 m_->ep_->fillEventPrincipal(*eaux, lbp, eventSelectionIDs_, branchListIndexes_,
m_->mapper_,
m_->reader_.get());
290 m_->processNames_ =
m_->ep_->processHistory();
295 Operate sentry(
m_->ep_->prodGetter());
298 std::cout <<
"While processing entry " << iEntry <<
" the following exception was caught \n"
299 << iEx.what() << std::endl;
301 std::cout <<
"While processing entry " << iEntry <<
" an unknown exception was caught" << std::endl;
338 m_->reg_->setFrozen();
340 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob> PsetMap;
342 PsetMap *psetMapPtr = &psetMap;
349 <<
" in the input file.\n";
351 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
353 IdToBlobs* pIdToBlob = &idToBlob;
355 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
356 psetTree->GetEntry(
i);
357 psetMap.insert(idToBlob);
380 metaDataTree->GetEntry(0);
384 for(PsetMap::const_iterator
i = psetMap.begin(), iEnd = psetMap.end();
394 m_->pointerToBranchBuffer_.erase(
m_->pointerToBranchBuffer_.begin(),
395 m_->pointerToBranchBuffer_.end());
402 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
408 newReg->copyProduct(prod);
410 if(
m_->fileFormatVersion_.splitProductIDs()) {
412 <<
"Cannot change friendly class name algorithm without more development work\n"
413 <<
"to update BranchIDLists. Contact the framework group.\n";
417 newReg->copyProduct(newBD);
424 m_->reg_.reset(newReg.release());
430 std::vector<edm::EventEntryDescription>::iterator itB =
m_->prov_.begin();
431 m_->pointerToBranchBuffer_.reserve(prodList2.size());
433 for(edm::ProductRegistry::ProductList::const_iterator it = prodList2.begin(), itEnd = prodList2.end();
434 it != itEnd; ++it, ++itB) {
439 if(
m_->tree_->GetBranch(prod.
branchName().c_str()) == 0) {
std::string const & idToParameterSetBlobsBranchName()
virtual void terminate(TList &out)=0
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
BranchType const & branchType() const
virtual ~TFWLiteSelectorBasic()
std::vector< EventEntryDescription * > pointerToBranchBuffer_
void setTree(TTree *iTree)
virtual void preProcessing(const TList *in, TList &out)=0
std::string & branchName() const
std::vector< EventEntryDescription > prov_
std::map< BranchKey, BranchDescription > ProductList
virtual void SlaveTerminate()
static bool updateFromInput(BranchIDLists const &bidlists, std::string const &fileName)
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()
static ThreadSafeRegistry * instance()
virtual void postProcessing(TList &out)=0
std::string const & eventSelectionsBranchName()
edm::ModuleDescription md_
boost::shared_ptr< edm::EventPrincipal > ep_
virtual void process(const edm::Event &event)=0
void fillProductRegistryTransients(std::vector< ProcessConfiguration > const &pcVec, ProductRegistry const &preg, bool okToRegister=false)
static void fixBranchListIndexes(BranchListIndexes &indexes)
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & parameterSetsTreeName()
void setID(ParameterSetID const &id) const
ProcessConfigurationRegistry::vector_type ProcessConfigurationVector
FileFormatVersion fileFormatVersion_
std::vector< BranchListIndex > BranchListIndexes
std::string const & className() const
std::string friendlyName(std::string const &iFullName)
virtual void mergeReaders_(DelayedReader *)
std::string const & friendlyClassName() const
WrapperInterfaceBase const * getInterface() const
void updateFriendlyClassName()
std::string const & metaDataTreeName()
edm::ProcessConfiguration pc_
void insertCollection(collection_type const &c)
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()
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 Init(TTree *)
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
boost::shared_ptr< FWLiteDelayedReader > reader_
author Stefano ARGIRO author Bill Tanenbaum
std::vector< value_type > vector_type
std::vector< value_type > collection_type
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
virtual void Begin(TTree *)
virtual WrapperOwningHolder getProduct_(BranchKey const &k, WrapperInterfaceBase const *interface, EDProductGetter const *ep) const
bool insertMapped(value_type const &v)
void setEntry(Long64_t iEntry)
virtual void begin(TList *&in)=0
string root
initialization
boost::shared_ptr< edm::BranchMapper > mapper_