CMS 3D CMS Logo

Public Member Functions

DTKeyedConfigDBDump Class Reference

#include <DTKeyedConfigDBDump.h>

Inheritance diagram for DTKeyedConfigDBDump:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
virtual void beginJob ()
 DTKeyedConfigDBDump (const edm::ParameterSet &ps)
virtual ~DTKeyedConfigDBDump ()

Detailed Description

Description:

Date:
2010/05/14 11:43:08
Revision:
1.2
Author:
Paolo Ronchese INFN Padova

Definition at line 35 of file DTKeyedConfigDBDump.h.


Constructor & Destructor Documentation

DTKeyedConfigDBDump::DTKeyedConfigDBDump ( const edm::ParameterSet ps) [explicit]

Constructor

Definition at line 37 of file DTKeyedConfigDBDump.cc.

                                                                    {
}
DTKeyedConfigDBDump::~DTKeyedConfigDBDump ( ) [virtual]

Destructor

Definition at line 43 of file DTKeyedConfigDBDump.cc.

                                          {
}

Member Function Documentation

void DTKeyedConfigDBDump::analyze ( const edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 56 of file DTKeyedConfigDBDump.cc.

References gather_cfg::cout, DTKeyedConfig::dataBegin(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), cond::KeyList::get(), DTKeyedConfig::getId(), cond::KeyList::load(), edm::ESHandle< T >::product(), and edm::eventsetup::EventSetupRecordKey::type().

                                                            {
  edm::eventsetup::EventSetupRecordKey
    recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("DTKeyedConfigListRcd"));
  if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
    //record not found
    std::cout <<"Record \"DTKeyedConfigListRcd "<<"\" does not exist "<<std::endl;
  }
  edm::ESHandle<cond::KeyList> klh;
  std::cout<<"got eshandle"<<std::endl;
  c.get<DTKeyedConfigListRcd>().get(klh);
  std::cout<<"got context"<<std::endl;
  cond::KeyList const &  kl= *klh.product();
  cond::KeyList* kp = const_cast<cond::KeyList*>( &kl );
  std::vector<unsigned long long> nkeys;
  nkeys.push_back( 999999999 );
  std::cout << "now load" << std::endl;
  kp->load( nkeys );
  std::cout << "now get" << std::endl;
  const DTKeyedConfig* pkc = kp->get<DTKeyedConfig>(0);
  std::cout << "now check" << std::endl;
  if ( pkc != 0 ) std::cout << pkc->getId() << " "
                            << *( pkc->dataBegin() ) << std::endl;
  else            std::cout << "not found" << std::endl;
  std::cout << std::endl;
  std::vector<unsigned long long> nvoid;
  kp->load( nvoid );
  return;
}
void DTKeyedConfigDBDump::beginJob ( void  ) [virtual]

Operations

Reimplemented from edm::EDAnalyzer.

Definition at line 49 of file DTKeyedConfigDBDump.cc.

                                   {

  return;

}