CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCRecoIdealDBLoader.cc
Go to the documentation of this file.
1 #include "CSCRecoIdealDBLoader.h"
2 
4 
17 
19 
22 
23 #include <iostream>
24 #include <string>
25 #include <vector>
26 #include <map>
27 #include <sstream>
28 #include <algorithm>
29 
31 {
32  std::cout<<"CSCRecoIdealDBLoader::CSCRecoIdealDBLoader"<<std::endl;
33 }
34 
36 {
37  std::cout<<"CSCRecoIdealDBLoader::~CSCRecoIdealDBLoader"<<std::endl;
38 }
39 
40 void
42 {
43  std::cout<<"CSCRecoIdealDBLoader::beginRun"<<std::endl;
47  if( !mydbservice.isAvailable() ){
48  edm::LogError("CSCRecoIdealDBLoader")<<"PoolDBOutputService unavailable";
49  return;
50  }
51 
54  es.get<IdealGeometryRecord>().get(label_, pDD );
55  es.get<MuonNumberingRecord>().get( pMNDC );
56 
57  const DDCompactView& cpv = *pDD;
59 
60  cscgp.build( &cpv, *pMNDC, *rig, *rdp );
61 
62  if ( mydbservice->isNewTagRequest("CSCRecoGeometryRcd") ) {
63  mydbservice->createNewIOV<RecoIdealGeometry>(rig
64  , mydbservice->beginOfTime()
65  , mydbservice->endOfTime()
66  , "CSCRecoGeometryRcd");
67  } else {
68  edm::LogError("CSCRecoIdealDBLoader")<<"CSCRecoGeometryRcd Tag is already present.";
69  }
70  if ( mydbservice->isNewTagRequest("CSCRecoDigiParametersRcd") ) {
71  mydbservice->createNewIOV<CSCRecoDigiParameters>(rdp
72  , mydbservice->beginOfTime()
73  , mydbservice->endOfTime()
74  , "CSCRecoDigiParametersRcd");
75  } else {
76  edm::LogError("CSCRecoIdealDBLoader")<<"CSCRecoDigiParametersRcd Tag is already present.";
77  }
78 
79 }
type of data representation of DDCompactView
Definition: DDCompactView.h:81
bool build(const DDCompactView *cview, const MuonDDDConstants &muonConstants, RecoIdealGeometry &rig, CSCRecoDigiParameters &rdp)
Build the geometry returning the RecoIdealGeometry and the CSCRecoDigiParameters objects.
bool isNewTagRequest(const std::string &recordName)
bool isAvailable() const
Definition: Service.h:47
CSCRecoIdealDBLoader(const edm::ParameterSet &iConfig)
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
const T & get() const
Definition: EventSetup.h:55
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
tuple cout
Definition: gather_cfg.py:41
Definition: Run.h:32