CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.cc

Go to the documentation of this file.
00001 #include "EventFilter/EcalRawToDigi/plugins/EcalRawToDigi.h"
00002 #include "EventFilter/EcalRawToDigi/interface/EcalElectronicsMapper.h"
00003 #include "EventFilter/EcalRawToDigi/interface/DCCDataUnpacker.h"
00004 
00005 
00006 #include "FWCore/Framework/interface/EventSetup.h"
00007 #include "FWCore/Framework/interface/ESHandle.h"
00008 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
00009 #include "DataFormats/EcalRawData/interface/EcalListOfFEDS.h"
00010 #include "CondFormats/EcalObjects/interface/EcalChannelStatus.h"
00011 #include "CondFormats/DataRecord/interface/EcalChannelStatusRcd.h"
00012 
00013 EcalRawToDigi::EcalRawToDigi(edm::ParameterSet const& conf):
00014   
00015   //define the list of FED to be unpacked
00016   fedUnpackList_(conf.getParameter<std::vector<int> >("FEDs")),
00017 
00018   //define the ordered FED list
00019   orderedFedUnpackList_(conf.getParameter<std::vector<int> >("orderedFedList")),
00020 
00021   //define the ordered DCCId list
00022   orderedDCCIdList_(conf.getParameter<std::vector<int> >("orderedDCCIdList")),
00023 
00024   //get number of Xtal Time Samples
00025   numbXtalTSamples_(conf.getParameter<int>("numbXtalTSamples")),
00026 
00027   //Get number of Trigger Time Samples
00028   numbTriggerTSamples_(conf.getParameter<int>("numbTriggerTSamples")),
00029   
00030   //See if header unpacking is enabled
00031   headerUnpacking_(conf.getParameter<bool>("headerUnpacking")),
00032  
00033   //See if srp unpacking is enabled
00034   srpUnpacking_(conf.getParameter<bool>("srpUnpacking")),
00035   
00036   //See if tcc unpacking is enabled
00037   tccUnpacking_(conf.getParameter<bool>("tccUnpacking")),
00038   
00039   //See if fe unpacking is enabled
00040   feUnpacking_(conf.getParameter<bool>("feUnpacking")),
00041   
00042   //See if fe unpacking is enabled for mem box
00043   memUnpacking_(conf.getParameter<bool>("memUnpacking")), 
00044 
00045   //See if syncCheck is enabled
00046   syncCheck_(conf.getParameter<bool>("syncCheck")), 
00047 
00048   //See if feIdCheck is enabled
00049   feIdCheck_(conf.getParameter<bool>("feIdCheck")),
00050 
00051   // See if we want to keep data even if we have a mismatch between SR decision and block length
00052   forceToKeepFRdata_(conf.getParameter<bool>("forceToKeepFRData")),
00053 
00054   
00055   put_(conf.getParameter<bool>("eventPut")),
00056   
00057   dataLabel_(conf.getParameter<edm::InputTag>("InputLabel")),
00058 
00059   REGIONAL_(conf.getParameter<bool>("DoRegional")),
00060 
00061   fedsLabel_(conf.getParameter<edm::InputTag>("FedLabel")),
00062 
00063   myMap_(0),
00064   
00065   theUnpacker_(0)
00066 
00067 {
00068   
00069   first_ = true;
00070   DCCDataUnpacker::silentMode_ = conf.getUntrackedParameter<bool>("silentMode",false) ;
00071   
00072   if( numbXtalTSamples_ <6 || numbXtalTSamples_>64 || (numbXtalTSamples_-2)%4 ){
00073     std::ostringstream output;
00074     output      <<"\n Unsuported number of xtal time samples : "<<numbXtalTSamples_
00075                 <<"\n Valid Number of xtal time samples are : 6,10,14,18,...,62"; 
00076     edm::LogError("IncorrectConfiguration")<< output.str();
00077     // todo : throw an execption
00078   }
00079   
00080   if( numbTriggerTSamples_ !=1 && numbTriggerTSamples_ !=4 && numbTriggerTSamples_ !=8  ){
00081     std::ostringstream output;
00082     output      <<"\n Unsuported number of trigger time samples : "<<numbTriggerTSamples_
00083                 <<"\n Valid number of trigger time samples are :  1, 4 or 8"; 
00084     edm::LogError("IncorrectConfiguration")<< output.str();
00085     // todo : throw an execption
00086   }
00087   
00088   //NA : testing
00089   //nevts_=0;
00090   //RUNNING_TIME_=0;
00091 
00092   // if there are FEDs specified to unpack fill the vector of the fedUnpackList_
00093   // else fill with the entire ECAL fed range (600-670)
00094   if (fedUnpackList_.empty()) 
00095     for (int i=FEDNumbering::MINECALFEDID; i<=FEDNumbering::MAXECALFEDID; i++)
00096       fedUnpackList_.push_back(i);
00097 
00098   //print the FEDs to unpack to the logger
00099   std::ostringstream loggerOutput_;
00100   if(fedUnpackList_.size()!=0){
00101     for (unsigned int i=0; i<fedUnpackList_.size(); i++) 
00102       loggerOutput_ << fedUnpackList_[i] << " ";
00103     edm::LogInfo("EcalRawToDigi") << "EcalRawToDigi will unpack FEDs ( " << loggerOutput_.str() << ")";
00104     LogDebug("EcalRawToDigi") << "EcalRawToDigi will unpack FEDs ( " << loggerOutput_.str() << ")";
00105   }
00106   
00107   edm::LogInfo("EcalRawToDigi")
00108     <<"\n ECAL RawToDigi configuration:"
00109     <<"\n Header  unpacking is "<<headerUnpacking_
00110     <<"\n SRP Bl. unpacking is "<<srpUnpacking_
00111     <<"\n TCC Bl. unpacking is "<<tccUnpacking_  
00112     <<"\n FE  Bl. unpacking is "<<feUnpacking_
00113     <<"\n MEM Bl. unpacking is "<<memUnpacking_
00114     <<"\n sync check is "<<syncCheck_
00115     <<"\n feID check is "<<feIdCheck_
00116     <<"\n force keep FR data is "<<forceToKeepFRdata_
00117     <<"\n";
00118   
00119   
00120   // Producer products :
00121   produces<EBDigiCollection>("ebDigis"); 
00122   produces<EEDigiCollection>("eeDigis");
00123   produces<EBSrFlagCollection>();
00124   produces<EESrFlagCollection>();
00125   produces<EcalRawDataCollection>();
00126   produces<EcalPnDiodeDigiCollection>();
00127   produces<EcalTrigPrimDigiCollection>("EcalTriggerPrimitives");
00128   produces<EcalPSInputDigiCollection>("EcalPseudoStripInputs");
00129   
00130   // Integrity for xtal data
00131   produces<EBDetIdCollection>("EcalIntegrityGainErrors");
00132   produces<EBDetIdCollection>("EcalIntegrityGainSwitchErrors");
00133   produces<EBDetIdCollection>("EcalIntegrityChIdErrors");
00134 
00135   // Integrity for xtal data - EE specific (to be rivisited towards EB+EE common collection)
00136   produces<EEDetIdCollection>("EcalIntegrityGainErrors");
00137   produces<EEDetIdCollection>("EcalIntegrityGainSwitchErrors");
00138   produces<EEDetIdCollection>("EcalIntegrityChIdErrors");
00139 
00140   // Integrity Errors
00141   produces<EcalElectronicsIdCollection>("EcalIntegrityTTIdErrors");
00142   produces<EcalElectronicsIdCollection>("EcalIntegrityZSXtalIdErrors");
00143   produces<EcalElectronicsIdCollection>("EcalIntegrityBlockSizeErrors");
00144  
00145   // Mem channels' integrity
00146   produces<EcalElectronicsIdCollection>("EcalIntegrityMemTtIdErrors");
00147   produces<EcalElectronicsIdCollection>("EcalIntegrityMemBlockSizeErrors");
00148   produces<EcalElectronicsIdCollection>("EcalIntegrityMemChIdErrors");
00149   produces<EcalElectronicsIdCollection>("EcalIntegrityMemGainErrors");
00150 
00151 
00152  
00153   // Build a new Electronics mapper and parse default map file
00154   myMap_ = new EcalElectronicsMapper(numbXtalTSamples_,numbTriggerTSamples_);
00155 
00156   // in case of external  text file (deprecated by HLT environment) 
00157   //  bool readResult = myMap_->readDCCMapFile(conf.getParameter<std::string>("DCCMapFile",""));
00158 
00159   // use two arrays from cfg to establish DCCId:FedId. If they are empy, than use hard coded correspondence 
00160   bool readResult = myMap_->makeMapFromVectors(orderedFedUnpackList_, orderedDCCIdList_);
00161   // myMap::makeMapFromVectors() returns "true" always
00162   // need to be fixed?
00163 
00164   if(!readResult){
00165     edm::LogWarning("IncorrectConfiguration")
00166       << "Arrays orderedFedList and orderedDCCIdList are emply. "
00167          "Hard coded correspondence for DCCId:FedId will be used.";
00168     // edm::LogError("EcalRawToDigi")<<"\n unable to read file : "
00169     //   <<conf.getParameter<std::string>("DCCMapFile");
00170   }
00171   
00172   // Build a new ECAL DCC data unpacker
00173   theUnpacker_ = new DCCDataUnpacker(myMap_,headerUnpacking_,srpUnpacking_,tccUnpacking_,feUnpacking_,memUnpacking_,syncCheck_,feIdCheck_,forceToKeepFRdata_);
00174    
00175 }
00176 
00177 
00178 // print list of crystals with non-zero statuses
00179 // this functions is only for debug purposes
00180 void printStatusRecords(const DCCDataUnpacker* unpacker,
00181                         const EcalElectronicsMapping* mapping)
00182 {
00183   // Endcap
00184   std::cout << "===> ENDCAP" << std::endl;
00185   for (int i = 0; i < EEDetId::kSizeForDenseIndexing; ++i) {
00186     const EEDetId id = EEDetId::unhashIndex(i);
00187     if (!id.null()) {
00188       // channel status
00189       const uint16_t code = unpacker->getChannelValue(id);
00190       
00191       if (code) {
00192         const EcalElectronicsId ei = mapping->getElectronicsId(id);
00193         
00194         // convert DCC ID (1 - 54) to FED ID (601 - 654)
00195         const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
00196         
00197         std::cout
00198           << " id " << id.rawId()
00199           << " -> (" << id.ix() << ", " << id.iy() << ", " << id.zside() << ") "
00200           << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", " << ei.xtalId() << ") "
00201           << "status = " << code
00202           << std::endl;
00203       }
00204     }
00205   }
00206   std::cout << "<=== ENDCAP" << std::endl;
00207   
00208   std::cout << "===> BARREL" << std::endl;
00209   for (int i = 0; i < EBDetId::kSizeForDenseIndexing; ++i) {
00210     const EBDetId id = EBDetId::unhashIndex(i);
00211     if (!id.null()) {
00212       // channel status
00213       const uint16_t code = unpacker->getChannelValue(id);
00214       
00215       if (code) {
00216         const EcalElectronicsId ei = mapping->getElectronicsId(id);
00217         
00218         // convert DCC ID (1 - 54) to FED ID (601 - 654)
00219         const int fed_id = unpacker->electronicsMapper()->getDCCId(ei.dccId());
00220         
00221         std::cout
00222           << " id " << id.rawId()
00223           << " -> (" << id.ieta() << ", " << id.iphi() << ", " << id.zside() << ") "
00224           << "(" << ei.dccId() << " : " << fed_id << ", " << ei.towerId() << ", " << ei.stripId() << ", " << ei.xtalId() << ") "
00225           << "status = " << code
00226           << std::endl;
00227       }
00228     }
00229   }
00230   std::cout << "<=== BARREL" << std::endl;
00231 }
00232 
00233 void EcalRawToDigi::beginRun(edm::Run&, const edm::EventSetup& es)
00234 {
00235   // channel status database
00236   edm::ESHandle<EcalChannelStatusMap> pChStatus;
00237   es.get<EcalChannelStatusRcd>().get(pChStatus);
00238   theUnpacker_->setChannelStatusDB(pChStatus.product());
00239   
00240   // uncomment following line to print list of crystals with bad status
00241   //edm::ESHandle<EcalElectronicsMapping> pEcalMapping;
00242   //es.get<EcalMappingRcd>().get(pEcalMapping);
00243   //const EcalElectronicsMapping* mapping = pEcalMapping.product();
00244   //printStatusRecords(theUnpacker_, mapping);
00245 }
00246 
00247 
00248 void EcalRawToDigi::produce(edm::Event& e, const edm::EventSetup& es)
00249 {
00250   
00251   //double TIME_START = clock();
00252   //nevts_++; //NUNO
00253 
00254 
00255   if (first_) {
00256    watcher_.check(es);
00257    edm::ESHandle< EcalElectronicsMapping > ecalmapping;
00258    es.get< EcalMappingRcd >().get(ecalmapping);
00259    myMap_ -> setEcalElectronicsMapping(ecalmapping.product());
00260    
00261    first_ = false;
00262 
00263   }else{
00264 
00265     if ( watcher_.check(es) ) {    
00266       edm::ESHandle< EcalElectronicsMapping > ecalmapping;
00267       es.get< EcalMappingRcd >().get(ecalmapping);
00268       myMap_ -> deletePointers();
00269       myMap_ -> resetPointers();
00270       myMap_ -> setEcalElectronicsMapping(ecalmapping.product());
00271     }
00272 
00273   }
00274 
00275   // Get list of FEDS :
00276   std::vector<int> FEDS_to_unpack;
00277   if (REGIONAL_) {
00278         edm::Handle<EcalListOfFEDS> listoffeds;
00279         e.getByLabel(fedsLabel_, listoffeds);
00280         FEDS_to_unpack = listoffeds -> GetList();
00281   }
00282 
00283 
00284 
00285   // Step A: Get Inputs    
00286 
00287   edm::Handle<FEDRawDataCollection> rawdata;  
00288   e.getByLabel(dataLabel_,rawdata);
00289 
00290 
00291   // Step B: encapsulate vectors in actual collections and set unpacker pointers
00292 
00293   // create the collection of Ecal Digis
00294   std::auto_ptr<EBDigiCollection> productDigisEB(new EBDigiCollection);
00295   productDigisEB->reserve(1700);
00296   theUnpacker_->setEBDigisCollection(&productDigisEB);
00297   
00298   // create the collection of Ecal Digis
00299   std::auto_ptr<EEDigiCollection> productDigisEE(new EEDigiCollection);
00300   theUnpacker_->setEEDigisCollection(&productDigisEE);
00301   
00302   // create the collection for headers
00303   std::auto_ptr<EcalRawDataCollection> productDccHeaders(new EcalRawDataCollection);
00304   theUnpacker_->setDccHeadersCollection(&productDccHeaders); 
00305 
00306   // create the collection for invalid gains
00307   std::auto_ptr< EBDetIdCollection> productInvalidGains(new EBDetIdCollection);
00308   theUnpacker_->setInvalidGainsCollection(&productInvalidGains); 
00309 
00310   // create the collection for invalid gain Switch
00311   std::auto_ptr< EBDetIdCollection> productInvalidGainsSwitch(new EBDetIdCollection);
00312   theUnpacker_->setInvalidGainsSwitchCollection(&productInvalidGainsSwitch);
00313    
00314   // create the collection for invalid chids
00315   std::auto_ptr< EBDetIdCollection> productInvalidChIds(new EBDetIdCollection);
00316   theUnpacker_->setInvalidChIdsCollection(&productInvalidChIds);
00317   
00319     
00320   // create the collection for invalid gains
00321   std::auto_ptr<EEDetIdCollection> productInvalidEEGains(new EEDetIdCollection);
00322   theUnpacker_->setInvalidEEGainsCollection(&productInvalidEEGains); 
00323     
00324   // create the collection for invalid gain Switch
00325   std::auto_ptr<EEDetIdCollection> productInvalidEEGainsSwitch(new EEDetIdCollection);
00326   theUnpacker_->setInvalidEEGainsSwitchCollection(&productInvalidEEGainsSwitch);
00327     
00328   // create the collection for invalid chids
00329   std::auto_ptr<EEDetIdCollection> productInvalidEEChIds(new EEDetIdCollection);
00330   theUnpacker_->setInvalidEEChIdsCollection(&productInvalidEEChIds);
00331 
00333 
00334   // create the collection for EB srflags       
00335   std::auto_ptr<EBSrFlagCollection> productEBSrFlags(new EBSrFlagCollection);
00336   theUnpacker_->setEBSrFlagsCollection(&productEBSrFlags);
00337   
00338   // create the collection for EB srflags       
00339   std::auto_ptr<EESrFlagCollection> productEESrFlags(new EESrFlagCollection);
00340   theUnpacker_->setEESrFlagsCollection(&productEESrFlags);
00341 
00342   // create the collection for ecal trigger primitives
00343   std::auto_ptr<EcalTrigPrimDigiCollection> productEcalTps(new EcalTrigPrimDigiCollection);
00344   theUnpacker_->setEcalTpsCollection(&productEcalTps);
00346 
00347   // create the collection for ecal trigger primitives
00348   std::auto_ptr<EcalPSInputDigiCollection> productEcalPSs(new EcalPSInputDigiCollection);
00349   theUnpacker_->setEcalPSsCollection(&productEcalPSs);
00351 
00352   // create the collection for invalid TTIds
00353   std::auto_ptr<EcalElectronicsIdCollection> productInvalidTTIds(new EcalElectronicsIdCollection);
00354   theUnpacker_->setInvalidTTIdsCollection(&productInvalidTTIds);
00355  
00356    // create the collection for invalid TTIds
00357   std::auto_ptr<EcalElectronicsIdCollection> productInvalidZSXtalIds(new EcalElectronicsIdCollection);
00358   theUnpacker_->setInvalidZSXtalIdsCollection(&productInvalidZSXtalIds);
00359 
00360 
00361  
00362   // create the collection for invalid BlockLengths
00363   std::auto_ptr<EcalElectronicsIdCollection> productInvalidBlockLengths(new EcalElectronicsIdCollection);
00364   theUnpacker_->setInvalidBlockLengthsCollection(&productInvalidBlockLengths);
00365 
00366   // MEMs Collections
00367   // create the collection for the Pn Diode Digis
00368   std::auto_ptr<EcalPnDiodeDigiCollection> productPnDiodeDigis(new EcalPnDiodeDigiCollection);
00369   theUnpacker_->setPnDiodeDigisCollection(&productPnDiodeDigis);
00370 
00371   // create the collection for invalid Mem Tt id 
00372   std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemTtIds(new EcalElectronicsIdCollection);
00373   theUnpacker_->setInvalidMemTtIdsCollection(& productInvalidMemTtIds);
00374   
00375   // create the collection for invalid Mem Block Size 
00376   std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemBlockSizes(new EcalElectronicsIdCollection);
00377   theUnpacker_->setInvalidMemBlockSizesCollection(& productInvalidMemBlockSizes);
00378   
00379   // create the collection for invalid Mem Block Size 
00380   std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemChIds(new EcalElectronicsIdCollection);
00381   theUnpacker_->setInvalidMemChIdsCollection(& productInvalidMemChIds);
00382  
00383   // create the collection for invalid Mem Gain Errors 
00384   std::auto_ptr<EcalElectronicsIdCollection> productInvalidMemGains(new EcalElectronicsIdCollection);
00385   theUnpacker_->setInvalidMemGainsCollection(& productInvalidMemGains); 
00386   //  double TIME_START = clock(); 
00387   
00388 
00389   // Step C: unpack all requested FEDs    
00390   for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++) {
00391 
00392     if (REGIONAL_) {
00393       std::vector<int>::const_iterator fed_it = find(FEDS_to_unpack.begin(), FEDS_to_unpack.end(), *i);
00394       if (fed_it == FEDS_to_unpack.end()) continue;
00395     }
00396 
00397   
00398     // get fed raw data and SM id
00399     const FEDRawData& fedData = rawdata->FEDData(*i);
00400     const size_t length = fedData.size();
00401 
00402     LogDebug("EcalRawToDigi") << "raw data length: " << length ;
00403     //if data size is not null interpret data
00404     if ( length >= EMPTYEVENTSIZE ){
00405       
00406       if(myMap_->setActiveDCC(*i)){
00407 
00408         const int smId = myMap_->getActiveSM();
00409         LogDebug("EcalRawToDigi") << "Getting FED = " << *i <<"(SM = "<<smId<<")"<<" data size is: " << length;
00410 
00411         const uint64_t* data = (uint64_t*) fedData.data();
00412         theUnpacker_->unpack(data, length, smId, *i);
00413 
00414         LogDebug("EcalRawToDigi") <<" in EE :"<<productDigisEE->size()
00415                                   <<" in EB :"<<productDigisEB->size();
00416       }
00417     }
00418     
00419   }// loop on FEDs
00420   
00421   //if(nevts_>1){   //NUNO
00422   //  double TIME_END = clock(); //NUNO
00423   //  RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
00424   // }
00425   
00426   
00427   // Add collections to the event 
00428   
00429   if(put_){
00430     
00431     if( headerUnpacking_){ 
00432       e.put(productDccHeaders); 
00433     }
00434     
00435     if(feUnpacking_){
00436       productDigisEB->sort();
00437       e.put(productDigisEB,"ebDigis");
00438       productDigisEE->sort();
00439       e.put(productDigisEE,"eeDigis");
00440       e.put(productInvalidGains,"EcalIntegrityGainErrors");
00441       e.put(productInvalidGainsSwitch, "EcalIntegrityGainSwitchErrors");
00442       e.put(productInvalidChIds, "EcalIntegrityChIdErrors");
00443       // EE (leaving for now the same names as in EB)
00444       e.put(productInvalidEEGains,"EcalIntegrityGainErrors");
00445       e.put(productInvalidEEGainsSwitch, "EcalIntegrityGainSwitchErrors");
00446       e.put(productInvalidEEChIds, "EcalIntegrityChIdErrors");
00447       // EE
00448       e.put(productInvalidTTIds,"EcalIntegrityTTIdErrors");
00449       e.put(productInvalidZSXtalIds,"EcalIntegrityZSXtalIdErrors");
00450       e.put(productInvalidBlockLengths,"EcalIntegrityBlockSizeErrors");
00451       e.put(productPnDiodeDigis);
00452     }
00453     if(memUnpacking_){
00454       e.put(productInvalidMemTtIds,"EcalIntegrityMemTtIdErrors");
00455       e.put(productInvalidMemBlockSizes,"EcalIntegrityMemBlockSizeErrors");
00456       e.put(productInvalidMemChIds,"EcalIntegrityMemChIdErrors");
00457       e.put(productInvalidMemGains,"EcalIntegrityMemGainErrors");
00458     }
00459     if(srpUnpacking_){
00460       e.put(productEBSrFlags);
00461       e.put(productEESrFlags);
00462     }
00463     if(tccUnpacking_){
00464       e.put(productEcalTps,"EcalTriggerPrimitives");
00465       e.put(productEcalPSs,"EcalPseudoStripInputs");
00466     }
00467   }
00468   
00469 //if(nevts_>1){   //NUNO
00470 //  double TIME_END = clock(); //NUNO 
00471 //  RUNNING_TIME_ += TIME_END-TIME_START; //NUNO
00472 //}
00473   
00474 }
00475 
00476 EcalRawToDigi::~EcalRawToDigi()
00477 {
00478   
00479   //cout << "EcalDCCUnpackingModule  " << "N events        " << (nevts_-1)<<endl;
00480   //cout << "EcalDCCUnpackingModule  " << " --- SETUP time " << endl;
00481   //cout << "EcalDCCUnpackingModule  " << "Time (sys)      " << SETUP_TIME_ << endl;
00482   //cout << "EcalDCCUnpackingModule  " << "Time in sec.    " << SETUP_TIME_/ CLOCKS_PER_SEC  << endl;
00483   //cout << "EcalDCCUnpackingModule  " << " --- Per event  " << endl;
00484   
00485   //RUNNING_TIME_ = RUNNING_TIME_ / (nevts_-1);
00486   
00487   //cout << "EcalDCCUnpackingModule  "<< "Time (sys)      " << RUNNING_TIME_  << endl;
00488   //cout << "EcalDCCUnpackingModule  "<< "Time in sec.    " << RUNNING_TIME_ / CLOCKS_PER_SEC  << endl;
00489   
00490   
00491   
00492   if(myMap_      ) delete myMap_;
00493   if(theUnpacker_) delete theUnpacker_;
00494   
00495 }