CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTKeyedConfigDBDump.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * $Date: 2010/10/25 10:54:52 $
5  * $Revision: 1.3 $
6  * \author Paolo Ronchese INFN Padova
7  *
8  */
9 
10 //-----------------------
11 // This Class' Header --
12 //-----------------------
14 
15 //-------------------------------
16 // Collaborating Class Headers --
17 //-------------------------------
23 
24 //---------------
25 // C++ Headers --
26 //---------------
27 #include <iostream>
28 
29 //-------------------
30 // Initializations --
31 //-------------------
32 
33 
34 //----------------
35 // Constructors --
36 //----------------
38 }
39 
40 //--------------
41 // Destructor --
42 //--------------
44 }
45 
46 //--------------
47 // Operations --
48 //--------------
50 
51  return;
52 
53 }
54 
55 
57  const edm::EventSetup& c ) {
59  recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("DTKeyedConfigListRcd"));
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::KeyList const & kl= *klh.product();
69  cond::KeyList* kp = const_cast<cond::KeyList*>( &kl );
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  const DTKeyedConfig* pkc = kp->get<DTKeyedConfig>(0);
76  std::cout << "now check" << std::endl;
77  if ( pkc != 0 ) 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 }
85 
87 
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void load(std::vector< unsigned long long > const &keys)
Definition: KeyList.cc:10
int kp
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
data_iterator dataBegin() const
T const * get(int n) const
Definition: KeyList.h:39
DTKeyedConfigDBDump(const edm::ParameterSet &ps)
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
heterocontainer::HCTypeTag TypeTag
int getId() const
tuple cout
Definition: gather_cfg.py:121
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:129