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
 
std::shared_ptr
< ProductRegistry > & 
productRegistry ()
 
ProductRegistryproductRegistryUpdate ()
 
 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

edm::propagate_const
< std::unique_ptr
< ProcessHistoryRegistry > > 
processHistoryRegistry_
 
edm::propagate_const
< std::shared_ptr
< ProductRegistry > > 
productRegistry_
 

Detailed Description

Definition at line 27 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  }
edm::propagate_const< std::unique_ptr< ProcessHistoryRegistry > > processHistoryRegistry_
edm::propagate_const< std::shared_ptr< ProductRegistry > > productRegistry_
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 73 of file VectorInputSource.h.

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

73  {
74  size_t i = 0U;
75  for(; i < number; ++i) {
76  clearEventPrincipal(cache);
77  bool found = readOneEvent(cache, fileNameHash, engine, id);
78  if(!found) break;
79  eventOperator(cache, fileNameHash);
80  }
81  return i;
82  }
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 85 of file VectorInputSource.h.

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

85  {
86  size_t i = 0U;
87  for(Iterator iter = begin; iter != end; ++iter) {
88  clearEventPrincipal(cache);
89  readOneSpecified(cache, fileNameHash, *iter);
90  eventOperator(cache, fileNameHash);
91  ++i;
92  }
93  return i;
94  }
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 49 of file VectorInputSource.h.

References processHistoryRegistry_.

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

Definition at line 50 of file VectorInputSource.h.

References processHistoryRegistry_.

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

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

Definition at line 46 of file VectorInputSource.h.

References edm::get_underlying_safe(), and productRegistry_.

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProductRegistry > > productRegistry_
std::shared_ptr<ProductRegistry>& edm::VectorInputSource::productRegistry ( )
inline

Definition at line 47 of file VectorInputSource.h.

References edm::get_underlying_safe(), and productRegistry_.

std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< std::shared_ptr< ProductRegistry > > productRegistry_
ProductRegistry& edm::VectorInputSource::productRegistryUpdate ( )
inline

Definition at line 48 of file VectorInputSource.h.

References productRegistry_.

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

48 {return *productRegistry_;}
edm::propagate_const< 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 59 of file VectorInputSource.h.

References info(), and readOneSpecified().

59  {
60  SecondaryEventIDAndFileInfo info(event, fileNameHash);
61  readOneSpecified(cache, fileNameHash, info);
62  }
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

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

Definition at line 69 of file VectorInputSource.h.

Referenced by processHistoryRegistry(), and processHistoryRegistryForUpdate().

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

Definition at line 68 of file VectorInputSource.h.

Referenced by productRegistry(), and productRegistryUpdate().