CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::PoolSource Class Reference

#include <PoolSource.h>

Inheritance diagram for edm::PoolSource:
edm::VectorInputSource edm::EDInputSource edm::InputSource edm::ProductRegistryHelper

Public Member Functions

 PoolSource (ParameterSet const &pset, InputSourceDescription const &desc)
 
virtual ~PoolSource ()
 
- Public Member Functions inherited from edm::VectorInputSource
void dropUnwantedBranches (std::vector< std::string > const &wantedBranches)
 
template<typename T >
size_t loopRandom (EventPrincipal &cache, size_t number, T eventOperator)
 
template<typename T >
size_t loopRandomWithID (EventPrincipal &cache, LuminosityBlockID const &id, size_t number, T eventOperator)
 
template<typename T >
size_t loopSequential (EventPrincipal &cache, size_t number, T eventOperator)
 
template<typename T >
size_t loopSequentialWithID (EventPrincipal &cache, LuminosityBlockID const &id, size_t number, T eventOperator)
 
template<typename T , typename Collection >
size_t loopSpecified (EventPrincipal &cache, Collection const &events, T eventOperator)
 
 VectorInputSource (ParameterSet const &pset, InputSourceDescription const &desc)
 
virtual ~VectorInputSource ()
 
- Public Member Functions inherited from edm::EDInputSource
InputFileCatalogcatalog (int n=0)
 
 EDInputSource (ParameterSet const &pset, InputSourceDescription const &desc)
 
std::vector< FileCatalogItem >
const & 
fileCatalogItems (int n=0) const
 
std::vector< std::string > const & fileNames (int n=0) const
 
std::vector< std::string > const & logicalFileNames (int n=0) const
 
virtual ~EDInputSource ()
 
- Public Member Functions inherited from edm::InputSource
boost::shared_ptr
< ActivityRegistry
actReg () const
 Accessor for Activity Registry. More...
 
boost::shared_ptr
< BranchIDListHelper
branchIDListHelper () const
 Accessor for branchIDListHelper. More...
 
void closeFile (FileBlock *, bool cleaningUpAfterException)
 close current file More...
 
void doBeginJob ()
 Called by framework at beginning of job. More...
 
void doBeginLumi (LuminosityBlockPrincipal &lbp)
 Called by framework at beginning of lumi block. More...
 
void doBeginRun (RunPrincipal &rp)
 Called by framework at beginning of run. More...
 
void doEndJob ()
 Called by framework at end of job. More...
 
void doEndLumi (LuminosityBlockPrincipal &lbp, bool cleaningUpAfterException)
 Called by framework at end of lumi block. More...
 
void doEndRun (RunPrincipal &rp, bool cleaningUpAfterException)
 Called by framework at end of run. More...
 
void doPostForkReacquireResources (boost::shared_ptr< multicore::MessageReceiverForSource >)
 
void doPreForkReleaseResources ()
 Called by the framework before forking the process. More...
 
ProcessingController::ForwardState forwardState () const
 
bool goToEvent (EventID const &eventID)
 
 InputSource (ParameterSet const &, InputSourceDescription const &)
 Constructor. More...
 
 InputSource (InputSource const &)=delete
 
void issueReports (EventID const &eventID)
 issue an event report More...
 
LuminosityBlockNumber_t luminosityBlock () const
 Accessor for current luminosity block number. More...
 
boost::shared_ptr
< LuminosityBlockAuxiliary
luminosityBlockAuxiliary () const
 Called by the framework to merge or insert lumi in principal cache. More...
 
int maxEvents () const
 
int maxLuminosityBlocks () const
 
ModuleDescription const & moduleDescription () const
 Accessor for 'module' description. More...
 
ItemType nextItemType ()
 
InputSourceoperator= (InputSource const &)=delete
 
bool primary () const
 Accessor for primary input source flag. More...
 
ProcessConfiguration const & processConfiguration () const
 Accessor for Process Configuration. More...
 
std::string const & processGUID () const
 Accessor for global process identifier. More...
 
ProcessingMode processingMode () const
 RunsLumisAndEvents (default), RunsAndLumis, or Runs. More...
 
boost::shared_ptr
< ProductRegistry const > 
productRegistry () const
 Accessor for product registry. More...
 
