Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:47:37

0001 #include "CalibMuon/CSCCalibration/test/stubs/CSCNoiseMatrixHandler.h"
0002 #include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
0003 #include <iostream>
0004 
0005 #include "CalibMuon/CSCCalibration/interface/CSCNoiseMatrixDBConditions.h"
0006 #include "CondFormats/CSCObjects/interface/CSCDBNoiseMatrix.h"
0007 
0008 popcon::CSCDBNoiseMatrixImpl::CSCDBNoiseMatrixImpl(const edm::ParameterSet &pset)
0009     : m_name(pset.getUntrackedParameter<std::string>("name", "CSCDBNoiseMatrixImpl")) {}
0010 
0011 popcon::CSCDBNoiseMatrixImpl::~CSCDBNoiseMatrixImpl() {}
0012 
0013 void popcon::CSCDBNoiseMatrixImpl::getNewObjects() {
0014   std::cout << "CSCNoiseMatrixHandler - time before filling object:" << std::endl;
0015   std::cout << "------- CSC src - > getNewObjects\n" << m_name;
0016 
0017   // fill object from file
0018   CSCDBNoiseMatrix *cndbmatrix = CSCNoiseMatrixDBConditions::prefillDBNoiseMatrix();
0019   // std::cout << "crosstalk size " << cndbmatrix->matrix.size() << std::endl;
0020 
0021   std::cout << "CSCNoiseMatrixHandler - time after filling object:" << std::endl;
0022 
0023   // check whats already inside of database
0024 
0025   std::cerr << "got offlineInfo" << std::endl;
0026   std::cerr << tagInfo().name << " , last object valid since " << tagInfo().lastInterval.since << std::endl;
0027 
0028   unsigned int snc;
0029 
0030   std::cerr << "Source implementation test ::getNewObjects : enter since ? \n";
0031   std::cin >> snc;
0032 
0033   m_to_transfer.push_back(std::make_pair(cndbmatrix, snc));
0034 
0035   std::cout << "------- " << m_name << "CSC src - > getNewObjects -----------\n" << std::endl;
0036   std::cout << "CSCNoiseMatrixHandler - time before writing into DB:" << std::endl;
0037 }