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 Types | Private Member Functions | Private Attributes
edm::stream::EDAnalyzerAdaptor< T > Class Template Reference

#include "EDAnalyzerAdaptor.h"

Inheritance diagram for edm::stream::EDAnalyzerAdaptor< T >:
edm::stream::EDAnalyzerAdaptorBase

Public Member Functions

 EDAnalyzerAdaptor (edm::ParameterSet const &iPSet)
 
 ~EDAnalyzerAdaptor ()
 
- Public Member Functions inherited from edm::stream::EDAnalyzerAdaptorBase
 EDAnalyzerAdaptorBase ()
 
const ModuleDescriptionmoduleDescription ()
 
void registerProductsAndCallbacks (EDAnalyzerAdaptorBase const *, ProductRegistry *reg)
 
std::string workerType () const
 
virtual ~EDAnalyzerAdaptorBase ()
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

typedef CallGlobal< TMyGlobal
 
typedef
CallGlobalLuminosityBlock< T
MyGlobalLuminosityBlock
 
typedef
CallGlobalLuminosityBlockSummary
< T
MyGlobalLuminosityBlockSummary
 
typedef CallGlobalRun< TMyGlobalRun
 
typedef CallGlobalRunSummary< TMyGlobalRunSummary
 

Private Member Functions

void doBeginLuminosityBlock (LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *mcc) overridefinal
 
void doBeginRun (RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc) overridefinal
 
void doEndJob () overridefinal
 
void doEndLuminosityBlock (LuminosityBlockPrincipal &lbp, EventSetup const &c, ModuleCallingContext const *mcc) overridefinal
 
void doEndRun (RunPrincipal &rp, EventSetup const &c, ModuleCallingContext const *mcc) overridefinal
 
 EDAnalyzerAdaptor (const EDAnalyzerAdaptor &)
 
const EDAnalyzerAdaptoroperator= (const EDAnalyzerAdaptor &)
 
void setupLuminosityBlock (EDAnalyzerBase *iProd, LuminosityBlockIndex iIndex) overridefinal
 
void setupRun (EDAnalyzerBase *iProd, RunIndex iIndex) overridefinal
 
void setupStreamModules () overridefinal
 
void streamEndLuminosityBlockSummary (EDAnalyzerBase *iProd, edm::LuminosityBlock const &iLumi, edm::EventSetup const &iES) overridefinal
 
void streamEndRunSummary (EDAnalyzerBase *iProd, edm::Run const &iRun, edm::EventSetup const &iES) overridefinal
 

Private Attributes

impl::choose_unique_ptr
< typename T::GlobalCache >
::type 
m_global
 
impl::choose_shared_vec
< typename
T::LuminosityBlockCache const >
::type 
m_lumis
 
impl::choose_shared_vec
< typename
T::LuminosityBlockSummaryCache >
::type 
m_lumiSummaries
 
ParameterSet const * m_pset
 
impl::choose_shared_vec
< typename T::RunCache const >
::type 
m_runs
 
impl::choose_shared_vec
< typename T::RunSummaryCache >
::type 
m_runSummaries
 

Additional Inherited Members

- Protected Member Functions inherited from edm::stream::EDAnalyzerAdaptorBase
const EDConsumerBaseconsumer () const
 
std::vector< ConsumesInfoconsumesInfo () const
 
template<typename T >
void createStreamModules (T iFunc)
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 

Detailed Description

template<typename T>
class edm::stream::EDAnalyzerAdaptor< T >

Description: Adapts an edm::stream::EDAnalyzer<> to work with an edm::Worker

Usage: <usage>

Definition at line 41 of file EDAnalyzerAdaptor.h.

Member Typedef Documentation

template<typename T >
typedef CallGlobal<T> edm::stream::EDAnalyzerAdaptor< T >::MyGlobal
private

Definition at line 73 of file EDAnalyzerAdaptor.h.

Definition at line 76 of file EDAnalyzerAdaptor.h.

Definition at line 77 of file EDAnalyzerAdaptor.h.

template<typename T >
typedef CallGlobalRun<T> edm::stream::EDAnalyzerAdaptor< T >::MyGlobalRun
private

Definition at line 74 of file EDAnalyzerAdaptor.h.

template<typename T >
typedef CallGlobalRunSummary<T> edm::stream::EDAnalyzerAdaptor< T >::MyGlobalRunSummary
private

Definition at line 75 of file EDAnalyzerAdaptor.h.

Constructor & Destructor Documentation

template<typename T >
edm::stream::EDAnalyzerAdaptor< T >::EDAnalyzerAdaptor ( edm::ParameterSet const &  iPSet)
inline

Definition at line 51 of file EDAnalyzerAdaptor.h.

