22 #include "Reflex/Type.h"
70 TFile* currentFile =
dynamic_cast<TFile*
>(gROOT->GetListOfFiles()->Last());
71 if(0 == currentFile) {
73 <<
"unable to find the TFile '" << gROOT->GetListOfFiles()->Last() <<
"'\n"
74 <<
"retrieved by calling 'gROOT->GetListOfFiles()->Last()'\n"
75 <<
"Please check the list of files.";
86 <<
"'\n Please check that the file is a standard CMS ROOT format.\n"
87 <<
"If the above is not the file you expect then please open your data file after all other files.";
89 Long_t eventEntry = eventTree->GetReadEntry();
94 <<
"please call GetEntry for the 'Events' TTree for each event in order to make edm::Ref's work."
95 <<
"\n Also be sure to call 'SetAddress' for all Branches after calling the GetEntry."
100 IdToBuffers::iterator itBuffer =
idToBuffers_.find(iID);
109 buffer = &(itBuffer->second);
113 <<
"Found a null buffer which is supposed to hold the data item."
114 <<
"\n Please contact developers since this message should not happen.";
118 <<
"The TBranch which should hold the data item is null."
119 <<
"\n Please contact the developers since this message should not happen.";
132 <<
"failed to convert a '" << buffer->
class_->GetName()
133 <<
"' to a edm::WrapperHolder."
134 <<
"Please contact developers since something is very wrong.";
141 buffer->
branch_->SetAddress(address);
143 buffer->
branch_->GetEntry(eventEntry);
148 <<
"Calling GetEntry with index " << eventEntry
149 <<
"for branch " << buffer->
branch_->GetName() <<
" failed.";
167 Reflex::Type classType = Reflex::Type::ByName(fullName);
170 <<
"could not find dictionary for type '" << fullName <<
"'"
171 <<
"\n Please make sure all the necessary libraries are available.";
188 TClass* rootClassType = TClass::GetClass(classType.TypeInfo());
189 if(0 == rootClassType) {
191 <<
"could not find a ROOT dictionary for type '" << fullName <<
"'"
192 <<
"\n Please make sure all the necessary libraries are available.";
195 void*
address = rootClassType->New();
202 <<
"failed to convert a '" << fullName
203 <<
"' to a edm::WrapperOwningHolder."
204 <<
"Please contact developers since something is very wrong.";
209 Buffer b(prod, branch, address, rootClassType);
215 branch->SetAddress(address);
std::string & branchName() const
virtual edm::WrapperHolder getIt(edm::ProductID const &) const
bool updateEvent(Long_t eventEntry)
bool updateFile(TFile *file)
TTree * getEventTree() const
WrapperInterfaceBase const * interface() const
std::string const & className() const
const edm::BranchDescription & productToBranch(const edm::ProductID &pid)
WrapperInterfaceBase const * getInterface() const
Buffer * createNewBuffer(edm::ProductID const &) const
std::string wrappedClassName(std::string const &iFullName)
edm::WrapperOwningHolder product_
std::string const & eventTreeName()
fwlite::BranchMapReader branchMap_
void const * wrapper() const
virtual ~BareRootProductGetter()