#include <CSCBadChambersConditions.h>
Public Types | |
typedef const CSCBadChambers * | ReturnType |
Public Member Functions | |
CSCBadChambersConditions (const edm::ParameterSet &) | |
ReturnType | produceBadChambers (const CSCBadChambersRcd &) |
~CSCBadChambersConditions () | |
Static Public Member Functions | |
static CSCBadChambers * | prefillBadChambers () |
Private Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
CSCBadChambers * | cndbBadChambers |
Definition at line 20 of file CSCBadChambersConditions.h.
typedef const CSCBadChambers* CSCBadChambersConditions::ReturnType |
Definition at line 28 of file CSCBadChambersConditions.h.
CSCBadChambersConditions::CSCBadChambersConditions | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 10 of file CSCBadChambersConditions.cc.
References cndbBadChambers, prefillBadChambers(), produceBadChambers(), and edm::ESProducer::setWhatProduced().
{ //the following line is needed to tell the framework what // data is being produced cndbBadChambers = prefillBadChambers(); setWhatProduced(this,&CSCBadChambersConditions::produceBadChambers); findingRecord<CSCBadChambersRcd>(); //now do what ever other initialization is needed }
CSCBadChambersConditions::~CSCBadChambersConditions | ( | ) |
Definition at line 21 of file CSCBadChambersConditions.cc.
References cndbBadChambers.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) delete cndbBadChambers; }
CSCBadChambers * CSCBadChambersConditions::prefillBadChambers | ( | ) | [inline, static] |
Definition at line 44 of file CSCBadChambersConditions.h.
References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, cmsRelvalreport::exit, and recoMuon::in.
Referenced by CSCBadChambersConditions().
{ // const int MAX_SIZE = 468; //cndbbadchambers = new CSCBadChambers(); int new_chambers; std::vector<int> new_badchambers; int old_chamber = -1; int new_nrlines; new_nrlines=0; std::ifstream newdata; newdata.open("badchambers.dat",std::ios::in); if(!newdata) { std::cerr <<"Error: badchambers.dat -> no such file!"<< std::endl; exit(1); } while(!newdata.eof() ) { newdata >> new_chambers; if (new_chambers!=old_chamber){ new_badchambers.push_back(new_chambers); std::cout<<new_chambers<<std::endl; ++new_nrlines; } old_chamber = new_chambers; } newdata.close(); CSCBadChambers * cndbbadchambers = new CSCBadChambers(new_nrlines, new_badchambers); //std::cout <<"numberOfBadChambers "<<new_nrlines<<std::endl; return cndbbadchambers; }
CSCBadChambersConditions::ReturnType CSCBadChambersConditions::produceBadChambers | ( | const CSCBadChambersRcd & | iRecord | ) |
Definition at line 36 of file CSCBadChambersConditions.cc.
References cndbBadChambers.
Referenced by CSCBadChambersConditions().
{ //need a new object so to not be deleted at exit CSCBadChambers* mydata=new CSCBadChambers( *cndbBadChambers ); return mydata; }
void CSCBadChambersConditions::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | , | ||
edm::ValidityInterval & | oValidity | ||
) | [private, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 44 of file CSCBadChambersConditions.cc.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
{ oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); }
Definition at line 35 of file CSCBadChambersConditions.h.
Referenced by CSCBadChambersConditions(), produceBadChambers(), and ~CSCBadChambersConditions().