References edm::stream::EDAnalyzerAdaptor< T >::m_global, edm::stream::EDAnalyzerAdaptor< T >::m_lumis, edm::stream::EDAnalyzerAdaptor< T >::m_lumiSummaries, edm::stream::EDAnalyzerAdaptor< T >::m_runs, edm::stream::EDAnalyzerAdaptor< T >::m_runSummaries, and fetchall_from_DQM_v2::release.

51  :
52  m_pset(&iPSet)
53  {
54  m_runs.resize(1);
55  m_lumis.resize(1);
56  m_runSummaries.resize(1);
57  m_lumiSummaries.resize(1);
58  typename T::GlobalCache const* dummy=nullptr;
59  m_global.reset( impl::makeGlobal<T>(iPSet,dummy).release());
60  }
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
impl::choose_shared_vec< typename T::RunSummaryCache >::type m_runSummaries
impl::choose_shared_vec< typename T::LuminosityBlockSummaryCache >::type m_lumiSummaries
impl::choose_shared_vec< typename T::LuminosityBlockCache const >::type m_lumis
template<typename T >
edm::stream::EDAnalyzerAdaptor< T >::~EDAnalyzerAdaptor ( )
inline

Definition at line 61 of file EDAnalyzerAdaptor.h.

61  {
62  }
template<typename T >
edm::stream::EDAnalyzerAdaptor< T >::EDAnalyzerAdaptor ( const EDAnalyzerAdaptor< T > &  )
private

Member Function Documentation

template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::doBeginLuminosityBlock ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 141 of file EDAnalyzerAdaptor.h.

References edm::stream::CallGlobalLuminosityBlockImpl< T, bool >::beginLuminosityBlock(), edm::stream::CallGlobalLuminosityBlockSummaryImpl< T, bool >::beginLuminosityBlock(), EnergyCorrector::c, edm::stream::EDAnalyzerAdaptorBase::consumer(), edm::module::AbilityBits::kLuminosityBlockCache, edm::module::AbilityBits::kLuminosityBlockSummaryCache, edm::stream::EDAnalyzerAdaptor< T >::m_global, edm::stream::EDAnalyzerAdaptor< T >::m_lumis, edm::stream::EDAnalyzerAdaptor< T >::m_lumiSummaries, edm::stream::EDAnalyzerAdaptor< T >::m_runs, edm::stream::EDAnalyzerAdaptorBase::moduleDescription(), or, and edm::LuminosityBlock::setConsumer().

144  {
146  LuminosityBlock lb(lbp, moduleDescription(), mcc);
147  lb.setConsumer(consumer());
148  LuminosityBlock const& cnstLb = lb;
149  LuminosityBlockIndex li = lbp.index();
150  RunIndex ri = lbp.runPrincipal().index();
151  typename T::RunContext rc(m_runs[ri].get(),m_global.get());
153  typename T::LuminosityBlockContext lc(m_lumis[li].get(),m_runs[ri].get(),m_global.get());
155  }
156 
157  }
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const EDConsumerBase * consumer() const
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
static void beginLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iRC, std::shared_ptr< typename T::LuminosityBlockSummaryCache > &oCache)
impl::choose_shared_vec< typename T::LuminosityBlockSummaryCache >::type m_lumiSummaries
const ModuleDescription & moduleDescription()
impl::choose_shared_vec< typename T::LuminosityBlockCache const >::type m_lumis
static void beginLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::RunContext const *iRC, std::shared_ptr< typename T::LuminosityBlockCache const > &oCache)
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::doBeginRun ( RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 112 of file EDAnalyzerAdaptor.h.

References edm::stream::CallGlobalRunImpl< T, bool >::beginRun(), edm::stream::CallGlobalRunSummaryImpl< T, bool >::beginRun(), EnergyCorrector::c, edm::stream::EDAnalyzerAdaptorBase::consumer(), edm::module::AbilityBits::kRunCache, edm::module::AbilityBits::kRunSummaryCache, edm::stream::EDAnalyzerAdaptor< T >::m_global, edm::stream::EDAnalyzerAdaptor< T >::m_runs, edm::stream::EDAnalyzerAdaptor< T >::m_runSummaries, edm::stream::EDAnalyzerAdaptorBase::moduleDescription(), or, alignCSCRings::r, and edm::Run::setConsumer().

114  {
116  Run r(rp, moduleDescription(), mcc);
117  r.setConsumer(consumer());
118  Run const& cnstR = r;
119  RunIndex ri = rp.index();
120  MyGlobalRun::beginRun(cnstR,c,m_global.get(),m_runs[ri]);
121  typename T::RunContext rc(m_runs[ri].get(),m_global.get());
123  }
124  }
static void beginRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iRC, std::shared_ptr< typename T::RunSummaryCache > &oCache)
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const EDConsumerBase * consumer() const
static void beginRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::GlobalCache const *iGC, std::shared_ptr< typename T::RunCache const > &oCache)
Definition: callAbilities.h:59
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
impl::choose_shared_vec< typename T::RunSummaryCache >::type m_runSummaries
const ModuleDescription & moduleDescription()
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::doEndJob ( )
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 88 of file EDAnalyzerAdaptor.h.

