CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

CSCChamberMapValues Class Reference

#include <CSCChamberMapValues.h>

Inheritance diagram for CSCChamberMapValues:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef const CSCChamberMapReturnType

Public Member Functions

 CSCChamberMapValues (const edm::ParameterSet &)
ReturnType produceChamberMap (const CSCChamberMapRcd &)
 ~CSCChamberMapValues ()

Static Public Member Functions

static CSCChamberMapfillChamberMap ()

Private Member Functions

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

Private Attributes

CSCChamberMapmapObj

Detailed Description

Definition at line 22 of file CSCChamberMapValues.h.


Member Typedef Documentation

Definition at line 29 of file CSCChamberMapValues.h.


Constructor & Destructor Documentation

CSCChamberMapValues::CSCChamberMapValues ( const edm::ParameterSet iConfig)

Definition at line 11 of file CSCChamberMapValues.cc.

References fillChamberMap(), mapObj, produceChamberMap(), and edm::ESProducer::setWhatProduced().

{
  //the following line is needed to tell the framework what
  // data is being produced
  mapObj = fillChamberMap();
  setWhatProduced(this,&CSCChamberMapValues::produceChamberMap);
  findingRecord<CSCChamberMapRcd>();
  //now do what ever other initialization is needed
}
CSCChamberMapValues::~CSCChamberMapValues ( )

Definition at line 22 of file CSCChamberMapValues.cc.

References mapObj.

{
 
   // do anything here that needs to be done at desctruction time
   // (e.g. close files, deallocate resources etc.)
  delete mapObj;
}

Member Function Documentation

CSCChamberMap * CSCChamberMapValues::fillChamberMap ( ) [inline, static]

Definition at line 45 of file CSCChamberMapValues.h.

References trackerHits::c, CSCChamberMap::ch_map, cscmap1::chamber(), prof2calltree::count, i, j, gen::k, prof2calltree::l, Association::map, and csvReporter::r.

Referenced by CSCChamberMapValues().

{
  CSCChamberMap * mapobj = new CSCChamberMap();
  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;
  
  /* 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_map[chamberid]=item;
          count=count+1;
        }
      }
    }
  }
  return mapobj;
}
CSCChamberMapValues::ReturnType CSCChamberMapValues::produceChamberMap ( const CSCChamberMapRcd iRecord)

Definition at line 37 of file CSCChamberMapValues.cc.

References mapObj.

Referenced by CSCChamberMapValues().

{
  //need a new object so to not be deleted at exit
  CSCChamberMap* mydata=new CSCChamberMap( *mapObj );
  return mydata;
  
}
void CSCChamberMapValues::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
) [private, virtual]

Member Data Documentation