CMS 3D CMS Logo

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

#include <EDAnalyzerBase.h>

Inheritance diagram for edm::one::EDAnalyzerBase:
edm::EDConsumerBase edm::one::EDAnalyzer< T >

Public Types

typedef EDAnalyzerBase ModuleType
 

Public Member Functions

 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Static Public Member Functions

static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

virtual void analyze (Event const &, EventSetup const &)=0
 
virtual void beginJob ()
 
void doBeginJob ()
 
void doBeginLuminosityBlock (LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doBeginLuminosityBlock_ (LuminosityBlock const &lbp, EventSetup const &c)
 
void doBeginRun (RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doBeginRun_ (Run const &rp, EventSetup const &c)
 
void doEndJob ()
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doEndLuminosityBlock_ (LuminosityBlock const &lbp, EventSetup const &c)
 
void doEndRun (RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *)
 
virtual void doEndRun_ (Run const &rp, EventSetup const &c)
 
bool doEvent (EventPrincipal &ep, EventSetup const &c, ModuleCallingContext const *)
 
void doPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void doPreallocate (PreallocationConfiguration const &)
 
void doPreForkReleaseResources ()
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
virtual void endJob ()
 
void registerProductsAndCallbacks (EDAnalyzerBase const *module, ProductRegistry *reg)
 
void setModuleDescription (ModuleDescription const &md)
 
std::string workerType () const
 

Private Attributes

std::function< void(BranchDescription
const &)> 
callWhenNewProductsRegistered_
 
ModuleDescription moduleDescription_
 

Friends

template<typename T >
class edm::maker::ModuleHolderT
 
template<typename T >
class edm::WorkerT
 

Detailed Description

Definition at line 41 of file EDAnalyzerBase.h.

Member Typedef Documentation

Definition at line 48 of file EDAnalyzerBase.h.

Constructor & Destructor Documentation

EDAnalyzerBase::EDAnalyzerBase ( )

Definition at line 41 of file EDAnalyzerBase.cc.

41  :
42  moduleDescription_() { }
ModuleDescription moduleDescription_
EDAnalyzerBase::~EDAnalyzerBase ( )
virtual

Definition at line 44 of file EDAnalyzerBase.cc.

45  {
46  }

Member Function Documentation

virtual void edm::one::EDAnalyzerBase::analyze ( Event const &  ,
EventSetup const &   
)
privatepure virtual

Referenced by doEvent().

const std::string & EDAnalyzerBase::baseType ( )
static

Definition at line 143 of file EDAnalyzerBase.cc.

References edm::one::kBaseType().

143  {
144  return kBaseType;
145  }
static const std::string kBaseType("EDAnalyzer")
virtual void edm::one::EDAnalyzerBase::beginJob ( void  )
inlineprivatevirtual

Definition at line 92 of file EDAnalyzerBase.h.

Referenced by doBeginJob().

92 {}
void edm::one::EDAnalyzerBase::callWhenNewProductsRegistered ( std::function< void(BranchDescription const &)> const &  func)
protected
void EDAnalyzerBase::doBeginJob ( )
private

Definition at line 58 of file EDAnalyzerBase.cc.

References beginJob().

58  {
59  this->beginJob();
60  }
void EDAnalyzerBase::doBeginLuminosityBlock ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 86 of file EDAnalyzerBase.cc.

References doBeginLuminosityBlock_(), moduleDescription_, and edm::LuminosityBlock::setConsumer().

87  {
88  LuminosityBlock lb(lbp, moduleDescription_, mcc);
89  lb.setConsumer(this);
90  LuminosityBlock const& cnstLb = lb;
91  this->doBeginLuminosityBlock_(cnstLb, c);
92  }
ModuleDescription moduleDescription_
virtual void doBeginLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
void EDAnalyzerBase::doBeginLuminosityBlock_ ( LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 125 of file EDAnalyzerBase.cc.

Referenced by doBeginLuminosityBlock().

125 {}
void EDAnalyzerBase::doBeginRun ( RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 68 of file EDAnalyzerBase.cc.

References doBeginRun_(), moduleDescription_, alignCSCRings::r, and edm::Run::setConsumer().

69  {
70  Run r(rp, moduleDescription_, mcc);
71  r.setConsumer(this);
72  Run const& cnstR = r;
73  this->doBeginRun_(cnstR, c);
74  }
ModuleDescription moduleDescription_
virtual void doBeginRun_(Run const &rp, EventSetup const &c)
void EDAnalyzerBase::doBeginRun_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 123 of file EDAnalyzerBase.cc.

Referenced by doBeginRun().

123 {}
void EDAnalyzerBase::doEndJob ( )
private

Definition at line 63 of file EDAnalyzerBase.cc.

References endJob().

63  {
64  this->endJob();
65  }
void EDAnalyzerBase::doEndLuminosityBlock ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 95 of file EDAnalyzerBase.cc.

References doEndLuminosityBlock_(), moduleDescription_, and edm::LuminosityBlock::setConsumer().

96  {
97  LuminosityBlock lb(lbp, moduleDescription_, mcc);
98  lb.setConsumer(this);
99  LuminosityBlock const& cnstLb = lb;
100  this->doEndLuminosityBlock_(cnstLb, c);
101  }
virtual void doEndLuminosityBlock_(LuminosityBlock const &lbp, EventSetup const &c)
ModuleDescription moduleDescription_
void EDAnalyzerBase::doEndLuminosityBlock_ ( LuminosityBlock const &  lbp,
EventSetup const &  c 
)
privatevirtual

Definition at line 126 of file EDAnalyzerBase.cc.

Referenced by doEndLuminosityBlock().

126 {}
void EDAnalyzerBase::doEndRun ( RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 77 of file EDAnalyzerBase.cc.

References doEndRun_(), moduleDescription_, alignCSCRings::r, and edm::Run::setConsumer().

78  {
79  Run r(rp, moduleDescription_, mcc);
80  r.setConsumer(this);
81  Run const& cnstR = r;
82  this->doEndRun_(cnstR, c);
83  }
virtual void doEndRun_(Run const &rp, EventSetup const &c)
ModuleDescription moduleDescription_
void EDAnalyzerBase::doEndRun_ ( Run const &  rp,
EventSetup const &  c 
)
privatevirtual

Definition at line 124 of file EDAnalyzerBase.cc.

Referenced by doEndRun().

124 {}
bool EDAnalyzerBase::doEvent ( EventPrincipal ep,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
private

Definition at line 49 of file EDAnalyzerBase.cc.

References analyze(), alignCSCRings::e, moduleDescription_, and edm::Event::setConsumer().

50  {
51  Event e(ep, moduleDescription_, mcc);
52  e.setConsumer(this);
53  this->analyze(e, c);
54  return true;
55  }
virtual void analyze(Event const &, EventSetup const &)=0
ModuleDescription moduleDescription_
void EDAnalyzerBase::doPostForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
private

Definition at line 119 of file EDAnalyzerBase.cc.

119  {
120  //postForkReacquireResources(iChildIndex, iNumberOfChildren);
121  }
void edm::one::EDAnalyzerBase::doPreallocate ( PreallocationConfiguration const &  )
inlineprivate

Definition at line 68 of file EDAnalyzerBase.h.

68 {}
void EDAnalyzerBase::doPreForkReleaseResources ( )
private

Definition at line 114 of file EDAnalyzerBase.cc.

114  {
115  //preForkReleaseResources();
116  }
void EDAnalyzerBase::doRespondToCloseInputFile ( FileBlock const &  fb)
private

Definition at line 109 of file EDAnalyzerBase.cc.

109  {
110  //respondToCloseInputFile(fb);
111  }
void EDAnalyzerBase::doRespondToOpenInputFile ( FileBlock const &  fb)
private

Definition at line 104 of file EDAnalyzerBase.cc.

104  {
105  //respondToOpenInputFile(fb);
106  }
virtual void edm::one::EDAnalyzerBase::endJob ( void  )
inlineprivatevirtual

Definition at line 93 of file EDAnalyzerBase.h.

Referenced by doEndJob().

93 {}
void EDAnalyzerBase::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 129 of file EDAnalyzerBase.cc.

References edm::ConfigurationDescriptions::addDefault(), and edm::ParameterSetDescription::setUnknown().

129  {
131  desc.setUnknown();
132  descriptions.addDefault(desc);
133  }
ModuleDescription const& edm::one::EDAnalyzerBase::moduleDescription ( ) const
inline

Definition at line 59 of file EDAnalyzerBase.h.

References moduleDescription_.

59 { return moduleDescription_; }
ModuleDescription moduleDescription_
void EDAnalyzerBase::prevalidate ( ConfigurationDescriptions descriptions)
static

Definition at line 136 of file EDAnalyzerBase.cc.

References edm::edmodule_mightGet_config().

136  {
137  edmodule_mightGet_config(iConfig);
138  }
void edmodule_mightGet_config(ConfigurationDescriptions &iDesc)
void EDAnalyzerBase::registerProductsAndCallbacks ( EDAnalyzerBase const *  module,
ProductRegistry reg 
)
private

Definition at line 148 of file EDAnalyzerBase.cc.

References edm::ProductRegistry::callForEachBranch(), and callWhenNewProductsRegistered_.

148  {
149 
151 
152  reg->callForEachBranch(callWhenNewProductsRegistered_);
153 
155  regService->watchProductAdditions(callWhenNewProductsRegistered_);
156  }
157  }
std::function< void(BranchDescription const &)> callWhenNewProductsRegistered_
void edm::one::EDAnalyzerBase::setModuleDescription ( ModuleDescription const &  md)
inlineprivate

Definition at line 100 of file EDAnalyzerBase.h.

References moduleDescription_.

100  {
101  moduleDescription_ = md;
102  }
ModuleDescription moduleDescription_
std::string edm::one::EDAnalyzerBase::workerType ( ) const
inlineprivate

Definition at line 89 of file EDAnalyzerBase.h.

89 {return "WorkerT<EDAnalyzer>";}

Friends And Related Function Documentation

template<typename T >
friend class edm::maker::ModuleHolderT
friend

Definition at line 46 of file EDAnalyzerBase.h.

template<typename T >
friend class edm::WorkerT
friend

Definition at line 45 of file EDAnalyzerBase.h.

Member Data Documentation

std::function<void(BranchDescription const&)> edm::one::EDAnalyzerBase::callWhenNewProductsRegistered_
private

Definition at line 104 of file EDAnalyzerBase.h.

Referenced by registerProductsAndCallbacks().

ModuleDescription edm::one::EDAnalyzerBase::moduleDescription_
private