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  */
18 
20 
21 public:
23 
24  typedef boost::shared_ptr<EcalSeverityLevelAlgo> ReturnType;
25 
27 
28 
29 
30 private:
31 
32  void chstatusCallback(const EcalChannelStatusRcd& chs);
33 
35 };
36 
38  //the following line is needed to tell the framework what
39  // data is being produced
40  setWhatProduced(this,
42 
43  algo_ = ReturnType(new EcalSeverityLevelAlgo(iConfig));
44 }
45 
46 
47 
50 
51  return algo_ ;
52 }
53 
54 
55 void
58  chs.get (h);
59  algo_->setChannelStatus(*h.product());
60 }
61 
62 //define this as a plug-in
64 
65 
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:86
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
EcalSeverityLevelESProducer(const edm::ParameterSet &iConfig)
ReturnType produce(const EcalSeverityLevelAlgoRcd &iRecord)