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/05/14 11:43:08 $
5  * $Revision: 1.2 $
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::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 }
85 
87 
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
int kp
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
boost::shared_ptr< T > get(size_t n) const
Definition: KeyList.h:39
DTKeyedConfigDBDump(const edm::ParameterSet &ps)
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
heterocontainer::HCTypeTag TypeTag
tuple cout
Definition: gather_cfg.py:145
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