CMS 3D CMS Logo

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 #include <memory>
29 
30 //-------------------
31 // Initializations --
32 //-------------------
33 
34 //----------------
35 // Constructors --
36 //----------------
38 
39 //--------------
40 // Destructor --
41 //--------------
43 
44 //--------------
45 // Operations --
46 //--------------
48 
53  //record not found
54  std::cout << "Record \"DTKeyedConfigListRcd "
55  << "\" does not exist " << std::endl;
56  }
58  std::cout << "got eshandle" << std::endl;
59  c.get<DTKeyedConfigListRcd>().get(klh);
60  std::cout << "got context" << std::endl;
61  cond::persistency::KeyList const& kl = *klh.product();
62  cond::persistency::KeyList const* kp = &kl;
63  std::cout << "now load and get" << std::endl;
64  auto pkc = kp->getUsingKey<DTKeyedConfig>(999999999);
65  std::cout << "now check" << std::endl;
66  if (pkc.get())
67  std::cout << pkc->getId() << " " << *(pkc->dataBegin()) << std::endl;
68  else
69  std::cout << "not found" << std::endl;
70  std::cout << std::endl;
71  return;
72 }
73 
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
edm::eventsetup::heterocontainer::HCTypeTag::findType
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag
Definition: HCTypeTag.cc:121
ESHandle.h
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTKeyedConfigListRcd.h
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
MakerMacros.h
DTKeyedConfigDBDump::~DTKeyedConfigDBDump
~DTKeyedConfigDBDump() override
Definition: DTKeyedConfigDBDump.cc:42
DTKeyedConfigDBDump.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
DTKeyedConfigListRcd
Definition: DTKeyedConfigListRcd.h:5
edm::ESHandle
Definition: DTSurvey.h:22
edm::eventsetup::EventSetupRecordKey::TypeTag
heterocontainer::HCTypeTag TypeTag
Definition: EventSetupRecordKey.h:32
edm::ParameterSet
Definition: ParameterSet.h:36
DTKeyedConfig.h
edm::eventsetup::EventSetupRecordKey::type
const TypeTag & type() const
Definition: EventSetupRecordKey.h:40
DTKeyedConfig
Definition: DTKeyedConfig.h:35
DTKeyedConfigDBDump::beginJob
void beginJob() override
Definition: DTKeyedConfigDBDump.cc:47
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
DTKeyedConfigDBDump
Definition: DTKeyedConfigDBDump.h:35
KeyList.h
DTKeyedConfigDBDump::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: DTKeyedConfigDBDump.cc:49
cond::persistency::KeyList
Definition: KeyList.h:33
DTKeyedConfigDBDump::DTKeyedConfigDBDump
DTKeyedConfigDBDump(const edm::ParameterSet &ps)
Definition: DTKeyedConfigDBDump.cc:37
edm::Event
Definition: Event.h:73
kp
int kp
Definition: CascadeWrapper.h:13
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37