CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalSeverityLevelESProducer.cc
Go to the documentation of this file.
1 #include "boost/shared_ptr.hpp"
9 
10 /*
11  Provide a hook to retrieve the EcalSeverityLevelAlgo
12  through the EventSetup
13 
14  Appartently there is no smarter way to do it in CMSSW
15 
16  Author: Stefano Argiro
17  $Id: EcalSeverityLevelESProducer.cc,v 1.1 2011/01/16 08:29:00 argiro Exp $
18  */
19 
21 
22 public:
24 
25  typedef boost::shared_ptr<EcalSeverityLevelAlgo> ReturnType;
26 
28 
29 
30 
31 private:
32 
33  void chstatusCallback(const EcalChannelStatusRcd& chs);
34 
36 };
37 
39  //the following line is needed to tell the framework what
40  // data is being produced
41  setWhatProduced(this,
43 
44  algo_ = ReturnType(new EcalSeverityLevelAlgo(iConfig));
45 }
46 
47 
48 
51 
52  return algo_ ;
53 }
54 
55 
56 void
59  chs.get (h);
60  algo_->setChannelStatus(*h.product());
61 }
62 
63 //define this as a plug-in
65 
66 
void chstatusCallback(const EcalChannelStatusRcd &chs)
depends_on::OneHolder< T, TDependsOnRecord > dependsOn(void(T::*iT)(const TDependsOnRecord &))
boost::shared_ptr< EcalSeverityLevelAlgo > ReturnType
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
T const * product() const
Definition: ESHandle.h:62
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:56
EcalSeverityLevelESProducer(const edm::ParameterSet &iConfig)
ReturnType produce(const EcalSeverityLevelAlgoRcd &iRecord)