References edm::stream::CallGlobalImpl< T, bool >::endJob(), and edm::stream::EDAnalyzerAdaptor< T >::m_global.

88  {
90  }
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
static void endJob(typename T::GlobalCache *iCache)
Definition: callAbilities.h:41
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::doEndLuminosityBlock ( LuminosityBlockPrincipal lbp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 158 of file EDAnalyzerAdaptor.h.

References EnergyCorrector::c, edm::stream::EDAnalyzerAdaptorBase::consumer(), edm::stream::CallGlobalLuminosityBlockImpl< T, bool >::endLuminosityBlock(), edm::stream::CallGlobalLuminosityBlockSummaryImpl< T, bool >::globalEndLuminosityBlock(), edm::module::AbilityBits::kLuminosityBlockCache, edm::module::AbilityBits::kLuminosityBlockSummaryCache, edm::stream::EDAnalyzerAdaptor< T >::m_global, edm::stream::EDAnalyzerAdaptor< T >::m_lumis, edm::stream::EDAnalyzerAdaptor< T >::m_lumiSummaries, edm::stream::EDAnalyzerAdaptor< T >::m_runs, edm::stream::EDAnalyzerAdaptorBase::moduleDescription(), or, and edm::LuminosityBlock::setConsumer().

160  {
162 
163  LuminosityBlock lb(lbp, moduleDescription(), mcc);
164  lb.setConsumer(consumer());
165 
166  LuminosityBlockIndex li = lbp.index();
167  RunIndex ri = lbp.runPrincipal().index();
168  typename T::LuminosityBlockContext lc(m_lumis[li].get(),m_runs[ri].get(),m_global.get());
171  }
172  }
static void endLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iContext)
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const EDConsumerBase * consumer() const
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
impl::choose_shared_vec< typename T::LuminosityBlockSummaryCache >::type m_lumiSummaries
const ModuleDescription & moduleDescription()
impl::choose_shared_vec< typename T::LuminosityBlockCache const >::type m_lumis
static void globalEndLuminosityBlock(edm::LuminosityBlock const &Lumi, edm::EventSetup const &iES, typename T::LuminosityBlockContext const *iContext, typename T::LuminosityBlockSummaryCache *iCache)
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::doEndRun ( RunPrincipal rp,
EventSetup const &  c,
ModuleCallingContext const *  mcc 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 125 of file EDAnalyzerAdaptor.h.

References EnergyCorrector::c, edm::stream::EDAnalyzerAdaptorBase::consumer(), edm::stream::CallGlobalRunImpl< T, bool >::endRun(), edm::stream::CallGlobalRunSummaryImpl< T, bool >::globalEndRun(), edm::module::AbilityBits::kRunCache, edm::module::AbilityBits::kRunSummaryCache, edm::stream::EDAnalyzerAdaptor< T >::m_global, edm::stream::EDAnalyzerAdaptor< T >::m_runs, edm::stream::EDAnalyzerAdaptor< T >::m_runSummaries, edm::stream::EDAnalyzerAdaptorBase::moduleDescription(), or, alignCSCRings::r, and edm::Run::setConsumer().

128  {
130 
131  Run r(rp, moduleDescription(), mcc);
132  r.setConsumer(consumer());
133 
134  RunIndex ri = rp.index();
135  typename T::RunContext rc(m_runs[ri].get(),m_global.get());
137  MyGlobalRun::endRun(r,c,&rc);
138  }
139  }
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
static void endRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iContext)
Definition: callAbilities.h:71
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const EDConsumerBase * consumer() const
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
impl::choose_shared_vec< typename T::RunSummaryCache >::type m_runSummaries
const ModuleDescription & moduleDescription()
static void globalEndRun(edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunContext const *iContext, typename T::RunSummaryCache *iCache)
template<typename T >
static void edm::stream::EDAnalyzerAdaptor< T >::fillDescriptions ( ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 64 of file EDAnalyzerAdaptor.h.

64  {
65  T::fillDescriptions(descriptions);
66  }
template<typename T >
const EDAnalyzerAdaptor& edm::stream::EDAnalyzerAdaptor< T >::operator= ( const EDAnalyzerAdaptor< T > &  )
private
template<typename T >
static void edm::stream::EDAnalyzerAdaptor< T >::prevalidate ( ConfigurationDescriptions descriptions)
inlinestatic

Definition at line 67 of file EDAnalyzerAdaptor.h.

67  {
68  T::prevalidate(descriptions);
69  }
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::setupLuminosityBlock ( EDAnalyzerBase iProd,
LuminosityBlockIndex  iIndex 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 101 of file EDAnalyzerAdaptor.h.

References edm::stream::EDAnalyzerAdaptor< T >::m_lumis, and edm::stream::CallGlobalLuminosityBlockImpl< T, bool >::set().

102  {
103  MyGlobalLuminosityBlock::set(iProd, m_lumis[iIndex].get());
104  }
static void set(B *iProd, typename T::LuminosityBlockCache const *iCache)
impl::choose_shared_vec< typename T::LuminosityBlockCache const >::type m_lumis
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::setupRun ( EDAnalyzerBase iProd,
RunIndex  iIndex 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 91 of file EDAnalyzerAdaptor.h.

References edm::stream::EDAnalyzerAdaptor< T >::m_runs, and edm::stream::CallGlobalRunImpl< T, bool >::set().

91  {
92  MyGlobalRun::set(iProd, m_runs[iIndex].get());
93  }
impl::choose_shared_vec< typename T::RunCache const >::type m_runs
static void set(B *iProd, typename T::RunCache const *iCache)
Definition: callAbilities.h:67
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::setupStreamModules ( )
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 79 of file EDAnalyzerAdaptor.h.

References edm::stream::EDAnalyzerAdaptorBase::createStreamModules(), edm::stream::EDAnalyzerAdaptor< T >::m_global, edm::stream::EDAnalyzerAdaptor< T >::m_pset, edm::stream::CallGlobalImpl< T, bool >::set(), and tmp.

79  {
80  this->createStreamModules([this] () -> EDAnalyzerBase* {
81  auto tmp = impl::makeStreamModule<T>(*m_pset,m_global.get());
82  MyGlobal::set(tmp,m_global.get());
83  return tmp;
84  });
85  m_pset= nullptr;
86  }
impl::choose_unique_ptr< typename T::GlobalCache >::type m_global
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
static void set(B *iProd, typename T::GlobalCache const *iCache)
Definition: callAbilities.h:37
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::streamEndLuminosityBlockSummary ( EDAnalyzerBase iProd,
edm::LuminosityBlock const &  iLumi,
edm::EventSetup const &  iES 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 105 of file EDAnalyzerAdaptor.h.

References edm::stream::EDAnalyzerAdaptor< T >::m_lumiSummaries, alignCSCRings::s, and edm::stream::CallGlobalLuminosityBlockSummaryImpl< T, bool >::streamEndLuminosityBlockSummary().

107  {
108  auto s = m_lumiSummaries[iLumi.index()].get();
110  }
impl::choose_shared_vec< typename T::LuminosityBlockSummaryCache >::type m_lumiSummaries
static void streamEndLuminosityBlockSummary(B *iProd, edm::LuminosityBlock const &iLumi, edm::EventSetup const &iES, typename T::LuminosityBlockSummaryCache *iCache)
template<typename T >
void edm::stream::EDAnalyzerAdaptor< T >::streamEndRunSummary ( EDAnalyzerBase iProd,
edm::Run const &  iRun,
edm::EventSetup const &  iES 
)
inlinefinaloverrideprivatevirtual

Implements edm::stream::EDAnalyzerAdaptorBase.

Definition at line 94 of file EDAnalyzerAdaptor.h.

References edm::stream::EDAnalyzerAdaptor< T >::m_runSummaries, alignCSCRings::s, and edm::stream::CallGlobalRunSummaryImpl< T, bool >::streamEndRunSummary().

96  {
97  auto s = m_runSummaries[iRun.index()].get();
99  }
static void streamEndRunSummary(B *iProd, edm::Run const &iRun, edm::EventSetup const &iES, typename T::RunSummaryCache *iCache)
impl::choose_shared_vec< typename T::RunSummaryCache >::type m_runSummaries

Member Data Documentation

template<typename T >
impl::choose_unique_ptr<typename T::GlobalCache>::type edm::stream::EDAnalyzerAdaptor< T >::m_global
private
template<typename T >
impl::choose_shared_vec<typename T::LuminosityBlockCache const>::type edm::stream::EDAnalyzerAdaptor< T >::m_lumis
private
template<typename T >
impl::choose_shared_vec<typename T::LuminosityBlockSummaryCache>::type edm::stream::EDAnalyzerAdaptor< T >::m_lumiSummaries
private
template<typename T >
ParameterSet const* edm::stream::EDAnalyzerAdaptor< T >::m_pset
private
template<typename T >
impl::choose_shared_vec<typename T::RunCache const>::type edm::stream::EDAnalyzerAdaptor< T >::m_runs
private
template<typename T >
impl::choose_shared_vec<typename T::RunSummaryCache>::type edm::stream::EDAnalyzerAdaptor< T >::m_runSummaries
private