53 #include "TTreeCache.h"
62 forcedRunOffset(
RunNumber_t const& forcedRunNumber, IndexIntoFile::IndexIntoFileItr inxBegin, IndexIntoFile::IndexIntoFileItr inxEnd) {
63 if(inxBegin == inxEnd)
return 0;
64 int defaultOffset = (inxBegin.run() != 0 ? 0 : 1);
65 int offset = (forcedRunNumber != 0U ? forcedRunNumber - inxBegin.run() : defaultOffset);
68 <<
"The value of the 'setRunNumber' parameter must not be\n"
69 <<
"less than the first run number in the first input file.\n"
70 <<
"'setRunNumber' was " << forcedRunNumber <<
", while the first run was "
71 << forcedRunNumber - offset <<
".\n";
90 return eventAux.
event();
101 std::string
const& logicalFileName,
102 boost::shared_ptr<InputFile> filePtr,
103 boost::shared_ptr<EventSkipperByID> eventSkipperByID,
107 unsigned int treeCacheSize,
108 int treeMaxVirtualSize,
114 boost::shared_ptr<DuplicateChecker> duplicateChecker,
115 bool dropDescendants,
116 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
117 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile,
118 std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
119 bool usingGoToEvent) :
121 logicalFile_(logicalFileName),
122 processConfiguration_(processConfiguration),
124 eventSkipperByID_(eventSkipperByID),
125 fileFormatVersion_(),
128 indexIntoFile_(*indexIntoFileSharedPtr_),
129 orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
131 indexIntoFileEnd_(indexIntoFileBegin_),
132 indexIntoFileIter_(indexIntoFileBegin_),
133 eventProcessHistoryIDs_(),
134 eventProcessHistoryIter_(eventProcessHistoryIDs_.
begin()),
135 skipAnyEvents_(skipAnyEvents),
136 noEventSort_(noEventSort),
137 whyNotFastClonable_(0),
138 hasNewlyDroppedBranch_(),
139 branchListIndexesUnchanged_(
false),
145 lastEventEntryNumberRead_(-1LL),
148 processingMode_(processingMode),
150 newBranchToOldBranch_(),
151 eventHistoryTree_(0),
156 duplicateChecker_(duplicateChecker),
157 provenanceAdaptor_() {
169 <<
" in the input file.\n";
177 fft->SetAddress(&fftPtr);
200 typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
202 PsetMap *psetMapPtr = &psetMap;
212 <<
" in the input file.\n";
215 typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
217 IdToBlobs* pIdToBlob = &idToBlob;
221 filePtr_->SetCacheRead(psetTreeCache.get());
222 for(Long64_t
i = 0;
i != psetTree->GetEntries(); ++
i) {
223 psetTree->GetEntry(
i);
224 psetMap.insert(idToBlob);
287 for(PsetMap::const_iterator
i = psetMap.begin(), iEnd = psetMap.end();
i != iEnd; ++
i) {
289 pset.setID(
i->first);
296 inputProdDescReg, pHistMap, pHistVector, procConfigVector, psetIdConverter,
true));
303 inputProdDescReg, pHistMap, pHistVector, procConfigVector, psetIdConverter,
false));
308 <<
"Failed to find branchIDLists branch in metaData tree.\n";
336 for(ProductRegistry::ProductList::const_iterator it = pList.begin(), itEnd = pList.end();
349 for(ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
354 newReg->copyProduct(prod);
358 <<
"Cannot change friendly class name algorithm without more development work\n"
359 <<
"to update BranchIDLists. Contact the framework group.\n";
363 newReg->copyProduct(newBD);
367 dropOnInput(*newReg, groupSelectorRules, dropDescendants, secondaryFile);
376 for(ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
412 if(!entryDescriptionTree)
414 <<
" in the input file.\n";
432 if(idBuffer != entryDescriptionBuffer.
id())
454 <<
" in the input file.\n";
457 Parentage *pParentageBuffer = &parentageBuffer;
519 boost::shared_ptr<FileBlock>
679 phid_(phid), run_(run) {}
683 struct RunItemSortByRun {
684 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
685 return a.run_ < b.run_;
688 struct RunItemSortByRunPhid {
689 bool operator()(RunItem
const&
a, RunItem
const&
b)
const {
690 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
696 phid_(phid), run_(run), lumi_(lumi), firstEventEntry_(entry),
697 lastEventEntry_(entry == -1LL ? -1LL : entry + 1) {}
701 EntryNumber_t firstEventEntry_;
702 EntryNumber_t lastEventEntry_;
704 struct LumiItemSortByRunLumi {
705 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
706 return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
709 struct LumiItemSortByRunLumiPhid {
710 bool operator()(LumiItem
const&
a, LumiItem
const&
b)
const {
711 if(a.run_ < b.run_)
return true;
712 if(b.run_ < a.run_)
return false;
713 if(a.lumi_ < b.lumi_)
return true;
714 if(b.lumi_ < a.lumi_)
return false;
715 return a.phid_ < b.phid_;
731 typedef std::list<LumiItem> LumiList;
734 typedef std::set<LuminosityBlockID> RunLumiSet;
735 RunLumiSet runLumiSet;
737 typedef std::list<RunItem>
RunList;
740 typedef std::set<RunNumber_t> RunSet;
743 typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
744 RunItemSet runItemSet;
746 typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
759 bool newLumi =
false;
769 newRun = newLumi =
true;
770 }
else if(prevLumi !=
eventAux().luminosityBlock()) {
777 lumis.push_back(LumiItem(
eventAux().processHistoryID(),
781 LumiItem& currentLumi = lumis.back();
783 ++currentLumi.lastEventEntry_;
788 if(runItemSet.insert(item).second) {
789 runs.push_back(item);
802 typedef std::map<RunNumber_t, EntryNumber_t> RunMap;
805 typedef std::vector<RunItem> RunVector;
812 if(runSet.insert(runAux->run()).
second) {
814 emptyRuns.push_back(RunItem(runAux->processHistoryID(), runAux->run()));
817 phidMap.insert(std::make_pair(runAux->run(), runAux->processHistoryID()));
824 RunItemSortByRun runItemSortByRun;
827 RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
828 for (RunVector::const_iterator
i = emptyRuns.begin(), iEnd = emptyRuns.end();
i != iEnd; ++
i) {
829 for (; itRuns != endRuns; ++itRuns) {
830 if(runItemSortByRun(*
i, *itRuns)) {
834 runs.insert(itRuns, *
i);
839 typedef std::vector<LumiItem> LumiVector;
840 LumiVector emptyLumis;
842 typedef std::map<LuminosityBlockID, EntryNumber_t> RunLumiMap;
843 RunLumiMap runLumiMap;
850 if(runLumiSet.insert(lumiID).second) {
855 PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
856 assert(iPhidMap != phidMap.end());
857 emptyLumis.push_back(LumiItem(iPhidMap->second, lumiAux->run(), lumiAux->luminosityBlock(), -1LL));
866 LumiItemSortByRunLumi lumiItemSortByRunLumi;
869 LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
870 for (LumiVector::const_iterator
i = emptyLumis.begin(), iEnd = emptyLumis.end();
i != iEnd; ++
i) {
871 for (; itLumis != endLumis; ++itLumis) {
872 if(lumiItemSortByRunLumi(*
i, *itLumis)) {
876 lumis.insert(itLumis, *
i);
881 typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
882 RunCountMap runCountMap;
884 assert(phids.empty());
886 assert(entries.empty());
888 for (RunList::iterator it = runs.begin(), itEnd = runs.end(); it != itEnd; ++it) {
889 RunCountMap::const_iterator countMapItem = runCountMap.find(*it);
890 if(countMapItem == runCountMap.end()) {
891 countMapItem = runCountMap.insert(std::make_pair(*it, rcount)).first;
892 assert(countMapItem != runCountMap.end());
895 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids, it->phid_);
896 if(phidItem == phids.end()) {
897 phids.push_back(it->phid_);
898 phidItem = phids.end() - 1;
901 countMapItem->second,
904 phidItem - phids.begin(),
912 typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
913 LumiCountMap lumiCountMap;
915 for (LumiList::iterator it = lumis.begin(), itEnd = lumis.end(); it != itEnd; ++it) {
916 RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(it->phid_, it->run_));
917 assert(runCountMapItem != runCountMap.end());
918 LumiCountMap::const_iterator countMapItem = lumiCountMap.find(*it);
919 if(countMapItem == lumiCountMap.end()) {
920 countMapItem = lumiCountMap.insert(std::make_pair(*it, lcount)).first;
921 assert(countMapItem != lumiCountMap.end());
924 std::vector<ProcessHistoryID>::const_iterator phidItem =
find_in_all(phids, it->phid_);
925 assert(phidItem != phids.end());
927 runCountMapItem->second,
928 countMapItem->second,
930 phidItem - phids.begin(),
933 it->firstEventEntry_,
934 it->lastEventEntry_));
946 "'Events' tree is corrupted or not present\n" <<
"in the input file.\n";
964 bool needEventNumbers =
false;
966 if(secondaryFile || needIndexesForDuplicateChecker || usingGoToEvent) {
967 needEventNumbers =
true;
969 bool needEventEntries =
false;
972 needEventEntries =
true;
980 std::string
const label =
"source";
981 std::string moduleName =
"PoolSource";
1048 if(!eventHistoryBranch) {
1050 <<
"Failed to find history branch in event history tree.\n";
1052 eventHistoryBranch->SetAddress(&pHistory);
1061 assert(eventSelectionIDBranch != 0);
1065 assert(branchListIndexesBranch != 0);
1080 boost::shared_ptr<LuminosityBlockAuxiliary>
1093 lumiAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1098 return lumiAuxiliary;
1101 boost::shared_ptr<RunAuxiliary>
1103 boost::shared_ptr<RunAuxiliary> runAuxiliary(
new RunAuxiliary);
1109 RunAux *pRunAux = &runAux;
1114 runAuxiliary->setProcessHistoryID(
provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1116 return runAuxiliary;
1244 boost::shared_ptr<RootFile> rootFilePtr,
1245 boost::shared_ptr<LuminosityBlockPrincipal> lb) {
1277 boost::shared_ptr<RunAuxiliary>
1299 filePtr_->reportInputRunNumber(runAuxiliary->run());
1312 assert(runAuxiliary->processHistoryID() == phid);
1314 runAuxiliary->setProcessHistoryID(phid);
1316 return runAuxiliary;
1319 boost::shared_ptr<RunPrincipal>
1331 rpCache->readImmediate();
1336 boost::shared_ptr<LuminosityBlockAuxiliary>
1354 boost::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary =
fillLumiAuxiliary();
1358 filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1372 assert(lumiAuxiliary->processHistoryID() == phid);
1375 lumiAuxiliary->setProcessHistoryID(phid);
1377 return lumiAuxiliary;
1380 boost::shared_ptr<LuminosityBlockPrincipal>
1394 lbCache->readImmediate();
1444 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
1462 <<
"Failed to find the event history tree.\n";
1469 std::vector<boost::shared_ptr<IndexIntoFile> >
const& indexesIntoFiles,
1470 std::vector<boost::shared_ptr<IndexIntoFile> >::
size_type currentIndexIntoFile) {
1477 currentIndexIntoFile);
1491 std::set<BranchID> branchesToDrop;
1492 for(ProductRegistry::ProductList::const_iterator it = prodList.begin(), itEnd = prodList.end();
1493 it != itEnd; ++it) {
1495 if(!groupSelector.
selected(prod)) {
1496 if(dropDescendants) {
1499 branchesToDrop.insert(prod.
branchID());
1505 std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1506 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1508 bool drop = branchesToDrop.find(prod.
branchID()) != branchesToDropEnd;
1512 <<
"Branch '" << prod.
branchName() <<
"' is being dropped from the input\n"
1513 <<
"of file '" <<
file_ <<
"' because it is dependent on a branch\n"
1514 <<
"that was explicitly dropped.\n";
1518 ProductRegistry::ProductList::iterator icopy = it;
1520 prodList.erase(icopy);
1528 for(ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1532 boost::shared_ptr<EDProduct> dummy(static_cast<EDProduct *>(cp->New()));
1533 if(dummy->isMergeable()) {
1535 ProductRegistry::ProductList::iterator icopy = it;
1537 prodList.erase(icopy);
1550 boost::shared_ptr<BranchMapper>
1553 mapper->setDelayedRead(
false);
1555 for(ProductRegistry::ProductList::const_iterator it = preg.
productList().begin(),
1556 itEnd = preg.
productList().end(); it != itEnd; ++it) {
1557 if(type == it->second.branchType() && !it->second.transient()) {
1558 TBranch *
br = rootTree.
branches().find(it->first)->second.provenanceBranch_;
1561 br->SetAddress(&ppb);
1566 mapper->insert(
entry);
1567 mapper->insertIntoMap(it->second.oldProductID(), it->second.branchID());
1573 boost::shared_ptr<BranchMapper>
1574 makeBranchMapperInRelease200(RootTree& rootTree,
BranchType const& type, ProductRegistry
const& preg) {
1575 rootTree.fillStatus();
1576 boost::shared_ptr<BranchMapperWithReader> mapper(
new BranchMapperWithReader());
1577 mapper->setDelayedRead(
false);
1578 for(ProductRegistry::ProductList::const_iterator it = preg.productList().begin(),
1579 itEnd = preg.productList().end(); it != itEnd; ++it) {
1580 if(type == it->second.branchType() && !it->second.transient()) {
1584 mapper->insert(
entry);
1585 mapper->insertIntoMap(it->second.oldProductID(), it->second.branchID());
1591 boost::shared_ptr<BranchMapper>
1592 makeBranchMapperInRelease210(RootTree& rootTree,
BranchType const& type) {
1593 boost::shared_ptr<BranchMapperWithReader> mapper(
new BranchMapperWithReader());
1594 mapper->setDelayedRead(
false);
1596 std::auto_ptr<std::vector<EventEntryInfo> > infoVector(
new std::vector<EventEntryInfo>);
1597 std::vector<EventEntryInfo> *pInfoVector = infoVector.get();
1598 rootTree.branchEntryInfoBranch()->SetAddress(&pInfoVector);
1602 for(std::vector<EventEntryInfo>::const_iterator it = infoVector->begin(), itEnd = infoVector->end();
1603 it != itEnd; ++it) {
1604 EventEntryDescription eed;
1606 Parentage parentage(eed.parents());
1607 ProductProvenance
entry(it->branchID(), it->productStatus(), parentage.id());
1608 mapper->insert(
entry);
1609 mapper->insertIntoMap(it->productID(), it->branchID());
1612 std::auto_ptr<std::vector<RunLumiEntryInfo> > infoVector(
new std::vector<RunLumiEntryInfo>);
1613 std::vector<RunLumiEntryInfo> *pInfoVector = infoVector.get();
1614 rootTree.branchEntryInfoBranch()->SetAddress(&pInfoVector);
1618 for(std::vector<RunLumiEntryInfo>::const_iterator it = infoVector->begin(), itEnd = infoVector->end();
1619 it != itEnd; ++it) {
1620 ProductProvenance
entry(it->branchID(), it->productStatus(),
ParentageID());
1621 mapper->insert(
entry);
1627 boost::shared_ptr<BranchMapper>
1628 makeBranchMapperInRelease300(RootTree& rootTree) {
1629 boost::shared_ptr<BranchMapperWithReader> mapper(
1630 new BranchMapperWithReader(&rootTree));
1631 mapper->setDelayedRead(
true);
1636 boost::shared_ptr<BranchMapper>
1639 return makeBranchMapperInRelease300(rootTree);
1641 return makeBranchMapperInRelease210(rootTree, type);
EventID const & eventID() const
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
EventNumber_t event() const
std::string const & idToParameterSetBlobsBranchName()
boost::shared_ptr< BranchChildren > branchChildren_
boost::shared_ptr< BranchListIndexes > branchListIndexes_
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
unsigned int const defaultNonEventLearningEntries
void doneFileInitialization() const
Clears the temporary vector of event numbers to reduce memory usage.
static int const invalidIndex
boost::shared_ptr< FileBlock > createFileBlock() const
BranchType const & branchType() const
std::string const & parentageTreeName()
static LuminosityBlockID firstValidLuminosityBlock()
std::string const & entryDescriptionBranchName()
bool skipEvents(int &offset)
FileFormatVersion fileFormatVersion() const
boost::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
ForwardSequence::const_iterator lower_bound_all(ForwardSequence const &s, Datum const &d)
wrappers for std::lower_bound
bool branchListIndexesUnchanged() const
std::vector< std::string > const & branchNames() const
unsigned int EventNumber_t
std::string & branchName() const
boost::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
std::map< std::string, std::string > newBranchToOldBranch_
IndexIntoFile::EntryType getEntryTypeWithSkipping()
bool empty() const
True if no runs, lumis, or events are in the file.
std::map< BranchKey, BranchDescription > ProductList
void fillEventAuxiliary()
static bool updateFromInput(BranchIDLists const &bidlists, std::string const &fileName)
EntryType getEntryType() const
bool setEntryAtRun(RunNumber_t run)
Timestamp const & time() const
EntryNumber const & entries() const
bool getMapped(key_type const &k, value_type &result) const
void setRefCoreStreamer(bool resetAll=false)
std::string const & fileFormatVersionBranchName()
IndexIntoFileItr begin(SortOrder sortOrder) const
std::vector< BranchID > const & parents() const
std::string const & eventSelectionsBranchName()
InputSource::ProcessingMode processingMode_
boost::shared_ptr< History > history_
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
boost::shared_ptr< RunAuxiliary > fillRunAuxiliary()
void stable_sort_all(RandomAccessSequence &s)
wrappers for std::stable_sort
static RunID firstValidRun()
LuminosityBlockNumber_t lumi() const
LuminosityBlockNumber_t luminosityBlock() const
void trainCache(char const *branchNames)
bool insertMapped(value_type const &v)
unsigned int LuminosityBlockNumber_t
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
static int position[TOTALCHAMBERS][3]
void fillProductRegistryTransients(std::vector< ProcessConfiguration > const &pcVec, ProductRegistry const &preg, bool okToRegister=false)
void advanceToNextLumiOrRun()
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
std::vector< EventSelectionID > EventSelectionIDVector
LuminosityBlockNumber_t luminosityBlock() const
FileFormatVersion fileFormatVersion_
TTree const * metaTree() const
std::string const & parameterSetsTreeName()
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
ProcessConfigurationRegistry::vector_type ProcessConfigurationVector
std::vector< BranchID > const & parents() const
ProductList const & productList() const
U second(std::pair< T, U > const &p)
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
IndexIntoFile::EntryType getNextEntryTypeWanted()
TTree const * tree() const
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, boost::shared_ptr< InputFile > filePtr, boost::shared_ptr< EventSkipperByID > eventSkipperByID, bool skipAnyEvents, int remainingEvents, int remainingLumis, unsigned int treeCacheSize, int treeMaxVirtualSize, InputSource::ProcessingMode processingMode, RunNumber_t const &forcedRunNumber, bool noEventSort, GroupSelectorRules const &groupSelectorRules, bool secondaryFile, boost::shared_ptr< DuplicateChecker > duplicateChecker, bool dropDescendantsOfDroppedProducts, std::vector< boost::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< boost::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool usingGoToEvent)
boost::shared_ptr< DuplicateChecker > duplicateChecker_
std::auto_ptr< TTreeCache > trainCache(TTree *tree, InputFile &file, unsigned int cacheSize, char const *branchNames)
std::string const logicalFile_
std::map< key_type, value_type > collection_type
std::vector< BranchListIndex > BranchListIndexes
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
std::string const & processHistoryMapBranchName()
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
CreatorStatus const & creatorStatus() const
std::string const & className() const
bool wasLastEventJustRead() const
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
std::string friendlyName(std::string const &iFullName)
static RunNumber_t const invalidRun
std::string const & entryDescriptionTreeName()
EventPrincipal * readEvent(EventPrincipal &cache, boost::shared_ptr< RootFile > rootFilePtr, boost::shared_ptr< LuminosityBlockPrincipal > lb=boost::shared_ptr< LuminosityBlockPrincipal >())
std::string const & fid() const
RootTree const & runTree() const
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
void copyPosition(IndexIntoFileItr const &position)
Copy the position without modifying the pointer to the IndexIntoFile or size.
std::string const & indexIntoFileBranchName()
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
virtual EventNumber_t getEventNumberOfEntry(roottree::EntryNumber entry) const
std::string const & eventHistoryBranchName()
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
Long64_t numEntries(TFile *hdl, std::string const &trname)
std::pair< std::string, MonitorElement * > entry
EventAuxiliary const & eventAux() const
int processHistoryIDIndex() const
int whyNotFastClonable() const
ProductStatus neverCreated()
std::vector< BranchDescription const * > allBranchDescriptions() const
std::map< ParameterSetID, ParameterSetID > ParameterSetIdConverter
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
std::string const & friendlyClassName() const
BranchID const & branchID() const
void dropOnInput(ProductRegistry ®, GroupSelectorRules const &rules, bool dropDescendants, bool secondaryFile)
void updateFriendlyClassName()
std::string const & metaDataTreeName()
std::string & wrappedName() const
LuminosityBlockNumber_t oldLuminosityBlock() const
EntryDescriptionID id() const
unsigned int offset(bool)
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
bool wasFirstEventJustRead() const
std::string const & parameterSetMapBranchName()
Hash< ProcessHistoryType > ProcessHistoryID
EventPrincipal * readCurrentEvent(EventPrincipal &cache, boost::shared_ptr< RootFile > rootFilePtr, boost::shared_ptr< LuminosityBlockPrincipal > lb=boost::shared_ptr< LuminosityBlockPrincipal >())
boost::shared_ptr< EventSelectionIDVector > eventSelectionIDs_
std::string const & processHistoryBranchName()
IndexIntoFile & indexIntoFile_
EntryNumber const & entryNumber() const
bool goToEvent(EventID const &eventID)
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
std::vector< RunOrLumiEntry > & setRunOrLumiEntries()
void conversion(EventAux const &from, EventAuxiliary &to)
std::vector< EventNumber_t > & unsortedEventNumbers() const
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))
static Timestamp const & invalidTimestamp()
static EntryNumber_t const invalidEntry
boost::shared_ptr< DelayedReader > makeDelayedReader(FileFormatVersion const &fileFormatVersion, boost::shared_ptr< RootFile > rootFilePtr=boost::shared_ptr< RootFile >()) const
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
void setIfFastClonable(int remainingEvents, int remainingLumis)
void fillBranchEntry(TBranch *branch, T *&pbuf)
static LuminosityBlockNumber_t const invalidLumi
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
void readEntryDescriptionTree()
std::string const & parentageBranchName()
boost::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
LuminosityBlockNumber_t luminosityBlock() const
ProcessHistoryID const & processHistoryID(int i) const
ProductList & productListUpdator()
void setProcessHistoryID(ProcessHistoryID const &phid)
std::string const & productDescriptionBranchName()
std::string const & processConfigurationBranchName()
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
ProcessHistoryID const & processHistoryID() const
EventID const & id() const
bool branchListIndexesUnchanged_
void setEventFinder(boost::shared_ptr< EventFinder > ptr) const
author Stefano ARGIRO author Bill Tanenbaum
bool selected(BranchDescription const &desc) const
unsigned int const defaultNonEventCacheSize
std::vector< value_type > vector_type
RootTreePtrArray treePointers_
void fillEventNumbers() const
boost::shared_ptr< ProductRegistry const > productRegistry_
boost::shared_ptr< BranchMapper > makeBranchMapper(RootTree &rootTree, BranchType const &type) const
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
std::string const & productDependenciesBranchName()
void setNumberOfEvents(EntryNumber_t nevents) const
void overrideRunNumber(RunID &id)
std::string const & entryDescriptionIDBranchName()
BranchMap const & branches() const
std::vector< value_type > collection_type
boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > rpCache)
boost::shared_ptr< InputFile > filePtr_
void initializeDuplicateChecker(std::vector< boost::shared_ptr< IndexIntoFile > > const &indexesIntoFiles, std::vector< boost::shared_ptr< IndexIntoFile > >::size_type currentIndexIntoFile)
std::string const & branchIDListBranchName()
std::string const & branchListIndexesBranchName()
static ThreadSafeRegistry * instance()
boost::shared_ptr< ProvenanceAdaptor > provenanceAdaptor_
void fillThisEventAuxiliary()
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
boost::shared_ptr< BranchIDListRegistry::collection_type const > branchIDLists_
std::string const & eventHistoryTreeName()
RootFileEventFinder(RootTree &eventTree)
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
void initialize(GroupSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
std::string const & newBranchToOldBranch(std::string const &newBranch) const
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
unsigned int const defaultLearningEntries
boost::shared_ptr< EventSkipperByID > eventSkipperByID_
EntryNumber_t entry() const
TTree * eventHistoryTree_
LuminosityBlockNumber_t peekAheadAtLumi() const
std::string const & fileIdentifierBranchName()
void validateFile(bool secondaryFile, bool usingGoToEvent)
boost::shared_ptr< ProductRegistry const > productRegistry() const
Hash< ParentageType > ParentageID
virtual ~RootFileEventFinder()
EventNumber_t event() const
std::string const & moduleDescriptionMapBranchName()
boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
are no more events in the current run or lumi.
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
std::string createGlobalIdentifier()
void readEventHistoryTree()
void setEntryNumber(EntryNumber theEntryNumber)
void reportOpened(std::string const &inputType)
boost::shared_ptr< LuminosityBlockPrincipal > readLumi(boost::shared_ptr< LuminosityBlockPrincipal > lbCache)