#include <CSCChamberIndexValues.h>
Public Types | |
typedef const CSCChamberIndex * | ReturnType |
Public Member Functions | |
CSCChamberIndexValues (const edm::ParameterSet &) | |
ReturnType | produceChamberIndex (const CSCChamberIndexRcd &) |
~CSCChamberIndexValues () | |
Static Public Member Functions | |
static CSCChamberIndex * | fillChamberIndex () |
Private Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
CSCChamberIndex * | mapObj |
Definition at line 22 of file CSCChamberIndexValues.h.
typedef const CSCChamberIndex* CSCChamberIndexValues::ReturnType |
Definition at line 29 of file CSCChamberIndexValues.h.
CSCChamberIndexValues::CSCChamberIndexValues | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 10 of file CSCChamberIndexValues.cc.
References fillChamberIndex(), mapObj, produceChamberIndex(), and edm::ESProducer::setWhatProduced().
{ //the following line is needed to tell the framework what // data is being produced mapObj = fillChamberIndex(); setWhatProduced(this,&CSCChamberIndexValues::produceChamberIndex); findingRecord<CSCChamberIndexRcd>(); //now do what ever other initialization is needed }
CSCChamberIndexValues::~CSCChamberIndexValues | ( | ) |
Definition at line 21 of file CSCChamberIndexValues.cc.
References mapObj.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) delete mapObj; }
CSCChamberIndex * CSCChamberIndexValues::fillChamberIndex | ( | ) | [inline, static] |
Definition at line 45 of file CSCChamberIndexValues.h.
References trackerHits::c, CSCChamberIndex::ch_index, cscmap1::chamber(), prof2calltree::count, CSCMapItem::MapItem::cscIndex, i, j, gen::k, prof2calltree::l, and csvReporter::r.
Referenced by CSCChamberIndexValues().
{ CSCChamberIndex * mapobj = new CSCChamberIndex(); cscmap1 *map = new cscmap1(); CSCMapItem::MapItem item; int chamberid; int i,j,k,l; //i - endcap, j - station, k - ring, l - chamber. int r,c; //r - number of rings, c - number of chambers. int count=0; mapobj->ch_index.resize(540); /* This is version for 540 chambers. */ for(i=1;i<=2;++i){ for(j=1;j<=4;++j){ if(j==1) r=3; //else if(j==4) r=1; else r=2; for(k=1;k<=r;++k){ if(j>1 && k==1) c=18; else c=36; for(l=1;l<=c;++l){ chamberid=i*100000+j*10000+k*1000+l*10; map->chamber(chamberid,&item); mapobj->ch_index[item.cscIndex-1]=item; count=count+1; } } } } return mapobj; }
CSCChamberIndexValues::ReturnType CSCChamberIndexValues::produceChamberIndex | ( | const CSCChamberIndexRcd & | iRecord | ) |
Definition at line 36 of file CSCChamberIndexValues.cc.
References mapObj.
Referenced by CSCChamberIndexValues().
{ //need a new object so to not be deleted at exit CSCChamberIndex* mydata=new CSCChamberIndex( *mapObj ); return mydata; }
void CSCChamberIndexValues::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | , | ||
edm::ValidityInterval & | oValidity | ||
) | [private, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 44 of file CSCChamberIndexValues.cc.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
{ oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); }
CSCChamberIndex* CSCChamberIndexValues::mapObj [private] |
Definition at line 36 of file CSCChamberIndexValues.h.
Referenced by CSCChamberIndexValues(), produceChamberIndex(), and ~CSCChamberIndexValues().