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::EmbeddedRootSource Class Reference

#include <EmbeddedRootSource.h>

Inheritance diagram for edm::EmbeddedRootSource:
edm::VectorInputSource

Public Member Functions

 EmbeddedRootSource (ParameterSet const &pset, VectorInputSourceDescription const &desc)
 
virtual ~EmbeddedRootSource ()
 
- Public Member Functions inherited from edm::VectorInputSource
void doBeginJob ()
 Called at beginning of job. More...
 
void doEndJob ()
 Called at end of job. More...
 
void dropUnwantedBranches (std::vector< std::string > const &wantedBranches)
 
template<typename T >
size_t loopOverEvents (EventPrincipal &cache, size_t &fileNameHash, size_t number, T eventOperator, CLHEP::HepRandomEngine *=nullptr, EventID const *id=nullptr)
 
template<typename T , typename Iterator >
size_t loopSpecified (EventPrincipal &cache, size_t &fileNameHash, Iterator const &begin, Iterator const &end, T eventOperator)
 
ProcessHistoryRegistry const & processHistoryRegistry () const
 
ProcessHistoryRegistryprocessHistoryRegistryForUpdate ()
 
std::shared_ptr
< ProductRegistry const > 
productRegistry () const
 
ProductRegistryproductRegistryUpdate () const
 
 VectorInputSource (ParameterSet const &pset, VectorInputSourceDescription const &desc)
 
virtual ~VectorInputSource ()
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void beginJob ()
 
virtual void closeFile_ ()
 
virtual void dropUnwantedBranches_ (std::vector< std::string > const &wantedBranches)
 
virtual void endJob ()
 
virtual bool readOneEvent (EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id) override
 
virtual void readOneSpecified (EventPrincipal &cache, size_t &fileNameHash, SecondaryEventIDAndFileInfo const &id)
 

Private Attributes

InputFileCatalog catalog_
 
std::unique_ptr
< RootEmbeddedFileSequence
fileSequence_
 
RootServiceChecker rootServiceChecker_
 

Detailed Description

Definition at line 31 of file EmbeddedRootSource.h.

Constructor & Destructor Documentation

edm::EmbeddedRootSource::EmbeddedRootSource ( ParameterSet const &  pset,
VectorInputSourceDescription const &  desc 
)
explicit

Definition at line 15 of file EmbeddedRootSource.cc.

15  :
16  VectorInputSource(pset, desc),
18  catalog_(pset.getUntrackedParameter<std::vector<std::string> >("fileNames"),
19  pset.getUntrackedParameter<std::string>("overrideCatalog", std::string())),
20  fileSequence_(new RootEmbeddedFileSequence(pset, *this, catalog_, desc.allocations_->numberOfStreams())) {
21  }
VectorInputSource(ParameterSet const &pset, VectorInputSourceDescription const &desc)
std::unique_ptr< RootEmbeddedFileSequence > fileSequence_
RootServiceChecker rootServiceChecker_
edm::EmbeddedRootSource::~EmbeddedRootSource ( )
virtual

Definition at line 23 of file EmbeddedRootSource.cc.

23 {}

Member Function Documentation

void edm::EmbeddedRootSource::beginJob ( void  )
privatevirtual

Implements edm::VectorInputSource.

Definition at line 26 of file EmbeddedRootSource.cc.

26  {
27  }
void edm::EmbeddedRootSource::closeFile_ ( )
privatevirtual

Definition at line 35 of file EmbeddedRootSource.cc.

References fileSequence_.

35  {
36  fileSequence_->closeFile_();
37  }
std::unique_ptr< RootEmbeddedFileSequence > fileSequence_
void edm::EmbeddedRootSource::dropUnwantedBranches_ ( std::vector< std::string > const &  wantedBranches)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 50 of file EmbeddedRootSource.cc.

References fileSequence_.

50  {
51  fileSequence_->dropUnwantedBranches_(wantedBranches);
52  }
std::unique_ptr< RootEmbeddedFileSequence > fileSequence_
void edm::EmbeddedRootSource::endJob ( void  )
privatevirtual

Implements edm::VectorInputSource.

Definition at line 30 of file EmbeddedRootSource.cc.

References fileSequence_, and edm::InputFile::reportReadBranches().

30  {
31  fileSequence_->endJob();
33  }
std::unique_ptr< RootEmbeddedFileSequence > fileSequence_
static void reportReadBranches()
Definition: InputFile.cc:113
void edm::EmbeddedRootSource::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 55 of file EmbeddedRootSource.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), edm::RootEmbeddedFileSequence::fillDescription(), edm::ParameterSetDescription::setComment(), and AlCaHLTBitMon_QueryRunRegistry::string.

55  {
56 
58 
59  std::vector<std::string> defaultStrings;
60  desc.setComment("Reads EDM/Root files for mixing.");
61  desc.addUntracked<std::vector<std::string> >("fileNames")
62  ->setComment("Names of files to be processed.");
63  desc.addUntracked<std::string>("overrideCatalog", std::string());
65 
66  descriptions.add("source", desc);
67  }
static void fillDescription(ParameterSetDescription &desc)
bool edm::EmbeddedRootSource::readOneEvent ( EventPrincipal cache,
size_t &  fileNameHash,
CLHEP::HepRandomEngine *  engine,
EventID const *  id 
)
overrideprivatevirtual

Implements edm::VectorInputSource.

Definition at line 40 of file EmbeddedRootSource.cc.

References fileSequence_.

40  {
41  return fileSequence_->readOneEvent(cache, fileNameHash, engine, id);
42  }
std::unique_ptr< RootEmbeddedFileSequence > fileSequence_
void edm::EmbeddedRootSource::readOneSpecified ( EventPrincipal cache,
size_t &  fileNameHash,
SecondaryEventIDAndFileInfo const &  id 
)
privatevirtual

Implements edm::VectorInputSource.

Definition at line 45 of file EmbeddedRootSource.cc.

References fileSequence_.

45  {
46  fileSequence_->readOneSpecified(cache, fileNameHash, id);
47  }
std::unique_ptr< RootEmbeddedFileSequence > fileSequence_

Member Data Documentation

InputFileCatalog edm::EmbeddedRootSource::catalog_
private

Definition at line 49 of file EmbeddedRootSource.h.

std::unique_ptr<RootEmbeddedFileSequence> edm::EmbeddedRootSource::fileSequence_
private
RootServiceChecker edm::EmbeddedRootSource::rootServiceChecker_
private

Definition at line 48 of file EmbeddedRootSource.h.