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.";
127 void* address = buffer->
class_->New();
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.";
168 if(!
bool(classType)) {
170 <<
"could not find dictionary for type '" << fullName <<
"'"
171 <<
"\n Please make sure all the necessary libraries are available.";
175 TClass* rootClassType = TClass::GetClass(classType.typeInfo());
176 if(0 == rootClassType) {
178 <<
"could not find a ROOT dictionary for type '" << fullName <<
"'"
179 <<
"\n Please make sure all the necessary libraries are available.";
182 void* address = rootClassType->New();
189 <<
"failed to convert a '" << fullName
190 <<
"' to a edm::WrapperOwningHolder."
191 <<
"Please contact developers since something is very wrong.";
196 Buffer b(prod, branch, address, rootClassType);
202 branch->SetAddress(address);
std::string const & branchName() const
static TypeWithDict byName(std::string const &className)
bool updateEvent(Long_t eventEntry)
bool updateFile(TFile *file)
virtual edm::WrapperHolder getIt(edm::ProductID const &) const override
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()