CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalGainWidthsHandler Class Reference

#include <HcalGainWidthsHandler.h>

Inheritance diagram for HcalGainWidthsHandler:
popcon::PopConSourceHandler< HcalGainWidths >

List of all members.

Public Member Functions

void getNewObjects ()
 HcalGainWidthsHandler (edm::ParameterSet const &)
std::string id () const
void initObject (HcalGainWidths *)
 ~HcalGainWidthsHandler ()

Private Attributes

edm::FileInPath fFile
std::string m_name
HcalGainWidthsmyDBObject
unsigned int sinceTime

Detailed Description

Definition at line 25 of file HcalGainWidthsHandler.h.


Constructor & Destructor Documentation

HcalGainWidthsHandler::~HcalGainWidthsHandler ( )

Definition at line 12 of file HcalGainWidthsHandler.cc.

{
}
HcalGainWidthsHandler::HcalGainWidthsHandler ( edm::ParameterSet const &  ps)

Definition at line 6 of file HcalGainWidthsHandler.cc.

References edm::ParameterSet::getUntrackedParameter(), m_name, and sinceTime.

{
  m_name = ps.getUntrackedParameter<std::string>("name","HcalGainWidthsHandler");
  sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun",0);
}

Member Function Documentation

void HcalGainWidthsHandler::getNewObjects ( ) [virtual]

Implements popcon::PopConSourceHandler< HcalGainWidths >.

Definition at line 16 of file HcalGainWidthsHandler.cc.

References gather_cfg::cout, Exception, cond::TagInfo::lastInterval, m_name, popcon::PopConSourceHandler< HcalGainWidths >::m_to_transfer, myDBObject, cond::TagInfo::name, sinceTime, cond::TagInfo::size, and popcon::PopConSourceHandler< HcalGainWidths >::tagInfo().

{
  //  edm::LogInfo   ("HcalGainWidthsHandler") 
  std::cout
    << "------- " << m_name 
    << " - > getNewObjects\n" << 
    //check whats already inside of database
    "got offlineInfo"<<
    tagInfo().name << ", size " << tagInfo().size 
                                          << ", last object valid since " 
                                          << tagInfo().lastInterval.first << std::endl;  

  if (!myDBObject) 
    throw cms::Exception("Empty DB object") << m_name 
                                            << " has received empty object - nothing to write to DB" 
                                            << std::endl;

  //  IOV information
  cond::Time_t myTime = sinceTime;

  std::cout << "Using IOV run " << sinceTime << std::endl;

  // prepare for transfer:
  m_to_transfer.push_back(std::make_pair(myDBObject,myTime));

  edm::LogInfo("HcalGainWidthsHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;

}
std::string HcalGainWidthsHandler::id ( void  ) const [inline, virtual]

Implements popcon::PopConSourceHandler< HcalGainWidths >.

Definition at line 29 of file HcalGainWidthsHandler.h.

References m_name.

{ return m_name;}
void HcalGainWidthsHandler::initObject ( HcalGainWidths fObject)

Definition at line 45 of file HcalGainWidthsHandler.cc.

References myDBObject.

Referenced by HcalGainWidthsPopConAnalyzer::endJob().

{
  myDBObject = fObject;
}

Member Data Documentation

Definition at line 37 of file HcalGainWidthsHandler.h.

std::string HcalGainWidthsHandler::m_name [private]

Definition at line 39 of file HcalGainWidthsHandler.h.

Referenced by getNewObjects(), HcalGainWidthsHandler(), and id().

Definition at line 38 of file HcalGainWidthsHandler.h.

Referenced by getNewObjects(), and initObject().

unsigned int HcalGainWidthsHandler::sinceTime [private]

Definition at line 36 of file HcalGainWidthsHandler.h.

Referenced by getNewObjects(), and HcalGainWidthsHandler().