20 #include "Reflex/Type.h"
61 void set(boost::shared_ptr<ProductRegistry const> iReg) { reg_ = iReg;}
65 return std::auto_ptr<EventEntryDescription>();
69 boost::shared_ptr<ProductRegistry const>(reg_);
72 std::auto_ptr<EDProduct>
74 ProductRegistry::ProductList::const_iterator itFind= reg_->productList().find(k);
75 if(itFind == reg_->productList().end()) {
83 <<
"could not find branch named '"<<bDesc.
branchName()<<
"'"
84 <<
"\n Perhaps the data being requested was not saved in this file?";
91 <<
"could not find dictionary for type '"<<fullName<<
"'"
92 <<
"\n Please make sure all the necessary libraries are available.";
93 return std::auto_ptr<EDProduct>();
105 TClass* rootClassType=TClass::GetClass(classType.TypeInfo());
106 if(0 == rootClassType) {
108 <<
"could not find a ROOT dictionary for type '"<<fullName<<
"'"
109 <<
"\n Please make sure all the necessary libraries are available.";
110 return std::auto_ptr<EDProduct>();
112 void*
address = rootClassType->New();
113 branch->SetAddress(&address);
120 static TClass* edproductTClass = TClass::GetClass(
typeid(
EDProduct));
125 <<
"failed to convert a '" << fullName
126 <<
"' to a edm::EDProduct."
127 <<
"Please contact developers since something is very wrong.";
130 return std::auto_ptr<EDProduct>(
prod);
154 boost::shared_ptr<ProductRegistry>
reg_;
156 boost::shared_ptr<FWLiteDelayedReader>
reader_;
159 std::vector<EventEntryDescription>
prov_;
179 everythingOK_(
false) {
234 TFile*
file =
m_->tree_->GetCurrentFile();
237 TChain* chain =
dynamic_cast<TChain*
>(
m_->tree_);
242 file = chain->GetFile();
272 branch->SetAddress(&pAux);
273 branch->GetEntry(iEntry);
288 if (!eventSelectionsBranch) {
290 <<
"Failed to find event Selections branch in event tree";
292 eventSelectionsBranch->SetAddress(&pEventSelectionIDVector);
293 eventSelectionsBranch->GetEntry(iEntry);
298 if (!branchListIndexBranch) {
300 <<
"Failed to find branch list index branch in event tree";
302 branchListIndexBranch->SetAddress(&pBranchListIndexes);
303 branchListIndexBranch->GetEntry(iEntry);
306 m_->reader_->setEntry(iEntry);
308 boost::shared_ptr<edm::ProductRegistry const> reg(
m_->reg_);
311 boost::shared_ptr<edm::LuminosityBlockAuxiliary> lumiAux(
313 boost::shared_ptr<edm::LuminosityBlockPrincipal>lbp(
327 std::cout <<
"While processing entry "<<iEntry<<
" the following exception was caught \n"
328 << iEx.what() << std::endl;
330 std::cout <<
"While processing entry "<<iEntry<<
" an unknown exception was caught" << std::endl;
367 m_->reg_->setFrozen();
368 typedef std::map<edm::ParameterSetID, edm::ParameterSetBlob> PsetMap;
370 PsetMap *psetMapPtr = &psetMap;
377 <<
" in the input file.\n";
379 typedef std::pair<edm::ParameterSetID, edm::ParameterSetBlob> IdToBlobs;
381 IdToBlobs* pIdToBlob = &idToBlob;
383 for(
long long i = 0;
i != psetTree->GetEntries(); ++
i) {
384 psetTree->GetEntry(
i);
385 psetMap.insert(idToBlob);
408 metaDataTree->GetEntry(0);
412 if(0 ==
m_->metaTree_) {
420 for (PsetMap::const_iterator
i = psetMap.begin(), iEnd = psetMap.end();
423 pset.setID(
i->first);
430 m_->productMap_.erase(
m_->productMap_.begin(),
m_->productMap_.end());
431 m_->pointerToBranchBuffer_.erase(
m_->pointerToBranchBuffer_.begin(),
432 m_->pointerToBranchBuffer_.end());
440 for(edm::ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
446 newReg->copyProduct(prod);
449 if(
m_->fileFormatVersion_.splitProductIDs()) {
451 <<
"Cannot change friendly class name algorithm without more development work\n"
452 <<
"to update BranchIDLists. Contact the framework group.\n";
456 newReg->copyProduct(newBD);
463 m_->reg_.reset(newReg.release());
469 std::vector<edm::EventEntryDescription>::iterator itB =
m_->prov_.begin();
470 m_->pointerToBranchBuffer_.reserve(prodList2.size());
472 for (edm::ProductRegistry::ProductList::const_iterator it = prodList2.begin(), itEnd = prodList2.end();
473 it != itEnd; ++it, ++itB) {
478 if (
m_->tree_->GetBranch(prod.
branchName().c_str())==0) {
481 m_->productMap_.insert(std::make_pair(it->second.oldProductID(), it->second));
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()
virtual std::auto_ptr< EventEntryDescription > getProvenance_(BranchKey const &) const
virtual Bool_t Process(Long64_t)
boost::shared_ptr< ProductRegistry > reg_
Timestamp const & time() const
std::map< ProductID, BranchDescription > ProductMap
void setRefCoreStreamer(bool resetAll=false)
virtual void SlaveBegin(TTree *)
std::string const & fileFormatVersionBranchName()
virtual void postProcessing(TList &out)=0
std::string const & eventSelectionsBranchName()
void setMetaTree(TTree *iTree)
bool insertMapped(value_type const &v)
virtual void process(const edm::Event &event)=0
ProcessHistory const & processHistory() const
void fillProductRegistryTransients(std::vector< ProcessConfiguration > const &pcVec, ProductRegistry const &preg, bool okToRegister=false)
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & parameterSetsTreeName()
ProcessConfigurationRegistry::vector_type ProcessConfigurationVector
FileFormatVersion fileFormatVersion_
std::vector< BranchListIndex > BranchListIndexes
std::string const & className() const
std::string friendlyName(std::string const &iFullName)
std::string const & friendlyClassName() const
void updateFriendlyClassName()
std::string const & metaDataTreeName()
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 fillEventPrincipal(std::auto_ptr< EventAuxiliary > aux, boost::shared_ptr< LuminosityBlockPrincipal > lbp, boost::shared_ptr< EventSelectionIDVector > eventSelectionIDs=boost::shared_ptr< EventSelectionIDVector >(new EventSelectionIDVector), boost::shared_ptr< BranchListIndexes > branchListIndexes=boost::shared_ptr< BranchListIndexes >(new BranchListIndexes), boost::shared_ptr< BranchMapper > mapper=boost::shared_ptr< BranchMapper >(new BranchMapper), boost::shared_ptr< DelayedReader > rtrv=boost::shared_ptr< DelayedReader >(new NoDelayedReader))
std::string const & eventMetaDataTreeName()
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
virtual std::auto_ptr< EDProduct > getProduct_(BranchKey const &k, EDProductGetter const *ep) const
std::vector< value_type > collection_type
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
static ThreadSafeRegistry * instance()
virtual void Begin(TTree *)
EDProductGetter const * prodGetter() const
void setEntry(Long64_t iEntry)
virtual void begin(TList *&in)=0
string root
initialization