CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 // Base Class Headers --
12 //----------------------
14 //------------------------------------
15 // Collaborating Class Declarations --
16 //------------------------------------
20 //-------------------------------
21 // Collaborating Class Headers --
22 //-------------------------------
28 
29 //-----------------------
30 // This Class' Header --
31 //-----------------------
33 public:
36  explicit DTKeyedConfigDBDump(const edm::ParameterSet& ps);
37 
40  ~DTKeyedConfigDBDump() override;
41 
44  void beginJob() override;
46  void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override;
47 
48 private:
50 };
51 //-------------------
52 // Initializations --
53 //-------------------
54 
55 //----------------
56 // Constructors --
57 //----------------
59 
60 //--------------
61 // Destructor --
62 //--------------
64 
65 //--------------
66 // Operations --
67 //--------------
69 
74  //record not found
75  edm::LogWarning("DTKeyedConfigDBDump") << "Record \"DTKeyedConfigListRcd "
76  << "\" does not exist " << std::endl;
77  }
79  edm::LogInfo("DTKeyedConfigDBDump") << "now load and get" << std::endl;
80  auto pkc = kp->getUsingKey<DTKeyedConfig>(999999999);
81  edm::LogInfo("DTKeyedConfigDBDump") << "now check" << std::endl;
82  if (pkc.get())
83  edm::LogInfo("DTKeyedConfigDBDump") << pkc->getId() << " " << *(pkc->dataBegin()) << std::endl;
84  else
85  edm::LogInfo("DTKeyedConfigDBDump") << "not found" << std::endl;
86  edm::LogInfo("DTKeyedConfigDBDump") << std::endl;
87  return;
88 }
89 
int kp
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool getData(T &iHolder) const
Definition: EventSetup.h:128
int iEvent
Definition: GenABIO.cc:224
void beginJob() override
DTKeyedConfigDBDump(const edm::ParameterSet &ps)
Log< level::Info, false > LogInfo
edm::ESGetToken< cond::persistency::KeyList, DTKeyedConfigListRcd > perskeylistToken_
heterocontainer::HCTypeTag TypeTag
void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) override
std::shared_ptr< T > getUsingKey(unsigned long long key) const
Definition: KeyList.h:57
Log< level::Warning, false > LogWarning
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
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