![]() |
![]() |
#include <OnlineDB/CSCCondDB/interface/CSCCrateMapValues.h>
Public Types | |
typedef const CSCCrateMap * | ReturnType |
Public Member Functions | |
CSCCrateMapValues (const edm::ParameterSet &) | |
ReturnType | produceCrateMap (const CSCCrateMapRcd &) |
~CSCCrateMapValues () | |
Static Public Member Functions | |
static CSCCrateMap * | fillCrateMap () |
Private Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
CSCCrateMap * | mapObj |
Definition at line 22 of file CSCCrateMapValues.h.
typedef const CSCCrateMap* CSCCrateMapValues::ReturnType |
Definition at line 29 of file CSCCrateMapValues.h.
CSCCrateMapValues::CSCCrateMapValues | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 10 of file CSCCrateMapValues.cc.
References fillCrateMap(), mapObj, produceCrateMap(), and edm::ESProducer::setWhatProduced().
00011 { 00012 //the following line is needed to tell the framework what 00013 // data is being produced 00014 mapObj = fillCrateMap(); 00015 setWhatProduced(this,&CSCCrateMapValues::produceCrateMap); 00016 findingRecord<CSCCrateMapRcd>(); 00017 //now do what ever other initialization is needed 00018 }
CSCCrateMapValues::~CSCCrateMapValues | ( | ) |
Definition at line 21 of file CSCCrateMapValues.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 }
CSCCrateMap * CSCCrateMapValues::fillCrateMap | ( | ) | [inline, static] |
Definition at line 45 of file CSCCrateMapValues.h.
References c, cscmap1::chamber(), count, CSCCrateMap::crate_map, CSCMapItem::MapItem::crateid, CSCMapItem::MapItem::cscid, i, j, k, edm::es::l(), python::multivaluedict::map(), and r.
Referenced by CSCCrateMapValues().
00046 { 00047 CSCCrateMap * mapobj = new CSCCrateMap(); 00048 cscmap1 *map = new cscmap1 (); 00049 CSCMapItem::MapItem item; 00050 00051 int i,j,k,l; //i - endcap, j - station, k - ring, l - chamber. 00052 int r,c; //r - number of rings, c - number of chambers. 00053 int count=0; 00054 int chamberid; 00055 int crate_cscid; 00056 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 crate_cscid=item.crateid*10+item.cscid; 00070 mapobj->crate_map[crate_cscid]=item; 00071 count=count+1; 00072 } 00073 } 00074 } 00075 } 00076 return mapobj; 00077 }
CSCCrateMapValues::ReturnType CSCCrateMapValues::produceCrateMap | ( | const CSCCrateMapRcd & | iRecord | ) |
Definition at line 36 of file CSCCrateMapValues.cc.
References mapObj.
Referenced by CSCCrateMapValues().
00037 { 00038 //need a new object so to not be deleted at exit 00039 CSCCrateMap* mydata=new CSCCrateMap( *mapObj ); 00040 return mydata; 00041 00042 }
void CSCCrateMapValues::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , | |
const edm::IOVSyncValue & | , | |||
edm::ValidityInterval & | oValidity | |||
) | [private, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 44 of file CSCCrateMapValues.cc.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
00046 { 00047 oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); 00048 00049 }
CSCCrateMap* CSCCrateMapValues::mapObj [private] |
Definition at line 36 of file CSCCrateMapValues.h.
Referenced by CSCCrateMapValues(), produceCrateMap(), and ~CSCCrateMapValues().