Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#include "CalibMuon/CSCCalibration/test/stubs/CSCPedestalsHandler.h"
#include "FWCore/ParameterSet/interface/ParameterSetfwd.h"
#include <iostream>

#include "CalibMuon/CSCCalibration/interface/CSCPedestalsDBConditions.h"
#include "CondFormats/CSCObjects/interface/CSCDBPedestals.h"

popcon::CSCDBPedestalsImpl::CSCDBPedestalsImpl(const edm::ParameterSet &pset)
    : m_name(pset.getUntrackedParameter<std::string>("name", "CSCDBPedestalsImpl")) {}

popcon::CSCDBPedestalsImpl::~CSCDBPedestalsImpl() {}

void popcon::CSCDBPedestalsImpl::getNewObjects() {
  std::cout << "CSCPedestalsHandler - time before filling object:" << std::endl;
  std::cout << "------- CSC src - > getNewObjects\n" << m_name;

  // fill object from file
  CSCDBPedestals *cnpedestals = CSCPedestalsDBConditions::prefillDBPedestals();
  // std::cout << "pedestals size " << cnpedestals->pedestals.size() <<
  // std::endl;

  std::cout << "CSCPedestalsHandler - time after filling object:" << std::endl;

  // check whats already inside of database

  std::cerr << "got offlineInfo" << std::endl;
  std::cerr << tagInfo().name << " , last object valid since " << tagInfo().lastInterval.since << std::endl;

  unsigned int snc;
  std::cout << "Source implementation test ::getNewObjects : enter since ? \n";
  std::cin >> snc;
  std::cout << "getNewObjects : enter till ? \n";

  m_to_transfer.push_back(std::make_pair(cnpedestals, snc));

  std::cout << "------- " << m_name << "CSC src - > getNewObjects -----------\n" << std::endl;
  std::cout << "CSCPedestalsHandler - time before writing into DB:" << std::endl;
}