CMS 3D CMS Logo

EcalSeverityLevelESProducer.cc
Go to the documentation of this file.
1 #include <memory>
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 std::shared_ptr<EcalSeverityLevelAlgo> ReturnType;
25 
26  ReturnType produce(const EcalSeverityLevelAlgoRcd& iRecord);
27 
28 
29 
30 private:
31 
32  void chstatusCallback(const EcalChannelStatusRcd& chs);
33 
34  ReturnType algo_;
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 &))
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
std::shared_ptr< EcalSeverityLevelAlgo > ReturnType
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
EcalSeverityLevelESProducer(const edm::ParameterSet &iConfig)
T const * product() const
Definition: ESHandle.h:86
ReturnType produce(const EcalSeverityLevelAlgoRcd &iRecord)