CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalGainsHandler.cc
Go to the documentation of this file.
4 #include <memory>
5 
7 {
8  m_name = ps.getUntrackedParameter<std::string>("name","HcalGainsHandler");
9  sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun",0);
10 }
11 
13 {
14 }
15 
17 {
18  // edm::LogInfo ("HcalGainsHandler")
19  std::cout
20  << "------- " << m_name
21  << " - > getNewObjects\n" <<
22  //check whats already inside of database
23  "got offlineInfo"<<
24  tagInfo().name << ", size " << tagInfo().size
25  << ", last object valid since "
26  << tagInfo().lastInterval.first << std::endl;
27 
28  if (!myDBObject)
29  throw cms::Exception("Empty DB object") << m_name
30  << " has received empty object - nothing to write to DB"
31  << std::endl;
32 
33  // IOV information
34  cond::Time_t myTime = sinceTime;
35 
36  std::cout << "Using IOV run " << sinceTime << std::endl;
37 
38  // prepare for transfer:
39  m_to_transfer.push_back(std::make_pair(myDBObject,myTime));
40 
41  edm::LogInfo("HcalGainsHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;
42 
43 }
44 
46 {
47  myDBObject = fObject;
48 }
HcalGains * myDBObject
T getUntrackedParameter(std::string const &, T const &) const
void initObject(HcalGains *)
size_t size
Definition: Types.h:75
std::string m_name
std::string name
Definition: Types.h:71
HcalGainsHandler(edm::ParameterSet const &)
cond::ValidityInterval lastInterval
Definition: Types.h:73
unsigned long long Time_t
Definition: Time.h:16
unsigned int sinceTime
tuple cout
Definition: gather_cfg.py:145
cond::TagInfo_t const & tagInfo() const