CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/CaloOnlineTools/EcalTools/plugins/EcalDCCHeaderDisplay.cc

Go to the documentation of this file.
00001 
00010 #include "CaloOnlineTools/EcalTools/plugins/EcalDCCHeaderDisplay.h"
00011 
00012 EcalDCCHeaderDisplay::EcalDCCHeaderDisplay(const edm::ParameterSet& iConfig){
00013   EcalDCCHeaderCollection_ = iConfig.getParameter<edm::InputTag>("EcalDCCHeaderCollection");
00014 }
00015 
00016 
00017 void EcalDCCHeaderDisplay::analyze( const edm::Event & e, const  edm::EventSetup& c){
00018     
00019   edm::Handle<EcalRawDataCollection> DCCHeaders;
00020   e.getByLabel(EcalDCCHeaderCollection_, DCCHeaders);
00021     
00022 
00023   std::cout << "\n\n ^^^^^^^^^^^^^^^^^^ [EcalDCCHeaderDisplay]  DCCHeaders collection size " << DCCHeaders->size() << std::endl;
00024   std::cout << "          [EcalDCCHeaderDisplay]  the Header(s)\n"  << std::endl;
00025   //short dumpConter =0;      
00026 
00027   for ( EcalRawDataCollection::const_iterator headerItr= DCCHeaders->begin();headerItr != DCCHeaders->end(); 
00028         ++headerItr ) {
00029     //      int nevt =headerItr->getLV1(); 
00030     bool skip = false;
00031 
00032     if(skip){continue;}
00033     std::cout<<"###################################################################### \n";
00034     std::cout << "FedId: "<< headerItr->fedId() <<"\n";
00035       
00036     std::cout << "DCCErrors: "<<headerItr->getDCCErrors()<<"\n";
00037     std::cout<<"Run Number: "<<headerItr->getRunNumber()<<"\n";
00038     std::cout<<"Event number (LV1): "<<headerItr->getLV1()<<"\n";
00039     std::cout<<"Orbit: "<<headerItr->getOrbit()<<"\n";
00040     std::cout<<"BX: "<<headerItr->getBX()<<"\n";
00041     std::cout<<"TRIGGER TYPE: "<< headerItr->getBasicTriggerType()<<"\n";
00042       
00043     std::cout<<"RUNTYPE: "<< headerItr->getRunType()<<"\n";
00044     std::cout<<"Half: "<<headerItr->getRtHalf()<<"\n";
00045     std::cout<<"DCCIdInTCCCommand: "<<headerItr->getDccInTCCCommand()<<"\n";
00046     std::cout<<"MGPA gain: "<<headerItr->getMgpaGain()<<"\n";
00047     std::cout<<"MEM gain: "<<headerItr->getMemGain()<<"\n";
00048     EcalDCCHeaderBlock::EcalDCCEventSettings settings = headerItr->getEventSettings();
00049     std::cout<<"LaserPower: "<<  settings.LaserPower<<"\n";
00050     std::cout <<"LAserFilter: "<<settings.LaserFilter<<"\n";
00051     std::cout<<"Wavelenght: "<<settings.wavelength<<"\n";
00052     std::cout<<"delay: "<<settings.delay<<"\n";
00053     std::cout<<"MEM Vinj: "<< settings.MEMVinj<<"\n";
00054     std::cout<<"MGPA content: "<<settings.mgpa_content<<"\n";
00055     std::cout<<"Ped offset dac: "<<settings.ped_offset<<"\n";
00056 
00057     std::cout<<"Selective Readout: "<<headerItr->getSelectiveReadout()<<"\n";
00058     std::cout<<"ZS: "<<headerItr->getZeroSuppression()<<"\n";
00059     std::cout <<"TZS: "<<headerItr->getTestZeroSuppression()<<"\n";
00060     std::cout<<"SRStatus: "<<headerItr->getSrpStatus()<<"\n";
00061 
00062     std::vector<short> TCCStatus = headerItr->getTccStatus();
00063     std::cout<<"TCC Status size: "<<TCCStatus.size()<<std::endl;
00064     std::cout<<"TCC Status: ";
00065     for(unsigned u =0;u<TCCStatus.size();u++){
00066       std::cout<<TCCStatus[u]<<" ";
00067     }
00068     std::cout<<std::endl;
00069       
00070     std::vector<short> TTStatus = headerItr->getFEStatus();
00071     std::cout<<"TT Status size: "<<TTStatus.size()<<std::endl;
00072     std::cout<<"TT Statuses: ";
00073     for(unsigned u =0;u<TTStatus.size();u++){
00074       if ( !(u%14) ) std::cout<<std::endl; // TODO: add space after first six in a row
00075       std::cout<<TTStatus[u]<<" ";
00076     }
00077     std::cout<<std::endl;
00078     std::cout<<"######################################################################"<<std::endl;;
00079 
00080   }     
00081      
00082 } 
00083 
00084 
00085