CMS 3D CMS Logo

Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends

SiStripRawProcessingAlgorithms Class Reference

#include <SiStripRawProcessingAlgorithms.h>

List of all members.

Public Member Functions

std::vector< bool > & GetAPVFlags ()
const std::vector< std::pair
< short, float > > & 
getAPVsCM ()
std::map< uint16_t,
std::vector< int16_t > > & 
GetBaselineMap ()
std::map< uint16_t, std::map
< uint16_t, int16_t > > & 
GetSmoothedPoints ()
void initialize (const edm::EventSetup &, const edm::Event &)
void initialize (const edm::EventSetup &)
int16_t SuppressProcessedRawData (const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
int16_t SuppressProcessedRawData (const edm::DetSet< SiStripRawDigi > &, edm::DetSet< SiStripDigi > &)
int16_t SuppressVirginRawData (const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
int16_t SuppressVirginRawData (const edm::DetSet< SiStripRawDigi > &, edm::DetSet< SiStripDigi > &)

Public Attributes

const std::auto_ptr
< SiStripAPVRestorer
restorer
const std::auto_ptr
< SiStripCommonModeNoiseSubtractor
subtractorCMN
const std::auto_ptr
< SiStripPedestalsSubtractor
subtractorPed
const std::auto_ptr
< SiStripFedZeroSuppression
suppressor

Private Member Functions

 SiStripRawProcessingAlgorithms (std::auto_ptr< SiStripPedestalsSubtractor > ped, std::auto_ptr< SiStripCommonModeNoiseSubtractor > cmn, std::auto_ptr< SiStripFedZeroSuppression > zs, std::auto_ptr< SiStripAPVRestorer > res, bool doAPVRest, bool useCMMap)

Private Attributes

const bool doAPVRestore
const bool useCMMeanMap

Friends

class SiStripRawProcessingFactory

Detailed Description

Definition at line 12 of file SiStripRawProcessingAlgorithms.h.


Constructor & Destructor Documentation

SiStripRawProcessingAlgorithms::SiStripRawProcessingAlgorithms ( std::auto_ptr< SiStripPedestalsSubtractor ped,
std::auto_ptr< SiStripCommonModeNoiseSubtractor cmn,
std::auto_ptr< SiStripFedZeroSuppression zs,
std::auto_ptr< SiStripAPVRestorer res,
bool  doAPVRest,
bool  useCMMap 
) [private]

Definition at line 14 of file SiStripRawProcessingAlgorithms.cc.

    :  subtractorPed(ped),
       subtractorCMN(cmn),
       suppressor(zs),
       restorer(res),
       doAPVRestore(doAPVRest),
       useCMMeanMap(useCMMap)
    {}

Member Function Documentation

std::vector<bool>& SiStripRawProcessingAlgorithms::GetAPVFlags ( ) [inline]

Definition at line 24 of file SiStripRawProcessingAlgorithms.h.

References restorer.

{return restorer->GetAPVFlags();}
const std::vector< std::pair<short,float> >& SiStripRawProcessingAlgorithms::getAPVsCM ( ) [inline]

Definition at line 27 of file SiStripRawProcessingAlgorithms.h.

References subtractorCMN.

{return subtractorCMN->getAPVsCM();}
std::map<uint16_t, std::vector < int16_t> >& SiStripRawProcessingAlgorithms::GetBaselineMap ( ) [inline]

Definition at line 25 of file SiStripRawProcessingAlgorithms.h.

References restorer.

{return restorer->GetBaselineMap();}
std::map< uint16_t, std::map< uint16_t, int16_t> >& SiStripRawProcessingAlgorithms::GetSmoothedPoints ( ) [inline]

Definition at line 26 of file SiStripRawProcessingAlgorithms.h.

References restorer.

{return restorer->GetSmoothedPoints();}
void SiStripRawProcessingAlgorithms::initialize ( const edm::EventSetup es,
const edm::Event e 
)

Definition at line 36 of file SiStripRawProcessingAlgorithms.cc.

References doAPVRestore, initialize(), restorer, and useCMMeanMap.

                                                                                         {
  this->initialize(es);
  if(restorer.get()&&doAPVRestore&&useCMMeanMap) restorer->LoadMeanCMMap(e);
  
}
void SiStripRawProcessingAlgorithms::initialize ( const edm::EventSetup es)

Definition at line 29 of file SiStripRawProcessingAlgorithms.cc.

References restorer, subtractorCMN, subtractorPed, and suppressor.

Referenced by initialize().

                                                                       {
    subtractorPed->init(es);
    subtractorCMN->init(es);
    suppressor->init(es);
    if(restorer.get()) restorer->init(es);
} 
int16_t SiStripRawProcessingAlgorithms::SuppressProcessedRawData ( const uint32_t &  id,
const uint16_t &  firstAPV,
std::vector< int16_t > &  processedRawDigis,
edm::DetSet< SiStripDigi > &  suppressedDigis 
)

Definition at line 61 of file SiStripRawProcessingAlgorithms.cc.

References doAPVRestore, restorer, subtractorCMN, and suppressor.

Referenced by sistrip::RawToClustersLazyUnpacker::fill(), SuppressProcessedRawData(), and SuppressVirginRawData().

                                                                                                                                                                                              {
      std::vector<int16_t>  processedRawDigisPedSubtracted ;
      
      int16_t nAPVFlagged =0;
      if( doAPVRestore ) processedRawDigisPedSubtracted.assign(processedRawDigis.begin(), processedRawDigis.end());
      subtractorCMN->subtract(id, firstAPV,  processedRawDigis);
      if( doAPVRestore ) nAPVFlagged = restorer->InspectAndRestore(id, firstAPV, processedRawDigisPedSubtracted, processedRawDigis, subtractorCMN->getAPVsCM() );
      suppressor->suppress( processedRawDigis, firstAPV,  suppressedDigis ); 
      return nAPVFlagged;
}
int16_t SiStripRawProcessingAlgorithms::SuppressProcessedRawData ( const edm::DetSet< SiStripRawDigi > &  rawDigis,
edm::DetSet< SiStripDigi > &  suppressedDigis 
)

Definition at line 73 of file SiStripRawProcessingAlgorithms.cc.

References edm::DetSet< T >::begin(), edm::DetSet< T >::end(), edm::DetSet< T >::id, and SuppressProcessedRawData().

                                                                                                                                                  {
   std::vector<int16_t> RawDigis;
   RawDigis.clear();
   edm::DetSet<SiStripRawDigi>::const_iterator itrawDigis = rawDigis.begin();
   for(; itrawDigis != rawDigis.end(); ++itrawDigis) RawDigis.push_back(itrawDigis->adc());
    return this->SuppressProcessedRawData(rawDigis.id, 0, RawDigis , suppressedDigis );
}
int16_t SiStripRawProcessingAlgorithms::SuppressVirginRawData ( const uint32_t &  id,
const uint16_t &  firstAPV,
std::vector< int16_t > &  processedRawDigis,
edm::DetSet< SiStripDigi > &  suppressedDigis 
)

Definition at line 42 of file SiStripRawProcessingAlgorithms.cc.

References subtractorPed, and SuppressProcessedRawData().

Referenced by sistrip::RawToClustersLazyUnpacker::fill(), and SuppressVirginRawData().

                                                                                                                                                                                           {
      
      subtractorPed->subtract( id, firstAPV*128,processedRawDigis);
      return this->SuppressProcessedRawData(id, firstAPV, processedRawDigis , suppressedDigis );
 
}
int16_t SiStripRawProcessingAlgorithms::SuppressVirginRawData ( const edm::DetSet< SiStripRawDigi > &  rawDigis,
edm::DetSet< SiStripDigi > &  suppressedDigis 
)

Definition at line 49 of file SiStripRawProcessingAlgorithms.cc.

References edm::DetSet< T >::begin(), edm::DetSet< T >::end(), edm::DetSet< T >::id, and SuppressVirginRawData().

                                                                                                                                               {
   
   std::vector<int16_t> RawDigis;
   RawDigis.clear();
   edm::DetSet<SiStripRawDigi>::const_iterator itrawDigis = rawDigis.begin();
   for(; itrawDigis != rawDigis.end(); ++itrawDigis) RawDigis.push_back(itrawDigis->adc());
   return this->SuppressVirginRawData(rawDigis.id, 0,RawDigis , suppressedDigis);
}

Friends And Related Function Documentation

friend class SiStripRawProcessingFactory [friend]

Definition at line 13 of file SiStripRawProcessingAlgorithms.h.


Member Data Documentation

Definition at line 35 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize(), and SuppressProcessedRawData().

Definition at line 29 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize(), and SuppressVirginRawData().

Definition at line 31 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize(), and SuppressProcessedRawData().

Definition at line 36 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize().