CMS 3D CMS Logo

Public Member Functions | Private Attributes

CastorDbProducer Class Reference

#include <CalibFormats/CastorDbProducer/interface/CastorDbProducer.h>

Inheritance diagram for CastorDbProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 CastorDbProducer (const edm::ParameterSet &)
void channelQualityCallback (const CastorChannelQualityRcd &fRecord)
void electronicsMapCallback (const CastorElectronicsMapRcd &fRecord)
void gainsCallback (const CastorGainsRcd &fRecord)
void gainWidthsCallback (const CastorGainWidthsRcd &fRecord)
void pedestalsCallback (const CastorPedestalsRcd &fRecord)
void pedestalWidthsCallback (const CastorPedestalWidthsRcd &fRecord)
boost::shared_ptr
< CastorDbService
produce (const CastorDbRecord &)
void QIEDataCallback (const CastorQIEDataRcd &fRecord)
 ~CastorDbProducer ()

Private Attributes

std::vector< std::string > mDumpRequest
std::ostream * mDumpStream
boost::shared_ptr
< CastorDbService
mService

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 20 of file CastorDbProducer.h.


Constructor & Destructor Documentation

CastorDbProducer::CastorDbProducer ( const edm::ParameterSet fConfig)
CastorDbProducer::~CastorDbProducer ( )

Definition at line 65 of file CastorDbProducer.cc.

References gather_cfg::cout, and mDumpStream.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)
  if (mDumpStream != &std::cout) delete mDumpStream;
}

Member Function Documentation

void CastorDbProducer::channelQualityCallback ( const CastorChannelQualityRcd fRecord)

Definition at line 138 of file CastorDbProducer.cc.

References CastorDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::EventSetupRecord::get(), mDumpRequest, mDumpStream, mService, edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CastorDbProducer().

                                                                                     {
  edm::ESHandle <CastorChannelQuality> item;
  fRecord.get (item);
  mService->setData (item.product ());
  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("ChannelQuality")) != mDumpRequest.end()) {
    *mDumpStream << "New HCAL/CASTOR ChannelQuality set" << std::endl;
    CastorDbASCIIIO::dumpObject (*mDumpStream, *(item.product ()));
  }
}
void CastorDbProducer::electronicsMapCallback ( const CastorElectronicsMapRcd fRecord)

Definition at line 148 of file CastorDbProducer.cc.

References CastorDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::EventSetupRecord::get(), mDumpRequest, mDumpStream, mService, edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CastorDbProducer().

                                                                                     {
  edm::ESHandle <CastorElectronicsMap> item;
  fRecord.get (item);
  mService->setData (item.product ());
  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("ElectronicsMap")) != mDumpRequest.end()) {
    *mDumpStream << "New HCAL/CASTOR Electronics Map set" << std::endl;
    CastorDbASCIIIO::dumpObject (*mDumpStream, *(item.product ()));
  }
}
void CastorDbProducer::gainsCallback ( const CastorGainsRcd fRecord)
void CastorDbProducer::gainWidthsCallback ( const CastorGainWidthsRcd fRecord)

Definition at line 118 of file CastorDbProducer.cc.

References CastorDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::EventSetupRecord::get(), mDumpRequest, mDumpStream, mService, edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CastorDbProducer().

                                                                             {
  edm::ESHandle <CastorGainWidths> item;
  fRecord.get (item);
  mService->setData (item.product ());
  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("GainWidths")) != mDumpRequest.end()) {
    *mDumpStream << "New HCAL/CASTOR GainWidths set" << std::endl;
    CastorDbASCIIIO::dumpObject (*mDumpStream, *(item.product ()));
  }
}
void CastorDbProducer::pedestalsCallback ( const CastorPedestalsRcd fRecord)

Definition at line 84 of file CastorDbProducer.cc.

References CastorDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::EventSetupRecord::get(), mDumpRequest, mDumpStream, mService, edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CastorDbProducer().

                                                                           {

  edm::ESHandle <CastorPedestals> item;
  fRecord.get (item);

  mService->setData (item.product ());
  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("Pedestals")) != mDumpRequest.end()) {
    *mDumpStream << "New HCAL/CASTOR Pedestals set" << std::endl;
    CastorDbASCIIIO::dumpObject (*mDumpStream, *(item.product ()));
  }
}
void CastorDbProducer::pedestalWidthsCallback ( const CastorPedestalWidthsRcd fRecord)

Definition at line 96 of file CastorDbProducer.cc.

References CastorDbASCIIIO::dumpObject(), spr::find(), edm::eventsetup::EventSetupRecord::get(), mDumpRequest, mDumpStream, mService, edm::ESHandle< T >::product(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CastorDbProducer().

                                                                                     {
  edm::ESHandle <CastorPedestalWidths> item;
  fRecord.get (item);
  mService->setData (item.product ());
  if (std::find (mDumpRequest.begin(), mDumpRequest.end(), std::string ("PedestalWidths")) != mDumpRequest.end()) {
    *mDumpStream << "New HCAL/CASTOR Pedestals set" << std::endl;
    CastorDbASCIIIO::dumpObject (*mDumpStream, *(item.product ()));
  }
}
boost::shared_ptr< CastorDbService > CastorDbProducer::produce ( const CastorDbRecord )

Definition at line 79 of file CastorDbProducer.cc.

References mService.

{
  return mService;
}
void CastorDbProducer::QIEDataCallback ( const CastorQIEDataRcd fRecord)

Member Data Documentation

std::vector<std::string> CastorDbProducer::mDumpRequest [private]
std::ostream* CastorDbProducer::mDumpStream [private]
boost::shared_ptr<CastorDbService> CastorDbProducer::mService [private]