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 | Protected Member Functions | Private Member Functions | Private Attributes
edm::WorkerT< T > Class Template Reference

#include <Frameworkfwd.h>

Inheritance diagram for edm::WorkerT< T >:
edm::Worker

Public Types

typedef T ModuleType
 
typedef WorkerT< TWorkerType
 
- Public Types inherited from edm::Worker
enum  State { Ready, Pass, Fail, Exception }
 
enum  Types { kAnalyzer, kFilter, kProducer, kOutputModule }
 

Public Member Functions

template<typename D >
void callWorkerBeginStream (D, StreamID)
 
template<typename D >
void callWorkerEndStream (D, StreamID)
 
template<typename D >
void callWorkerStreamBegin (D, StreamID id, RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)
 
template<typename D >
void callWorkerStreamBegin (D, StreamID id, LuminosityBlockPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)
 
template<typename D >
void callWorkerStreamEnd (D, StreamID id, RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)
 
template<typename D >
void callWorkerStreamEnd (D, StreamID id, LuminosityBlockPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc)
 
virtual Types moduleType () const override
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
template<>
Worker::Types moduleType () const
 
void setModule (T *iModule)
 
virtual void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &) override
 
 WorkerT (T *, ModuleDescription const &, ExceptionToActionTable const *actions)
 
virtual ~WorkerT ()
 
- Public Member Functions inherited from edm::Worker
void beginJob ()
 
void beginStream (StreamID id, StreamContext &streamContext)
 
void clearCounters ()
 
ModuleDescription const * descPtr () const
 
ModuleDescription const & description () const
 
template<typename T >
bool doWork (typename T::MyPrincipal &, EventSetup const &c, CPUTimer *const timer, StreamID stream, ParentContext const &parentContext, typename T::Context const *context)
 
void endJob ()
 
void endStream (StreamID id, StreamContext &streamContext)
 
Workeroperator= (Worker const &)=delete
 
void pathFinished (EventPrincipal &)
 
void postDoEvent (EventPrincipal &)
 
void postForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren)
 
void preForkReleaseResources ()
 
void reset ()
 
void respondToCloseInputFile (FileBlock const &fb)
 
void respondToOpenInputFile (FileBlock const &fb)
 
void setActivityRegistry (boost::shared_ptr< ActivityRegistry > areg)
 
void setEarlyDeleteHelper (EarlyDeleteHelper *iHelper)
 
State state () const
 
std::pair< double, double > timeCpuReal () const
 
int timesExcept () const
 
int timesFailed () const
 
int timesPass () const
 
int timesPassed () const
 
int timesRun () const
 
int timesVisited () const
 
