CMS 3D CMS Logo

CSCDDUMapValues Class Reference

#include <OnlineDB/CSCCondDB/interface/CSCDDUMapValues.h>

Inheritance diagram for CSCDDUMapValues:

edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef const CSCDDUMapReturnType

Public Member Functions

 CSCDDUMapValues (const edm::ParameterSet &)
ReturnType produceDDUMap (const CSCDDUMapRcd &)
 ~CSCDDUMapValues ()

Static Public Member Functions

static CSCDDUMapfillDDUMap ()

Private Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Private Attributes

CSCDDUMapmapObj


Detailed Description

Definition at line 22 of file CSCDDUMapValues.h.


Member Typedef Documentation

typedef const CSCDDUMap* CSCDDUMapValues::ReturnType

Definition at line 29 of file CSCDDUMapValues.h.


Constructor & Destructor Documentation

CSCDDUMapValues::CSCDDUMapValues ( const edm::ParameterSet iConfig  ) 

Definition at line 10 of file CSCDDUMapValues.cc.

References fillDDUMap(), produceDDUMap(), and edm::ESProducer::setWhatProduced().

00011 {
00012   //the following line is needed to tell the framework what
00013   // data is being produced
00014   fillDDUMap();
00015   setWhatProduced(this,&CSCDDUMapValues::produceDDUMap);
00016   findingRecord<CSCDDUMapRcd>();
00017   //now do what ever other initialization is needed
00018 }

CSCDDUMapValues::~CSCDDUMapValues (  ) 

Definition at line 21 of file CSCDDUMapValues.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 }


Member Function Documentation

CSCDDUMap * CSCDDUMapValues::fillDDUMap (  )  [inline, static]

Definition at line 45 of file CSCDDUMapValues.h.

References c, cscmap1::chamber(), count, CSCMapItem::MapItem::ddu, CSCMapItem::MapItem::ddu_input, CSCDDUMap::ddu_map, i, j, k, edm::es::l(), python::multivaluedict::map(), and r.

Referenced by CSCDDUMapValues().

00046 {
00047   CSCDDUMap * mapobj = new CSCDDUMap();
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 ddu_ddu_input;
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 r=2;
00062       for(k=1;k<=r;++k){
00063        if(j>1 && k==1) c=18;
00064        else c=36;
00065         for(l=1;l<=c;++l){
00066          chamberid=i*100000+j*10000+k*1000+l*10;
00067          map->chamber(chamberid,&item);
00068          ddu_ddu_input=item.ddu*100+item.ddu_input;
00069          mapobj->ddu_map[ddu_ddu_input]=item;
00070          count=count+1;
00071         }
00072       }
00073     }
00074   }
00075   return mapobj;
00076 }

CSCDDUMapValues::ReturnType CSCDDUMapValues::produceDDUMap ( const CSCDDUMapRcd iRecord  ) 

Definition at line 36 of file CSCDDUMapValues.cc.

References mapObj.

Referenced by CSCDDUMapValues().

00037 {
00038   //need a new object so to not be deleted at exit
00039   CSCDDUMap* mydata=new CSCDDUMap( *mapObj );
00040   return mydata;
00041   
00042 }

void CSCDDUMapValues::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
) [private, virtual]

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 44 of file CSCDDUMapValues.cc.

References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().


Member Data Documentation

CSCDDUMap* CSCDDUMapValues::mapObj [private]

Definition at line 36 of file CSCDDUMapValues.h.

Referenced by produceDDUMap(), and ~CSCDDUMapValues().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:10 2009 for CMSSW by  doxygen 1.5.4