#include <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().
{ //the following line is needed to tell the framework what // data is being produced mapObj = fillCrateMap(); setWhatProduced(this,&CSCCrateMapValues::produceCrateMap); findingRecord<CSCCrateMapRcd>(); //now do what ever other initialization is needed }
CSCCrateMapValues::~CSCCrateMapValues | ( | ) |
Definition at line 21 of file CSCCrateMapValues.cc.
References mapObj.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) delete mapObj; }
CSCCrateMap * CSCCrateMapValues::fillCrateMap | ( | ) | [inline, static] |
Definition at line 45 of file CSCCrateMapValues.h.
References trackerHits::c, cscmap1::chamber(), prof2calltree::count, CSCCrateMap::crate_map, CSCMapItem::MapItem::crateid, CSCMapItem::MapItem::cscid, i, j, gen::k, prof2calltree::l, Association::map, and alignCSCRings::r.
Referenced by CSCCrateMapValues().
{ CSCCrateMap * mapobj = new CSCCrateMap(); cscmap1 *map = new cscmap1 (); CSCMapItem::MapItem item; 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; int chamberid; int crate_cscid; /* 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); crate_cscid=item.crateid*10+item.cscid; mapobj->crate_map[crate_cscid]=item; count=count+1; } } } } return mapobj; }
CSCCrateMapValues::ReturnType CSCCrateMapValues::produceCrateMap | ( | const CSCCrateMapRcd & | iRecord | ) |
Definition at line 36 of file CSCCrateMapValues.cc.
References mapObj.
Referenced by CSCCrateMapValues().
{ //need a new object so to not be deleted at exit CSCCrateMap* mydata=new CSCCrateMap( *mapObj ); return mydata; }
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().
{ oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); }
CSCCrateMap* CSCCrateMapValues::mapObj [private] |
Definition at line 36 of file CSCCrateMapValues.h.
Referenced by CSCCrateMapValues(), produceCrateMap(), and ~CSCCrateMapValues().