void useStopwatch ()
 
 Worker (ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
 
 Worker (Worker const &)=delete
 
virtual ~Worker ()
 

Protected Member Functions

Tmodule ()
 
T const & module () const
 
- Protected Member Functions inherited from edm::Worker
void resetModuleDescription (ModuleDescription const *)
 

Private Member Functions

virtual void implBeginJob () override
 
virtual void implBeginStream (StreamID) override
 
virtual bool implDo (EventPrincipal &ep, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoBegin (RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoBegin (LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoEnd (RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoEnd (LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoStreamBegin (StreamID id, RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoStreamBegin (StreamID id, LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoStreamEnd (StreamID id, RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual bool implDoStreamEnd (StreamID id, LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *mcc) override
 
virtual void implEndJob () override
 
virtual void implEndStream (StreamID) override
 
virtual void implPostForkReacquireResources (unsigned int iChildIndex, unsigned int iNumberOfChildren) override
 
virtual void implPreForkReleaseResources () override
 
virtual void implRespondToCloseInputFile (FileBlock const &fb) override
 
virtual void implRespondToOpenInputFile (FileBlock const &fb) override
 
virtual void itemsMayGet (BranchType branchType, std::vector< ProductHolderIndexAndSkipBit > &indexes) const
 
virtual void itemsToGet (BranchType branchType, std::vector< ProductHolderIndexAndSkipBit > &indexes) const
 
virtual std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const override
 
virtual std::string workerType () const override
 

Private Attributes

Tmodule_
 

Detailed Description

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

Definition at line 47 of file Frameworkfwd.h.

Member Typedef Documentation

template<typename T>
typedef T edm::WorkerT< T >::ModuleType

Definition at line 27 of file WorkerT.h.

template<typename T>
typedef WorkerT<T> edm::WorkerT< T >::WorkerType

Definition at line 28 of file WorkerT.h.

Constructor & Destructor Documentation

template<typename T >
edm::WorkerT< T >::WorkerT ( T ed,
ModuleDescription const &  md,
ExceptionToActionTable const *  actions 
)
inline

Definition at line 104 of file WorkerT.cc.

References edm::WorkerT< T >::module_.

104  :
105  Worker(md, actions),
106  module_(ed) {
107  assert(module_ != 0);
108  }
T * module_
Definition: WorkerT.h:111
actions
Definition: Schedule.cc:362
Worker(ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
Definition: Worker.cc:77
template<typename T >
edm::WorkerT< T >::~WorkerT ( )
virtual

Definition at line 111 of file WorkerT.cc.

111  {
112  }

Member Function Documentation

template<typename T >
template<typename D >
void edm::WorkerT< T >::callWorkerBeginStream ( ,
StreamID  id 
)

Definition at line 267 of file WorkerT.cc.

References sistrip::module_.

Referenced by edm::workerimpl::DoBeginStream< T >::operator()().

267  {
268  module_->doBeginStream(id);
269  }
T * module_
Definition: WorkerT.h:111
template<typename T >
template<typename D >
void edm::WorkerT< T >::callWorkerEndStream ( ,
StreamID  id 
)

Definition at line 283 of file WorkerT.cc.

References sistrip::module_.

Referenced by edm::workerimpl::DoEndStream< T >::operator()().

283  {
284  module_->doEndStream(id);
285  }
T * module_
Definition: WorkerT.h:111
template<typename T >
template<typename D >
void edm::WorkerT< T >::callWorkerStreamBegin ( ,
StreamID  id,
RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)

Definition at line 133 of file WorkerT.cc.

References sistrip::module_.

Referenced by edm::workerimpl::DoStreamBeginTrans< T, P >::operator()().

135  {
136  module_->doStreamBeginRun(id, rp, c, mcc);
137  }
T * module_
Definition: WorkerT.h:111
template<typename T >
template<typename D >
void edm::WorkerT< T >::callWorkerStreamBegin ( ,
StreamID  id,
LuminosityBlockPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)

Definition at line 194 of file WorkerT.cc.

References sistrip::module_.

196  {
197  module_->doStreamBeginLuminosityBlock(id, rp, c, mcc);
198  }
T * module_
Definition: WorkerT.h:111
template<typename T >
template<typename D >
void edm::WorkerT< T >::callWorkerStreamEnd ( ,
StreamID  id,
RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)

Definition at line 142 of file WorkerT.cc.

References sistrip::module_.

Referenced by edm::workerimpl::DoStreamEndTrans< T, P >::operator()().

144  {
145  module_->doStreamEndRun(id, rp, c, mcc);
146  }
T * module_
Definition: WorkerT.h:111
template<typename T >
template<typename D >
void edm::WorkerT< T >::callWorkerStreamEnd ( ,
StreamID  id,
LuminosityBlockPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)

Definition at line 203 of file WorkerT.cc.

References sistrip::module_.

205  {
206  module_->doStreamEndLuminosityBlock(id, rp, c, mcc);
207  }
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::implBeginJob ( )
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 254 of file WorkerT.cc.

References sistrip::module_.

254  {
255  module_->doBeginJob();
256  }
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::implBeginStream ( StreamID  id)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 274 of file WorkerT.cc.

References relativeConstraints::value.

274  {
276  workerimpl::DoBeginStream<T>,
277  workerimpl::DoNothing>::type might_call;
278  might_call(this,id);
279  }
type
Definition: HCALResponse.h:21
template<typename T >
bool edm::WorkerT< T >::implDo ( EventPrincipal ep,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 117 of file WorkerT.cc.

References sistrip::module_, getGTfromDQMFile::obj, and edm::Worker::postDoEvent().

117  {
118  boost::shared_ptr<Worker> sentry(this,[&ep](Worker* obj) {obj->postDoEvent(ep);});
119  return module_->doEvent(ep, c, mcc);
120  }
T * module_
Definition: WorkerT.h:111
Worker(ModuleDescription const &iMD, ExceptionToActionTable const *iActions)
Definition: Worker.cc:77
template<typename T >
bool edm::WorkerT< T >::implDoBegin ( RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 125 of file WorkerT.cc.

References sistrip::module_.

125  {
126  module_->doBeginRun(rp, c, mcc);
127  return true;
128  }
T * module_
Definition: WorkerT.h:111
template<typename T >
bool edm::WorkerT< T >::implDoBegin ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 185 of file WorkerT.cc.

References sistrip::module_.

186  {
187  module_->doBeginLuminosityBlock(lbp, c, mcc);
188  return true;
189  }
T * module_
Definition: WorkerT.h:111
template<typename T >
bool edm::WorkerT< T >::implDoEnd ( RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 176 of file WorkerT.cc.

References sistrip::module_.

177  {
178  module_->doEndRun(rp, c, mcc);
179  return true;
180  }
T * module_
Definition: WorkerT.h:111
template<typename T >
bool edm::WorkerT< T >::implDoEnd ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 238 of file WorkerT.cc.

References sistrip::module_.

239  {
240  module_->doEndLuminosityBlock(lbp, c, mcc);
241  return true;
242  }
T * module_
Definition: WorkerT.h:111
template<typename T >
bool edm::WorkerT< T >::implDoStreamBegin ( StreamID  id,
RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 152 of file WorkerT.cc.

References relativeConstraints::value.

153  {
155  workerimpl::DoStreamBeginTrans<T,RunPrincipal>,
156  workerimpl::DoNothing>::type might_call;
157  might_call(this,id,rp,c, mcc);
158  return true;
159  }
type
Definition: HCALResponse.h:21
template<typename T >
bool edm::WorkerT< T >::implDoStreamBegin ( StreamID  id,
LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 213 of file WorkerT.cc.

References relativeConstraints::value.

214  {
216  workerimpl::DoStreamBeginTrans<T,LuminosityBlockPrincipal>,
217  workerimpl::DoNothing>::type might_call;
218  might_call(this,id,lbp,c, mcc);
219  return true;
220  }
type
Definition: HCALResponse.h:21
template<typename T >
bool edm::WorkerT< T >::implDoStreamEnd ( StreamID  id,
RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 164 of file WorkerT.cc.

References relativeConstraints::value.

165  {
167  workerimpl::DoStreamEndTrans<T,RunPrincipal>,
168  workerimpl::DoNothing>::type might_call;
169  might_call(this,id,rp,c, mcc);
170  return true;
171  }
type
Definition: HCALResponse.h:21
template<typename T >
bool edm::WorkerT< T >::implDoStreamEnd ( StreamID  id,
LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 225 of file WorkerT.cc.

References relativeConstraints::value.

226  {
228  workerimpl::DoStreamEndTrans<T,LuminosityBlockPrincipal>,
229  workerimpl::DoNothing>::type might_call;
230  might_call(this,id,lbp,c,mcc);
231 
232  return true;
233  }
type
Definition: HCALResponse.h:21
template<typename T >
void edm::WorkerT< T >::implEndJob ( )
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 261 of file WorkerT.cc.

References sistrip::module_.

261  {
262  module_->doEndJob();
263  }
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::implEndStream ( StreamID  id)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 290 of file WorkerT.cc.

References relativeConstraints::value.

290  {
292  workerimpl::DoEndStream<T>,
293  workerimpl::DoNothing>::type might_call;
294  might_call(this,id);
295  }
type
Definition: HCALResponse.h:21
template<typename T >
void edm::WorkerT< T >::implPostForkReacquireResources ( unsigned int  iChildIndex,
unsigned int  iNumberOfChildren 
)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 321 of file WorkerT.cc.

References sistrip::module_.

322  {
323  module_->doPostForkReacquireResources(iChildIndex, iNumberOfChildren);
324  }
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::implPreForkReleaseResources ( )
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 314 of file WorkerT.cc.

References sistrip::module_.

314  {
315  module_->doPreForkReleaseResources();
316  }
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::implRespondToCloseInputFile ( FileBlock const &  fb)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 307 of file WorkerT.cc.

References sistrip::module_.

307  {
308  module_->doRespondToCloseInputFile(fb);
309  }
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::implRespondToOpenInputFile ( FileBlock const &  fb)
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 300 of file WorkerT.cc.

References sistrip::module_.

300  {
301  module_->doRespondToOpenInputFile(fb);
302  }
T * module_
Definition: WorkerT.h:111
template<typename T>
virtual void edm::WorkerT< T >::itemsMayGet ( BranchType  branchType,
std::vector< ProductHolderIndexAndSkipBit > &  indexes 
) const
inlineprivatevirtual

Implements edm::Worker.

Definition at line 105 of file WorkerT.h.

References edm::WorkerT< T >::module_.

105  {
106  module_->itemsMayGet(branchType, indexes);
107  }
T * module_
Definition: WorkerT.h:111
template<typename T>
virtual void edm::WorkerT< T >::itemsToGet ( BranchType  branchType,
std::vector< ProductHolderIndexAndSkipBit > &  indexes 
) const
inlineprivatevirtual

Implements edm::Worker.

Definition at line 101 of file WorkerT.h.

References edm::WorkerT< T >::module_.

101  {
102  module_->itemsToGet(branchType, indexes);
103  }
T * module_
Definition: WorkerT.h:111
template<typename T>
virtual std::vector<ProductHolderIndexAndSkipBit> const& edm::WorkerT< T >::itemsToGetFromEvent ( ) const
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 109 of file WorkerT.h.

References edm::WorkerT< T >::module_.

109 { return module_->itemsToGetFromEvent(); }
T * module_
Definition: WorkerT.h:111
template<typename T>
T& edm::WorkerT< T >::module ( )
inlineprotected

Definition at line 68 of file WorkerT.h.

References edm::WorkerT< T >::module_.

68 {return *module_;}
T * module_
Definition: WorkerT.h:111
template<typename T>
T const& edm::WorkerT< T >::module ( ) const
inlineprotected

Definition at line 69 of file WorkerT.h.

References edm::WorkerT< T >::module_.

69 {return *module_;}
T * module_
Definition: WorkerT.h:111
template<typename T>
virtual Types edm::WorkerT< T >::moduleType ( ) const
overridevirtual

Implements edm::Worker.

template<>
Worker::Types edm::WorkerT< EDAnalyzer >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 333 of file WorkerT.cc.

References edm::Worker::kAnalyzer.

template<>
Worker::Types edm::WorkerT< EDProducer >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 335 of file WorkerT.cc.

References edm::Worker::kProducer.

template<>
Worker::Types edm::WorkerT< EDFilter >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 337 of file WorkerT.cc.

References edm::Worker::kFilter.

337 { return Worker::kFilter;}
template<>
Worker::Types edm::WorkerT< OutputModule >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 339 of file WorkerT.cc.

References edm::Worker::kOutputModule.

template<>
Worker::Types edm::WorkerT< edm::one::EDProducerBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 341 of file WorkerT.cc.

References edm::Worker::kProducer.

template<>
Worker::Types edm::WorkerT< edm::one::EDFilterBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 343 of file WorkerT.cc.

References edm::Worker::kFilter.

343 { return Worker::kFilter;}
template<>
Worker::Types edm::WorkerT< edm::one::EDAnalyzerBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 345 of file WorkerT.cc.

References edm::Worker::kAnalyzer.

template<>
Worker::Types edm::WorkerT< edm::one::OutputModuleBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 347 of file WorkerT.cc.

References edm::Worker::kOutputModule.

template<>
Worker::Types edm::WorkerT< edm::global::EDProducerBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 350 of file WorkerT.cc.

References edm::Worker::kProducer.

template<>
Worker::Types edm::WorkerT< edm::global::EDFilterBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 352 of file WorkerT.cc.

References edm::Worker::kFilter.

352 { return Worker::kFilter;}
template<>
Worker::Types edm::WorkerT< edm::global::EDAnalyzerBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 354 of file WorkerT.cc.

References edm::Worker::kAnalyzer.

template<>
Worker::Types edm::WorkerT< edm::stream::EDProducerAdaptorBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 358 of file WorkerT.cc.

References edm::Worker::kProducer.

template<>
Worker::Types edm::WorkerT< edm::stream::EDFilterAdaptorBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 360 of file WorkerT.cc.

References edm::Worker::kFilter.

360 { return Worker::kFilter;}
template<>
Worker::Types edm::WorkerT< edm::stream::EDAnalyzerAdaptorBase >::moduleType ( ) const
virtual

Implements edm::Worker.

Definition at line 362 of file WorkerT.cc.

References edm::Worker::kAnalyzer.

template<typename T>
void edm::WorkerT< T >::setModule ( T iModule)
inline

Definition at line 35 of file WorkerT.h.

References edm::WorkerT< T >::module_, and edm::Worker::resetModuleDescription().

35  {
36  module_ = iModule;
37  resetModuleDescription(&(module_->moduleDescription()));
38  }
void resetModuleDescription(ModuleDescription const *)
Definition: Worker.cc:105
T * module_
Definition: WorkerT.h:111
template<typename T >
void edm::WorkerT< T >::updateLookup ( BranchType  iBranchType,
ProductHolderIndexHelper const &  iHelper 
)
overridevirtual

Implements edm::Worker.

Definition at line 327 of file WorkerT.cc.

References sistrip::module_.

328  {
329  module_->updateLookup(iBranchType,iHelper);
330  }
T * module_
Definition: WorkerT.h:111
template<typename T >
std::string edm::WorkerT< T >::workerType ( ) const
inlineoverrideprivatevirtual

Implements edm::Worker.

Definition at line 247 of file WorkerT.cc.

References sistrip::module_.

247  {
248  return module_->workerType();
249  }
T * module_
Definition: WorkerT.h:111

Member Data Documentation

template<typename T>
T* edm::WorkerT< T >::module_
private