Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 43 of file BareRootProductGetter.h.
Definition at line 278 of file BareRootProductGetter.cc.
290 if (!
bool(classType)) {
292 <<
"\n Please make sure all the necessary libraries are available.";
296 TClass* rootClassType = TClass::GetClass(classType.typeInfo());
297 if (
nullptr == rootClassType) {
298 throw cms::Exception(
"MissingRootDictionary") <<
"could not find a ROOT dictionary for type '" <<
fullName <<
"'"
299 <<
"\n Please make sure all the necessary libraries are available.";
302 void* address = rootClassType->New();
304 static TClass
const* edproductTClass = TClass::GetClass(
typeid(
edm::WrapperBase));
306 static_cast<edm::WrapperBase const*>(rootClassType->DynamicCast(edproductTClass, address,
true));
307 if (
nullptr ==
prod) {
308 throw cms::Exception(
"FailedConversion") <<
"failed to convert a '" <<
fullName <<
"' to a edm::WrapperBase."
309 <<
"Please contact developers since something is very wrong.";
320 branch->SetAddress(address);
References b, MicroEventContent_cff::branch, fwlite::BranchMapReader::branchIDToBranch(), branchMap_, edm::BranchDescription::branchName(), edm::TypeWithDict::byName(), edm::BranchDescription::className(), Exception, newFWLiteAna::fullName, fwlite::BranchMapReader::getEventTree(), idToBuffers_, eostools::move(), dumpMFGeometry_cfg::prod, AlCaHLTBitMon_QueryRunRegistry::string, and edm::wrappedClassName().
Referenced by getIt().
Implements edm::EDProductGetter.
Definition at line 70 of file BareRootProductGetter.cc.
72 TFile* currentFile = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->Last());
73 if (
nullptr == currentFile) {
74 throw cms::Exception(
"FileNotFound") <<
"unable to find the TFile '" << gROOT->GetListOfFiles()->Last() <<
"'\n"
75 <<
"retrieved by calling 'gROOT->GetListOfFiles()->Last()'\n"
76 <<
"Please check the list of files.";
83 if (
nullptr == eventTree) {
87 <<
"'\n Please check that the file is a standard CMS ROOT format.\n"
88 <<
"If the above is not the file you expect then please open your data file after all other files.";
90 Long_t eventEntry = eventTree->GetReadEntry();
95 <<
"please call GetEntry for the 'Events' TTree for each event in order to make edm::Ref's work."
96 <<
"\n Also be sure to call 'SetAddress' for all Branches after calling the GetEntry.";
101 return getIt(branchID, eventEntry);
References branchMap_, edm::poolNames::eventTreeName(), Exception, fwlite::BranchMapReader::getEventTree(), fwlite::BranchMapReader::getFile(), idToBuffers_, fwlite::BranchMapReader::productToBranchID(), fwlite::BranchMapReader::updateEvent(), and fwlite::BranchMapReader::updateFile().
Referenced by getThinnedAssociation(), getThinnedProduct(), and getThinnedProducts().
void BareRootProductGetter::getThinnedProducts |
( |
edm::ProductID const & |
pid, |
|
|
std::vector< edm::WrapperBase const * > & |
foundContainers, |
|
|
std::vector< unsigned int > & |
keys |
|
) |
| const |
|
overridevirtual |
Implements edm::EDProductGetter.
Definition at line 207 of file BareRootProductGetter.cc.
219 associatedBranches != iEnd;
220 ++associatedBranches) {
223 if (thinnedAssociation ==
nullptr)
230 unsigned int nKeys =
keys.size();
232 std::vector<unsigned int> thinnedIndexes(nKeys, doNotLookForThisIndex);
234 for (
unsigned k = 0;
k < nKeys; ++
k) {
236 if (foundContainers[
k] !=
nullptr)
239 if (
keys[
k] == doNotLookForThisIndex)
256 if (thinnedCollection ==
nullptr) {
260 for (
unsigned k = 0;
k < nKeys; ++
k) {
261 if (foundContainers[
k] ==
nullptr)
263 if (thinnedIndexes[
k] == doNotLookForThisIndex)
265 keys[
k] = thinnedIndexes[
k];
268 for (
unsigned k = 0;
k < nKeys; ++
k) {
269 if (thinnedIndexes[
k] == doNotLookForThisIndex)
271 keys[
k] = thinnedIndexes[
k];
272 foundContainers[
k] = thinnedCollection;
References branchMap_, fwlite::BranchMapReader::getEventTree(), getIt(), getThinnedAssociation(), edm::ThinnedAssociation::hasParentIndex(), dqmdumpme::k, relativeConstraints::keys, SiStripPI::max, class-composition::parent, edm::ThinnedAssociationsHelper::parentBegin(), edm::ThinnedAssociation::parentCollectionID(), edm::ThinnedAssociationsHelper::parentEnd(), fwlite::BranchMapReader::productToBranchID(), fwlite::BranchMapReader::thinnedAssociationsHelper(), and edm::ThinnedAssociation::thinnedCollectionID().