CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/EventFilter/HcalRawToDigi/src/HcalFEDList.cc

Go to the documentation of this file.
00001 #include "DataFormats/FEDRawData/interface/FEDNumbering.h"
00002 #include "EventFilter/HcalRawToDigi/interface/HcalDCCHeader.h"
00003 #include "EventFilter/HcalRawToDigi/interface/HcalFEDList.h"
00004 
00005 HcalFEDList::HcalFEDList() {
00006   calibType_ = -1 ; // No calibration 
00007   setListOfFEDs() ; 
00008 }
00009 HcalFEDList::HcalFEDList(int calibType) {
00010   calibType_ = calibType ; 
00011   setListOfFEDs() ; 
00012 }
00013 HcalFEDList::~HcalFEDList() {
00014   // Do nothing
00015 }
00016 
00017 void HcalFEDList::setListOfFEDs() { 
00018   
00019   int first = FEDNumbering::MINHCALFEDID ; 
00020   int last  = FEDNumbering::MAXHCALFEDID ;
00021 
00022   int HBHEstart = FEDNumbering::MINHCALFEDID ; 
00023   int HFstart   = FEDNumbering::MINHCALFEDID + 18 ; 
00024   int HOstart   = FEDNumbering::MINHCALFEDID + 24 ; 
00025 
00026   int HBHEend = FEDNumbering::MINHCALFEDID + 17 ; 
00027   int HFend   = FEDNumbering::MINHCALFEDID + 23 ; 
00028   int HOend   = FEDNumbering::MAXHCALFEDID ;
00029 
00030   switch (calibType_ ) {
00031   case hc_Pedestal : 
00032     first = FEDNumbering::MINHCALFEDID ; 
00033     last  = FEDNumbering::MAXHCALFEDID ;
00034     break ; 
00035   case hc_RADDAM : 
00036     first = HFstart ; 
00037     last  = HFend ; 
00038     break ; 
00039   case hc_HBHEHPD : 
00040     first = HBHEstart ; 
00041     last = HBHEend ; 
00042     break ; 
00043   case hc_HOHPD : 
00044     first = HOstart ; 
00045     last = HOend ; 
00046     break ; 
00047   case hc_HFPMT : 
00048     first = HFstart ; 
00049     last = HFend ; 
00050     break ;
00051   //--- No calibration defined ---//
00052   default : 
00053     first = -1 ; 
00054     last = -1 ; 
00055     break ; 
00056   }
00057 
00058   if ( first >= 0 && last >= 0 ) 
00059     for (int i=first; i<=last; i++) fedList_.push_back(i) ; 
00060 }
00061