bool randomAccess () const
 
boost::shared_ptr
< LuminosityBlockPrincipal
readAndCacheLumi (HistoryAppender &historyAppender)
 Read next luminosity block (new lumi) More...
 
boost::shared_ptr< RunPrincipalreadAndCacheRun (HistoryAppender &historyAppender)
 Read next run (new run) More...
 
void readAndMergeLumi (boost::shared_ptr< LuminosityBlockPrincipal > lbp)
 Read next luminosity block (same as a prior lumi) More...
 
void readAndMergeRun (boost::shared_ptr< RunPrincipal > rp)
 Read next run (same as a prior run) More...
 
EventPrincipalreadEvent (EventPrincipal &ep)
 
EventPrincipalreadEvent (EventPrincipal &ep, EventID const &)
 Read a specific event. More...
 
std::unique_ptr< FileBlockreadFile ()
 Read next file. More...
 
boost::shared_ptr
< LuminosityBlockAuxiliary
readLuminosityBlockAuxiliary ()
 Read next luminosity block Auxilary. More...
 
boost::shared_ptr< RunAuxiliaryreadRunAuxiliary ()
 Read next run Auxiliary. More...
 
ProcessHistoryID const & reducedProcessHistoryID () const
 
void registerProducts ()
 Register any produced products. More...
 
int remainingEvents () const
 
int remainingLuminosityBlocks () const
 
void repeat ()
 Reset the remaining number of events/lumis to the maximum number. More...
 
ProcessingController::ReverseState reverseState () const
 
void rewind ()
 Begin again at the first event. More...
 
RunNumber_t run () const
 Accessor for current run number. More...
 
boost::shared_ptr< RunAuxiliaryrunAuxiliary () const
 Called by the framework to merge or insert run in principal cache. More...
 
void setLuminosityBlockNumber_t (LuminosityBlockNumber_t lb)
 Set the luminosity block ID. More...
 
void setRunNumber (RunNumber_t r)
 Set the run number. More...
 
void skipEvents (int offset)
 
bool skipForForking ()
 
Timestamp const & timestamp () const
 Accessor for the current time, as seen by the input source. More...
 
