CMS 3D CMS Logo

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

#include <VectorInputSource.h>

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

Public Member Functions

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 ()
 

Private Member Functions

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

Private Attributes

std::unique_ptr
< ProcessHistoryRegistry
processHistoryRegistry_
 
std::shared_ptr< ProductRegistryproductRegistry_
 

Detailed Description

Definition at line 26 of file VectorInputSource.h.

Constructor & Destructor Documentation

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

Definition at line 11 of file VectorInputSource.cc.

11  :
12  productRegistry_(desc.productRegistry_),
13  processHistoryRegistry_(new ProcessHistoryRegistry) {
14  }
std::shared_ptr< ProductRegistry > productRegistry_
std::unique_ptr< ProcessHistoryRegistry > processHistoryRegistry_
edm::VectorInputSource::~VectorInputSource ( )
virtual

Definition at line 16 of file VectorInputSource.cc.

16 {}

Member Function Documentation

virtual void edm::VectorInputSource::beginJob ( )
privatepure virtual

Implemented in edm::EmbeddedRootSource.

Referenced by doBeginJob().

void edm::VectorInputSource::clearEventPrincipal ( EventPrincipal cache)
private

Definition at line 24 of file VectorInputSource.cc.

References edm::EventPrincipal::clearEventPrincipal().

Referenced by loopOverEvents(), and loopSpecified().

24  {
25  cache.clearEventPrincipal();
26  }
void edm::VectorInputSource::doBeginJob ( )

Called at beginning of job.

Definition at line 29 of file VectorInputSource.cc.

References beginJob().

29  {
30  this->beginJob();
31  }
virtual void beginJob()=0
void edm::VectorInputSource::doEndJob ( )

Called at end of job.

Definition at line 34 of file VectorInputSource.cc.

References endJob().

34  {
35  this->endJob();
36  }
virtual void endJob()=0
void edm::VectorInputSource::dropUnwantedBranches ( std::vector< std::string > const &  wantedBranches)

Definition at line 19 of file VectorInputSource.cc.

References dropUnwantedBranches_().

19  {
20  this->dropUnwantedBranches_(wantedBranches);
21  }
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)=0
virtual void edm::VectorInputSource::dropUnwantedBranches_ ( std::vector< std::string > const &  wantedBranches)
privatepure virtual

Implemented in edm::EmbeddedRootSource.

Referenced by dropUnwantedBranches().

virtual void edm::VectorInputSource::endJob ( )
privatepure virtual

Implemented in edm::EmbeddedRootSource.

Referenced by doEndJob().

template<typename T >
size_t edm::VectorInputSource::loopOverEvents ( EventPrincipal cache,
size_t &  fileNameHash,
size_t  number,
T  eventOperator,
CLHEP::HepRandomEngine *  engine = nullptr,
EventID const *  id = nullptr 
)

Definition at line 71 of file VectorInputSource.h.

References clearEventPrincipal(), newFWLiteAna::found, i, contentValuesFiles::number, and readOneEvent().

71  {
72  size_t i = 0U;
73  for(; i < number; ++i) {
74  clearEventPrincipal(cache);
75  bool found = readOneEvent(cache, fileNameHash, engine, id);
76  if(!found) break;
77  eventOperator(cache, fileNameHash);
78  }
79  return i;
80  }
int i
Definition: DBlmapReader.cc:9
void clearEventPrincipal(EventPrincipal &cache)
virtual bool readOneEvent(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id)=0
template<typename T , typename Iterator >
size_t edm::VectorInputSource::loopSpecified ( EventPrincipal cache,
size_t &  fileNameHash,
Iterator const &  begin,
Iterator const &  end,
T  eventOperator 
)

Definition at line 83 of file VectorInputSource.h.

References clearEventPrincipal(), end, i, and readOneSpecified().

83  {
84  size_t i = 0U;
85  for(Iterator iter = begin; iter != end; ++iter) {
86  clearEventPrincipal(cache);
87  readOneSpecified(cache, fileNameHash, *iter);
88  eventOperator(cache, fileNameHash);
89  ++i;
90  }
91  return i;
92  }
int i
Definition: DBlmapReader.cc:9
void clearEventPrincipal(EventPrincipal &cache)
#define end
Definition: vmac.h:37
#define begin
Definition: vmac.h:30
virtual void readOneSpecified(EventPrincipal &cache, size_t &fileNameHash, SecondaryEventIDAndFileInfo const &event)=0
ProcessHistoryRegistry const& edm::VectorInputSource::processHistoryRegistry ( ) const
inline

Definition at line 47 of file VectorInputSource.h.

References processHistoryRegistry_.

47 {return *processHistoryRegistry_;}
std::unique_ptr< ProcessHistoryRegistry > processHistoryRegistry_
ProcessHistoryRegistry& edm::VectorInputSource::processHistoryRegistryForUpdate ( )
inline

Definition at line 48 of file VectorInputSource.h.

References processHistoryRegistry_.

Referenced by edm::RootEmbeddedFileSequence::makeRootFile().

48 {return *processHistoryRegistry_;}
std::unique_ptr< ProcessHistoryRegistry > processHistoryRegistry_
std::shared_ptr<ProductRegistry const> edm::VectorInputSource::productRegistry ( ) const
inline

Definition at line 45 of file VectorInputSource.h.

References productRegistry_.

45 {return productRegistry_;}
std::shared_ptr< ProductRegistry > productRegistry_
ProductRegistry& edm::VectorInputSource::productRegistryUpdate ( ) const
inline

Definition at line 46 of file VectorInputSource.h.

References productRegistry_.

Referenced by edm::RootEmbeddedFileSequence::RootEmbeddedFileSequence().

46 {return *productRegistry_;}
std::shared_ptr< ProductRegistry > productRegistry_
virtual bool edm::VectorInputSource::readOneEvent ( EventPrincipal cache,
size_t &  fileNameHash,
CLHEP::HepRandomEngine *  ,
EventID const *  id 
)
privatepure virtual

Implemented in edm::EmbeddedRootSource.

Referenced by loopOverEvents().

virtual void edm::VectorInputSource::readOneSpecified ( EventPrincipal cache,
size_t &  fileNameHash,
SecondaryEventIDAndFileInfo const &  event 
)
privatepure virtual

Implemented in edm::EmbeddedRootSource.

Referenced by loopSpecified(), and readOneSpecified().

void edm::VectorInputSource::readOneSpecified ( EventPrincipal cache,
size_t &  fileNameHash,
EventID const &  event 
)
inlineprivate

Definition at line 57 of file VectorInputSource.h.

References info(), and readOneSpecified().

57  {
58  SecondaryEventIDAndFileInfo info(event, fileNameHash);
59  readOneSpecified(cache, fileNameHash, info);
60  }
static const TGPicture * info(bool iBackgroundIsBlack)
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
virtual void readOneSpecified(EventPrincipal &cache, size_t &fileNameHash, SecondaryEventIDAndFileInfo const &event)=0

Member Data Documentation

std::unique_ptr<ProcessHistoryRegistry> edm::VectorInputSource::processHistoryRegistry_
private

Definition at line 67 of file VectorInputSource.h.

Referenced by processHistoryRegistry(), and processHistoryRegistryForUpdate().

std::shared_ptr<ProductRegistry> edm::VectorInputSource::productRegistry_
private

Definition at line 66 of file VectorInputSource.h.

Referenced by productRegistry(), and productRegistryUpdate().