CMS 3D CMS Logo

Public Member Functions | Private Attributes

CSCRecoIdealDBLoader Class Reference

#include <CSCRecoIdealDBLoader.h>

Inheritance diagram for CSCRecoIdealDBLoader:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginRun (const edm::Run &, edm::EventSetup const &)
 CSCRecoIdealDBLoader (const edm::ParameterSet &iConfig)
virtual void endJob ()
 ~CSCRecoIdealDBLoader ()

Private Attributes

std::string label_
int rotNumSeed_

Detailed Description

Definition at line 13 of file CSCRecoIdealDBLoader.h.


Constructor & Destructor Documentation

CSCRecoIdealDBLoader::CSCRecoIdealDBLoader ( const edm::ParameterSet iConfig) [explicit]

Definition at line 30 of file CSCRecoIdealDBLoader.cc.

References gather_cfg::cout.

                                                                         : label_()
{
  std::cout<<"CSCRecoIdealDBLoader::CSCRecoIdealDBLoader"<<std::endl;
}
CSCRecoIdealDBLoader::~CSCRecoIdealDBLoader ( )

Definition at line 35 of file CSCRecoIdealDBLoader.cc.

References gather_cfg::cout.

{
  std::cout<<"CSCRecoIdealDBLoader::~CSCRecoIdealDBLoader"<<std::endl;
}

Member Function Documentation

virtual void CSCRecoIdealDBLoader::analyze ( const edm::Event ,
const edm::EventSetup  
) [inline, virtual]

Implements edm::EDAnalyzer.

Definition at line 19 of file CSCRecoIdealDBLoader.h.

{}
void CSCRecoIdealDBLoader::beginRun ( const edm::Run ,
edm::EventSetup const &  es 
) [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 41 of file CSCRecoIdealDBLoader.cc.

References CSCGeometryParsFromDD::build(), gather_cfg::cout, edm::EventSetup::get(), edm::Service< T >::isAvailable(), and label_.

{
  std::cout<<"CSCRecoIdealDBLoader::beginRun"<<std::endl;
  RecoIdealGeometry* rig = new RecoIdealGeometry;
  CSCRecoDigiParameters* rdp = new CSCRecoDigiParameters;
  edm::Service<cond::service::PoolDBOutputService> mydbservice;
  if( !mydbservice.isAvailable() ){
    edm::LogError("CSCRecoIdealDBLoader")<<"PoolDBOutputService unavailable";
    return;
  }

  edm::ESTransientHandle<DDCompactView> pDD;
  edm::ESHandle<MuonDDDConstants> pMNDC;
  es.get<IdealGeometryRecord>().get(label_, pDD );
  es.get<MuonNumberingRecord>().get( pMNDC );

  const DDCompactView& cpv = *pDD;
  CSCGeometryParsFromDD cscgp;

  cscgp.build( &cpv, *pMNDC, *rig, *rdp );

  if ( mydbservice->isNewTagRequest("CSCRecoGeometryRcd") ) {
    mydbservice->createNewIOV<RecoIdealGeometry>(rig
                                                 , mydbservice->beginOfTime()
                                                 , mydbservice->endOfTime()
                                                 , "CSCRecoGeometryRcd");
  } else {
    edm::LogError("CSCRecoIdealDBLoader")<<"CSCRecoGeometryRcd Tag is already present.";
  }
  if ( mydbservice->isNewTagRequest("CSCRecoDigiParametersRcd") ) {
    mydbservice->createNewIOV<CSCRecoDigiParameters>(rdp
                                                     , mydbservice->beginOfTime()
                                                     , mydbservice->endOfTime()
                                                     , "CSCRecoDigiParametersRcd");
  } else {
    edm::LogError("CSCRecoIdealDBLoader")<<"CSCRecoDigiParametersRcd Tag is already present.";
  }

}
virtual void CSCRecoIdealDBLoader::endJob ( void  ) [inline, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 20 of file CSCRecoIdealDBLoader.h.

{};

Member Data Documentation

std::string CSCRecoIdealDBLoader::label_ [private]

Definition at line 20 of file CSCRecoIdealDBLoader.h.

Referenced by beginRun().

Definition at line 24 of file CSCRecoIdealDBLoader.h.