#include <OnlineDB/CSCCondDB/interface/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().
00011 { 00012 //the following line is needed to tell the framework what 00013 // data is being produced 00014 mapObj = fillChamberIndex(); 00015 setWhatProduced(this,&CSCChamberIndexValues::produceChamberIndex); 00016 findingRecord<CSCChamberIndexRcd>(); 00017 //now do what ever other initialization is needed 00018 }
CSCChamberIndexValues::~CSCChamberIndexValues | ( | ) |
Definition at line 21 of file CSCChamberIndexValues.cc.
References mapObj.
00022 { 00023 00024 // do anything here that needs to be done at desctruction time 00025 // (e.g. close files, deallocate resources etc.) 00026 delete mapObj; 00027 }
CSCChamberIndex * CSCChamberIndexValues::fillChamberIndex | ( | ) | [inline, static] |
Definition at line 45 of file CSCChamberIndexValues.h.
References c, CSCChamberIndex::ch_index, cscmap1::chamber(), count, CSCMapItem::MapItem::cscIndex, i, j, k, edm::es::l(), python::multivaluedict::map(), and r.
Referenced by CSCChamberIndexValues().
00046 { 00047 CSCChamberIndex * mapobj = new CSCChamberIndex(); 00048 cscmap1 *map = new cscmap1(); 00049 CSCMapItem::MapItem item; 00050 int chamberid; 00051 00052 int i,j,k,l; //i - endcap, j - station, k - ring, l - chamber. 00053 int r,c; //r - number of rings, c - number of chambers. 00054 int count=0; 00055 00056 mapobj->ch_index.resize(540); 00057 /* This is version for 540 chambers. */ 00058 for(i=1;i<=2;++i){ 00059 for(j=1;j<=4;++j){ 00060 if(j==1) r=3; 00061 //else if(j==4) r=1; 00062 else r=2; 00063 for(k=1;k<=r;++k){ 00064 if(j>1 && k==1) c=18; 00065 else c=36; 00066 for(l=1;l<=c;++l){ 00067 chamberid=i*100000+j*10000+k*1000+l*10; 00068 map->chamber(chamberid,&item); 00069 mapobj->ch_index[item.cscIndex-1]=item; 00070 count=count+1; 00071 } 00072 } 00073 } 00074 } 00075 return mapobj; 00076 }
CSCChamberIndexValues::ReturnType CSCChamberIndexValues::produceChamberIndex | ( | const CSCChamberIndexRcd & | iRecord | ) |
Definition at line 36 of file CSCChamberIndexValues.cc.
References mapObj.
Referenced by CSCChamberIndexValues().
00037 { 00038 //need a new object so to not be deleted at exit 00039 CSCChamberIndex* mydata=new CSCChamberIndex( *mapObj ); 00040 return mydata; 00041 00042 }
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().
00046 { 00047 oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); 00048 00049 }
CSCChamberIndex* CSCChamberIndexValues::mapObj [private] |
Definition at line 36 of file CSCChamberIndexValues.h.
Referenced by CSCChamberIndexValues(), produceChamberIndex(), and ~CSCChamberIndexValues().