CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
DTKeyedConfigDBDump Class Reference

#include <DTKeyedConfigDBDump.h>

Inheritance diagram for DTKeyedConfigDBDump:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
 
virtual void beginJob ()
 
 DTKeyedConfigDBDump (const edm::ParameterSet &ps)
 
virtual ~DTKeyedConfigDBDump ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description:

Date:
2010/03/18 16:07:59
Revision:
1.1.2.1
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.

37  {
38 }
DTKeyedConfigDBDump::~DTKeyedConfigDBDump ( )
virtual

Destructor

Definition at line 43 of file DTKeyedConfigDBDump.cc.

43  {
44 }

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, edm::eventsetup::heterocontainer::HCTypeTag::findType(), cond::persistency::KeyList::get(), edm::EventSetup::get(), kp, cond::persistency::KeyList::load(), edm::ESHandle< class >::product(), and edm::eventsetup::EventSetupRecordKey::type().

57  {
59  recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("DTKeyedConfigListRcd"));
60  if( recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) {
61  //record not found
62  std::cout <<"Record \"DTKeyedConfigListRcd "<<"\" does not exist "<<std::endl;
63  }
65  std::cout<<"got eshandle"<<std::endl;
66  c.get<DTKeyedConfigListRcd>().get(klh);
67  std::cout<<"got context"<<std::endl;
68  cond::persistency::KeyList const & kl= *klh.product();
70  std::vector<unsigned long long> nkeys;
71  nkeys.push_back( 999999999 );
72  std::cout << "now load" << std::endl;
73  kp->load( nkeys );
74  std::cout << "now get" << std::endl;
75  boost::shared_ptr<DTKeyedConfig> pkc = kp->get<DTKeyedConfig>(0);
76  std::cout << "now check" << std::endl;
77  if ( pkc.get() ) std::cout << pkc->getId() << " "
78  << *( pkc->dataBegin() ) << std::endl;
79  else std::cout << "not found" << std::endl;
80  std::cout << std::endl;
81  std::vector<unsigned long long> nvoid;
82  kp->load( nvoid );
83  return;
84 }
int kp
boost::shared_ptr< T > get(size_t n) const
Definition: KeyList.h:39
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:86
heterocontainer::HCTypeTag TypeTag
tuple cout
Definition: gather_cfg.py:121
void load(const std::vector< unsigned long long > &keys)
Definition: KeyList.cc:14
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:125
void DTKeyedConfigDBDump::beginJob ( void  )
virtual

Operations

Reimplemented from edm::EDAnalyzer.

Definition at line 49 of file DTKeyedConfigDBDump.cc.

49  {
50 
51  return;
52 
53 }