virtual ~InputSource ()
 Destructor. More...
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDInputSource
static void fillDescription (ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::InputSource
static const std::string & baseType ()
 
static void fillDescription (ParameterSetDescription &desc)
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Private Member Functions

virtual void closeFile_ ()
 
virtual void dropUnwantedBranches_ (std::vector< std::string > const &wantedBranches)
 
virtual void endJob ()
 
virtual
ProcessingController::ForwardState 
forwardState_ () const
 
virtual ItemType getNextItemType ()
 
virtual bool goToEvent_ (EventID const &eventID)
 
virtual void preForkReleaseResources ()
 
virtual bool randomAccess_ () const
 
virtual EventPrincipalreadEvent_ (EventPrincipal &eventPrincipal)
 
virtual std::unique_ptr
< FileBlock
readFile_ ()
 
virtual EventPrincipalreadIt (EventID const &id, EventPrincipal &eventPrincipal)
 
virtual boost::shared_ptr
< LuminosityBlockPrincipal
readLuminosityBlock_ (boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal)
 
virtual boost::shared_ptr
< LuminosityBlockAuxiliary
readLuminosityBlockAuxiliary_ ()
 
virtual EventPrincipalreadOneRandom (EventPrincipal &cache)
 
virtual EventPrincipalreadOneRandomWithID (EventPrincipal &cache, LuminosityBlockID const &lumiID)
 
virtual EventPrincipalreadOneSequential (EventPrincipal &cache)
 
virtual EventPrincipalreadOneSequentialWithID (EventPrincipal &cache, LuminosityBlockID const &lumiID)
 
virtual EventPrincipalreadOneSpecified (EventPrincipal &cache, EventID const &id)
 
virtual boost::shared_ptr
< RunPrincipal
readRun_ (boost::shared_ptr< RunPrincipal > runPrincipal)
 
virtual boost::shared_ptr
< RunAuxiliary
readRunAuxiliary_ ()
 
virtual
ProcessingController::ReverseState 
reverseState_ () const
 
virtual void rewind_ ()
 
virtual void skip (int offset)
 

Private Attributes

std::array< std::vector
< BranchID >, NumBranchTypes
branchIDsToReplace_
 
std::unique_ptr
< RootInputFileSequence
primaryFileSequence_
 
RootServiceChecker rootServiceChecker_
 
std::unique_ptr< EventPrincipalsecondaryEventPrincipal_
 
std::unique_ptr
< RootInputFileSequence
secondaryFileSequence_
 
boost::shared_ptr
< LuminosityBlockPrincipal
secondaryLumiPrincipal_
 
boost::shared_ptr< RunPrincipalsecondaryRunPrincipal_
 

Additional Inherited Members

- Public Types inherited from edm::InputSource
enum  ItemType {
  IsInvalid, IsStop, IsFile, IsRun,
  IsLumi, IsEvent, IsRepeat
}
 
enum  ProcessingMode { Runs, RunsAndLumis, RunsLumisAndEvents }
 
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Protected Member Functions inherited from edm::InputSource
void decreaseRemainingEventsBy (int iSkipped)
 
bool eventCached () const
 
boost::shared_ptr
< LuminosityBlockPrincipal >
const 
luminosityBlockPrincipal () const
 
bool newLumi () const
 
bool newRun () const
 
ProductRegistryproductRegistryUpdate () const
 
void reset () const
 
void resetEventCached ()
 
void resetLuminosityBlockAuxiliary (bool isNewLumi=true) const
 
void resetNewLumi ()
 
void resetNewRun ()
 
void resetRunAuxiliary (bool isNewRun=true) const
 
boost::shared_ptr
< RunPrincipal > const 
runPrincipal () const
 
void setEventCached ()
 Called by the framework to merge or ached() const {return eventCached_;}. More...
 
void setLuminosityBlockAuxiliary (LuminosityBlockAuxiliary *lbp)
 
void setNewLumi ()
 
void setNewRun ()
 
void setRunAuxiliary (RunAuxiliary *rp)
 
void setTimestamp (Timestamp const &theTime)
 To set the current time, as seen by the input source. More...
 
ItemType state () const
 

Detailed Description

Definition at line 29 of file PoolSource.h.

Constructor & Destructor Documentation

edm::PoolSource::PoolSource ( ParameterSet const &  pset,
InputSourceDescription const &  desc 
)
explicit

Definition at line 54 of file PoolSource.cc.

References begin, branchIDsToReplace_, relativeConstraints::empty, end, HDQMDatabaseProducer::fullList, i, edm::InEvent, edm::InLumi, edm::InRun, edm::NumBranchTypes, edm::InputSource::primary(), primaryFileSequence_, edm::ProductRegistry::productListUpdator(), edm::InputSource::productRegistryUpdate(), secondaryFileSequence_, and findQualityFiles::size.

54  :
55  VectorInputSource(pset, desc),
57  primaryFileSequence_(new RootInputFileSequence(pset, *this, catalog(),
60  new RootInputFileSequence(pset, *this, catalog(1), InputType::SecondaryFile)),
63  secondaryEventPrincipal_(secondaryFileSequence_ ? new EventPrincipal(secondaryFileSequence_->fileProductRegistry(), secondaryFileSequence_->fileBranchIDListHelper(), processConfiguration(), nullptr) : 0),
66  assert(primary());
67  std::array<std::set<BranchID>, NumBranchTypes> idsToReplace;
68  ProductRegistry::ProductList const& secondary = secondaryFileSequence_->fileProductRegistry()->productList();
69  ProductRegistry::ProductList const& primary = primaryFileSequence_->fileProductRegistry()->productList();
70  typedef ProductRegistry::ProductList::const_iterator const_iterator;
71  typedef ProductRegistry::ProductList::iterator iterator;
72  //this is the registry used by the 'outside' world and only has the primary file information in it at present
74  for(const_iterator it = secondary.begin(), itEnd = secondary.end(); it != itEnd; ++it) {
75  if(it->second.present()) {
76  idsToReplace[it->second.branchType()].insert(it->second.branchID());
77  //now make sure this is marked as not dropped else the product will not be 'get'table from the Event
78  iterator itFound = fullList.find(it->first);
79  if(itFound != fullList.end()) {
80  itFound->second.dropped()=false;
81  }
82  }
83  }
84  for(const_iterator it = primary.begin(), itEnd = primary.end(); it != itEnd; ++it) {
85  if(it->second.present()) idsToReplace[it->second.branchType()].erase(it->second.branchID());
86  }
87  if(idsToReplace[InEvent].empty() && idsToReplace[InLumi].empty() && idsToReplace[InRun].empty()) {
88  secondaryFileSequence_.reset();
89  } else {
90  for(int i = InEvent; i < NumBranchTypes; ++i) {
91  branchIDsToReplace_[i].reserve(idsToReplace[i].size());
92  for(std::set<BranchID>::const_iterator it = idsToReplace[i].begin(), itEnd = idsToReplace[i].end();
93  it != itEnd; ++it) {
94  branchIDsToReplace_[i].push_back(*it);
95  }
96  }
97  }
98  }
99  }
int i
Definition: DBlmapReader.cc:9
std::map< BranchKey, BranchDescription > ProductList
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
boost::shared_ptr< RunPrincipal > secondaryRunPrincipal_
Definition: PoolSource.h:65
InputFileCatalog & catalog(int n=0)
Definition: EDInputSource.h:33
std::unique_ptr< EventPrincipal > secondaryEventPrincipal_
Definition: PoolSource.h:67
#define end
Definition: vmac.h:38
VectorInputSource(ParameterSet const &pset, InputSourceDescription const &desc)
ProductRegistry & productRegistryUpdate() const
Definition: InputSource.h:316
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
Definition: PoolSource.h:68
ProductList & productListUpdator()
bool primary() const
Accessor for primary input source flag.
Definition: InputSource.h:196
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
RootServiceChecker rootServiceChecker_
Definition: PoolSource.h:62
#define begin
Definition: vmac.h:31
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
Definition: PoolSource.h:66
ProcessConfiguration const & processConfiguration() const
Accessor for Process Configuration.
Definition: InputSource.h:193
tuple size
Write out results.
edm::PoolSource::~PoolSource ( )
virtual

