CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalPedestalWidthsHandler Class Reference

#include <HcalPedestalWidthsHandler.h>

Inheritance diagram for HcalPedestalWidthsHandler:
popcon::PopConSourceHandler< HcalPedestalWidths >

List of all members.

Public Member Functions

void getNewObjects ()
 HcalPedestalWidthsHandler (edm::ParameterSet const &)
std::string id () const
void initObject (HcalPedestalWidths *)
 ~HcalPedestalWidthsHandler ()

Private Attributes

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

Detailed Description

Definition at line 25 of file HcalPedestalWidthsHandler.h.


Constructor & Destructor Documentation

HcalPedestalWidthsHandler::~HcalPedestalWidthsHandler ( )

Definition at line 12 of file HcalPedestalWidthsHandler.cc.

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

Definition at line 6 of file HcalPedestalWidthsHandler.cc.

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

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

Member Function Documentation

void HcalPedestalWidthsHandler::getNewObjects ( ) [virtual]

Implements popcon::PopConSourceHandler< HcalPedestalWidths >.

Definition at line 16 of file HcalPedestalWidthsHandler.cc.

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

{
  //  edm::LogInfo   ("HcalPedestalWidthsHandler") 
  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("HcalPedestalWidthsHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;

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

Implements popcon::PopConSourceHandler< HcalPedestalWidths >.

Definition at line 29 of file HcalPedestalWidthsHandler.h.

References m_name.

{ return m_name;}
void HcalPedestalWidthsHandler::initObject ( HcalPedestalWidths fObject)

Definition at line 45 of file HcalPedestalWidthsHandler.cc.

References myDBObject.

Referenced by HcalPedestalWidthsPopConAnalyzer::endJob().

{
  myDBObject = fObject;
}

Member Data Documentation

Definition at line 37 of file HcalPedestalWidthsHandler.h.

std::string HcalPedestalWidthsHandler::m_name [private]

Definition at line 39 of file HcalPedestalWidthsHandler.h.

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

Definition at line 38 of file HcalPedestalWidthsHandler.h.

Referenced by getNewObjects(), and initObject().

unsigned int HcalPedestalWidthsHandler::sinceTime [private]

Definition at line 36 of file HcalPedestalWidthsHandler.h.

Referenced by getNewObjects(), and HcalPedestalWidthsHandler().