Definition at line 101 of file PoolSource.cc.

101 {}

Member Function Documentation

void edm::PoolSource::closeFile_ ( )
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 119 of file PoolSource.cc.

References primaryFileSequence_.

119  {
120  primaryFileSequence_->closeFile_();
121  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
void edm::PoolSource::dropUnwantedBranches_ ( std::vector< std::string > const &  wantedBranches)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 266 of file PoolSource.cc.

References primaryFileSequence_, and secondaryFileSequence_.

266  {
267  assert(!secondaryFileSequence_);
268  primaryFileSequence_->dropUnwantedBranches_(wantedBranches);
269  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
void edm::PoolSource::endJob ( void  )
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 104 of file PoolSource.cc.

References primaryFileSequence_, edm::InputFile::reportReadBranches(), and secondaryFileSequence_.

104  {
106  primaryFileSequence_->endJob();
108  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
static void reportReadBranches()
Definition: InputFile.cc:100
void edm::PoolSource::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 272 of file PoolSource.cc.

References edm::ConfigurationDescriptions::add(), edm::EDInputSource::fillDescription(), edm::RootInputFileSequence::fillDescription(), and edm::ParameterSetDescription::setComment().

272  {
273 
275 
276  desc.setComment("Reads EDM/Root files.");
279 
280  descriptions.add("source", desc);
281  }
static void fillDescription(ParameterSetDescription &desc)
static void fillDescription(ParameterSetDescription &desc)
ProcessingController::ForwardState edm::PoolSource::forwardState_ ( ) const
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 289 of file PoolSource.cc.

References primaryFileSequence_.

289  {
290  return primaryFileSequence_->forwardState();
291  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
InputSource::ItemType edm::PoolSource::getNextItemType ( )
privatevirtual

Implements edm::InputSource.

Definition at line 209 of file PoolSource.cc.

References primaryFileSequence_.

209  {
210  return primaryFileSequence_->getNextItemType();;
211  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
bool edm::PoolSource::goToEvent_ ( EventID const &  eventID)
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 231 of file PoolSource.cc.

References primaryFileSequence_.

231  {
232  return primaryFileSequence_->goToEvent(eventID);
233  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
void edm::PoolSource::preForkReleaseResources ( )
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 214 of file PoolSource.cc.

References primaryFileSequence_.

214  {
215  primaryFileSequence_->closeFile_();
216  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
bool edm::PoolSource::randomAccess_ ( ) const
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 284 of file PoolSource.cc.

284  {
285  return true;
286  }
EventPrincipal * edm::PoolSource::readEvent_ ( EventPrincipal eventPrincipal)
privatevirtual

Implements edm::InputSource.

Definition at line 179 of file PoolSource.cc.

References branchIDsToReplace_, relativeConstraints::empty, edm::EventID::event(), edm::hlt::Exception, newFWLiteAna::found, edm::EventPrincipal::id(), edm::InEvent, edm::EventPrincipal::luminosityBlock(), edm::EventPrincipal::mergeMappers(), edm::errors::MismatchedInputFiles, primaryFileSequence_, edm::Principal::recombine(), edm::EventPrincipal::run(), secondaryEventPrincipal_, and secondaryFileSequence_.

Referenced by readIt().

179  {
180  EventSourceSentry sentry{*this};
181  EventPrincipal* primaryPrincipal = primaryFileSequence_->readEvent(eventPrincipal);
183  bool found = secondaryFileSequence_->skipToItem(primaryPrincipal->run(),
184  primaryPrincipal->luminosityBlock(),
185  primaryPrincipal->id().event());
186  if(found) {
187  EventPrincipal* secondaryPrincipal = secondaryFileSequence_->readEvent(*secondaryEventPrincipal_);
188  checkConsistency(*primaryPrincipal, *secondaryPrincipal);
189  checkHistoryConsistency(*primaryPrincipal, *secondaryPrincipal);
190  primaryPrincipal->recombine(*secondaryPrincipal, branchIDsToReplace_[InEvent]);
191  primaryPrincipal->mergeMappers(*secondaryPrincipal);
192  secondaryEventPrincipal_->clearPrincipal();
193  } else {
194  throw Exception(errors::MismatchedInputFiles, "PoolSource::readEvent_") <<
195  primaryPrincipal->id() << " is not found in the secondary input files\n";
196  }
197  }
198  return primaryPrincipal;
199  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< EventPrincipal > secondaryEventPrincipal_
Definition: PoolSource.h:67
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
Definition: PoolSource.h:68
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
std::unique_ptr< FileBlock > edm::PoolSource::readFile_ ( )
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 111 of file PoolSource.cc.

References benchmark_cfg::fb, edm::FileBlock::HasSecondaryFileSequence, primaryFileSequence_, and secondaryFileSequence_.

111  {
112  std::unique_ptr<FileBlock> fb = primaryFileSequence_->readFile_();
114  fb->setNotFastClonable(FileBlock::HasSecondaryFileSequence);
115  }
116  return std::move(fb);
117  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
EventPrincipal * edm::PoolSource::readIt ( EventID const &  id,
EventPrincipal eventPrincipal 
)
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 202 of file PoolSource.cc.

References event(), newFWLiteAna::found, edm::InputSource::luminosityBlock(), primaryFileSequence_, readEvent_(), and edm::InputSource::run().

202  {
203  bool found = primaryFileSequence_->skipToItem(id.run(), id.luminosityBlock(), id.event());
204  if(!found) return 0;
205  return readEvent_(eventPrincipal);
206  }
RunNumber_t run() const
Accessor for current run number.
Definition: InputSource.cc:605
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
LuminosityBlockNumber_t luminosityBlock() const
Accessor for current luminosity block number.
Definition: InputSource.cc:611
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
virtual EventPrincipal * readEvent_(EventPrincipal &eventPrincipal)
Definition: PoolSource.cc:179
boost::shared_ptr< LuminosityBlockPrincipal > edm::PoolSource::readLuminosityBlock_ ( boost::shared_ptr< LuminosityBlockPrincipal lumiPrincipal)
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 156 of file PoolSource.cc.

References branchIDsToReplace_, relativeConstraints::empty, edm::hlt::Exception, newFWLiteAna::found, edm::InLumi, edm::errors::MismatchedInputFiles, primaryFileSequence_, edm::InputSource::processConfiguration(), secondaryFileSequence_, and secondaryLumiPrincipal_.

156  {
158  boost::shared_ptr<LuminosityBlockPrincipal> primaryPrincipal = primaryFileSequence_->readLuminosityBlock_(lumiPrincipal);
159  bool found = secondaryFileSequence_->skipToItem(primaryPrincipal->run(), primaryPrincipal->luminosityBlock(), 0U);
160  if(found) {
161  boost::shared_ptr<LuminosityBlockAuxiliary> secondaryAuxiliary = secondaryFileSequence_->readLuminosityBlockAuxiliary_();
162  checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
163  boost::shared_ptr<LuminosityBlockPrincipal> lbp(new LuminosityBlockPrincipal(secondaryAuxiliary, secondaryFileSequence_->fileProductRegistry(), processConfiguration(), nullptr));
164  secondaryLumiPrincipal_ = secondaryFileSequence_->readLuminosityBlock_(lbp);
165  checkHistoryConsistency(*primaryPrincipal, *secondaryLumiPrincipal_);
166  primaryPrincipal->recombine(*secondaryLumiPrincipal_, branchIDsToReplace_[InLumi]);
167  } else {
168  throw Exception(errors::MismatchedInputFiles, "PoolSource::readLuminosityBlock_")
169  << " Run " << primaryPrincipal->run()
170  << " LuminosityBlock " << primaryPrincipal->luminosityBlock()
171  << " is not found in the secondary input files\n";
172  }
173  return primaryPrincipal;
174  }
175  return primaryFileSequence_->readLuminosityBlock_(lumiPrincipal);
176  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
Definition: PoolSource.h:68
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
Definition: PoolSource.h:66
ProcessConfiguration const & processConfiguration() const
Accessor for Process Configuration.
Definition: InputSource.h:193
boost::shared_ptr< LuminosityBlockAuxiliary > edm::PoolSource::readLuminosityBlockAuxiliary_ ( )
privatevirtual

Implements edm::InputSource.

Definition at line 129 of file PoolSource.cc.

References primaryFileSequence_.

129  {
130  return primaryFileSequence_->readLuminosityBlockAuxiliary_();
131  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
EventPrincipal * edm::PoolSource::readOneRandom ( EventPrincipal cache)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 236 of file PoolSource.cc.

References primaryFileSequence_, and secondaryFileSequence_.

236  {
237  assert(!secondaryFileSequence_);
238  return primaryFileSequence_->readOneRandom(cache);
239  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
EventPrincipal * edm::PoolSource::readOneRandomWithID ( EventPrincipal cache,
LuminosityBlockID const &  lumiID 
)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 242 of file PoolSource.cc.

References primaryFileSequence_, and secondaryFileSequence_.

242  {
243  assert(!secondaryFileSequence_);
244  return primaryFileSequence_->readOneRandomWithID(cache, lumiID);
245  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
EventPrincipal * edm::PoolSource::readOneSequential ( EventPrincipal cache)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 248 of file PoolSource.cc.

References primaryFileSequence_, and secondaryFileSequence_.

248  {
249  assert(!secondaryFileSequence_);
250  return primaryFileSequence_->readOneSequential(cache);
251  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
EventPrincipal * edm::PoolSource::readOneSequentialWithID ( EventPrincipal cache,
LuminosityBlockID const &  lumiID 
)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 254 of file PoolSource.cc.

References primaryFileSequence_, and secondaryFileSequence_.

254  {
255  assert(!secondaryFileSequence_);
256  return primaryFileSequence_->readOneSequentialWithID(cache, lumiID);
257  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
EventPrincipal * edm::PoolSource::readOneSpecified ( EventPrincipal cache,
EventID const &  id 
)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 260 of file PoolSource.cc.

References primaryFileSequence_, and secondaryFileSequence_.

260  {
261  assert(!secondaryFileSequence_);
262  return primaryFileSequence_->readOneSpecified(cache, id);
263  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
boost::shared_ptr< RunPrincipal > edm::PoolSource::readRun_ ( boost::shared_ptr< RunPrincipal runPrincipal)
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 134 of file PoolSource.cc.

References branchIDsToReplace_, relativeConstraints::empty, edm::hlt::Exception, newFWLiteAna::found, edm::InRun, edm::errors::MismatchedInputFiles, primaryFileSequence_, edm::InputSource::processConfiguration(), secondaryFileSequence_, and secondaryRunPrincipal_.

134  {
136  boost::shared_ptr<RunPrincipal> primaryPrincipal = primaryFileSequence_->readRun_(runPrincipal);
137  bool found = secondaryFileSequence_->skipToItem(primaryPrincipal->run(), 0U, 0U);
138  if(found) {
139  boost::shared_ptr<RunAuxiliary> secondaryAuxiliary = secondaryFileSequence_->readRunAuxiliary_();
140  checkConsistency(primaryPrincipal->aux(), *secondaryAuxiliary);
141  boost::shared_ptr<RunPrincipal> rp(new RunPrincipal(secondaryAuxiliary, secondaryFileSequence_->fileProductRegistry(), processConfiguration(), nullptr));
143  checkHistoryConsistency(*primaryPrincipal, *secondaryRunPrincipal_);
144  primaryPrincipal->recombine(*secondaryRunPrincipal_, branchIDsToReplace_[InRun]);
145  } else {
146  throw Exception(errors::MismatchedInputFiles, "PoolSource::readRun_")
147  << " Run " << primaryPrincipal->run()
148  << " is not found in the secondary input files\n";
149  }
150  return primaryPrincipal;
151  }
152  return primaryFileSequence_->readRun_(runPrincipal);
153  }
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
boost::shared_ptr< RunPrincipal > secondaryRunPrincipal_
Definition: PoolSource.h:65
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
Definition: PoolSource.h:68
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
boost::shared_ptr< RunPrincipal > const runPrincipal() const
ProcessConfiguration const & processConfiguration() const
Accessor for Process Configuration.
Definition: InputSource.h:193
boost::shared_ptr< RunAuxiliary > edm::PoolSource::readRunAuxiliary_ ( )
privatevirtual

Implements edm::InputSource.

Definition at line 124 of file PoolSource.cc.

References primaryFileSequence_.

124  {
125  return primaryFileSequence_->readRunAuxiliary_();
126  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
ProcessingController::ReverseState edm::PoolSource::reverseState_ ( ) const
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 294 of file PoolSource.cc.

References primaryFileSequence_.

294  {
295  return primaryFileSequence_->reverseState();
296  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
void edm::PoolSource::rewind_ ( )
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 220 of file PoolSource.cc.

References primaryFileSequence_.

220  {
221  primaryFileSequence_->rewind_();
222  }
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
void edm::PoolSource::skip ( int  offset)
privatevirtual

Reimplemented from edm::InputSource.

Definition at line 226 of file PoolSource.cc.

References primaryFileSequence_.

226  {
227  primaryFileSequence_->skipEvents(offset);
228  }
unsigned int offset(bool)
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63

Member Data Documentation

std::array<std::vector<BranchID>, NumBranchTypes> edm::PoolSource::branchIDsToReplace_
private

Definition at line 68 of file PoolSource.h.

Referenced by PoolSource(), readEvent_(), readLuminosityBlock_(), and readRun_().

std::unique_ptr<RootInputFileSequence> edm::PoolSource::primaryFileSequence_
private
RootServiceChecker edm::PoolSource::rootServiceChecker_
private

Definition at line 62 of file PoolSource.h.

std::unique_ptr<EventPrincipal> edm::PoolSource::secondaryEventPrincipal_
private

Definition at line 67 of file PoolSource.h.

Referenced by readEvent_().

std::unique_ptr<RootInputFileSequence> edm::PoolSource::secondaryFileSequence_
private
boost::shared_ptr<LuminosityBlockPrincipal> edm::PoolSource::secondaryLumiPrincipal_
private

Definition at line 66 of file PoolSource.h.

Referenced by readLuminosityBlock_().

boost::shared_ptr<RunPrincipal> edm::PoolSource::secondaryRunPrincipal_
private

Definition at line 65 of file PoolSource.h.

Referenced by readRun_().