test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends
SiStripRawProcessingAlgorithms Class Reference

#include <SiStripRawProcessingAlgorithms.h>

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 &)
 
void initialize (const edm::EventSetup &, const edm::Event &)
 
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.

20  : subtractorPed(ped),
21  subtractorCMN(cmn),
22  suppressor(zs),
23  restorer(res),
24  doAPVRestore(doAPVRest),
25  useCMMeanMap(useCMMap)
26  {}
const std::auto_ptr< SiStripAPVRestorer > restorer
const std::auto_ptr< SiStripPedestalsSubtractor > subtractorPed
const std::auto_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
const std::auto_ptr< SiStripFedZeroSuppression > suppressor

Member Function Documentation

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

Definition at line 24 of file SiStripRawProcessingAlgorithms.h.

References restorer.

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

Definition at line 27 of file SiStripRawProcessingAlgorithms.h.

References subtractorCMN.

27 {return subtractorCMN->getAPVsCM();}
const std::auto_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
std::map<uint16_t, std::vector < int16_t> >& SiStripRawProcessingAlgorithms::GetBaselineMap ( )
inline

Definition at line 25 of file SiStripRawProcessingAlgorithms.h.

References restorer.

25 {return restorer->GetBaselineMap();}
const std::auto_ptr< SiStripAPVRestorer > restorer
std::map< uint16_t, std::map< uint16_t, int16_t> >& SiStripRawProcessingAlgorithms::GetSmoothedPoints ( )
inline

Definition at line 26 of file SiStripRawProcessingAlgorithms.h.

References restorer.

26 {return restorer->GetSmoothedPoints();}
const std::auto_ptr< SiStripAPVRestorer > restorer
void SiStripRawProcessingAlgorithms::initialize ( const edm::EventSetup es)

Definition at line 29 of file SiStripRawProcessingAlgorithms.cc.

References restorer, subtractorCMN, subtractorPed, and suppressor.

Referenced by initialize().

29  {
30  subtractorPed->init(es);
31  subtractorCMN->init(es);
32  suppressor->init(es);
33  if(restorer.get()) restorer->init(es);
34 }
const std::auto_ptr< SiStripAPVRestorer > restorer
const std::auto_ptr< SiStripPedestalsSubtractor > subtractorPed
const std::auto_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
const std::auto_ptr< SiStripFedZeroSuppression > suppressor
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.

36  {
37  this->initialize(es);
38  if(restorer.get()&&doAPVRestore&&useCMMeanMap) restorer->LoadMeanCMMap(e);
39 
40 }
const std::auto_ptr< SiStripAPVRestorer > restorer
void initialize(const edm::EventSetup &)
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 SuppressProcessedRawData(), and SuppressVirginRawData().

61  {
62  std::vector<int16_t> processedRawDigisPedSubtracted ;
63 
64  int16_t nAPVFlagged =0;
65  if( doAPVRestore ) processedRawDigisPedSubtracted.assign(processedRawDigis.begin(), processedRawDigis.end());
66  subtractorCMN->subtract(id, firstAPV, processedRawDigis);
67  if( doAPVRestore ) nAPVFlagged = restorer->InspectAndRestore(id, firstAPV, processedRawDigisPedSubtracted, processedRawDigis, subtractorCMN->getAPVsCM() );
68  suppressor->suppress( processedRawDigis, firstAPV, suppressedDigis );
69  return nAPVFlagged;
70 }
const std::auto_ptr< SiStripAPVRestorer > restorer
const std::auto_ptr< SiStripCommonModeNoiseSubtractor > subtractorCMN
const std::auto_ptr< SiStripFedZeroSuppression > suppressor
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().

73  {
74  std::vector<int16_t> RawDigis;
75  RawDigis.clear();
76  edm::DetSet<SiStripRawDigi>::const_iterator itrawDigis = rawDigis.begin();
77  for(; itrawDigis != rawDigis.end(); ++itrawDigis) RawDigis.push_back(itrawDigis->adc());
78  return this->SuppressProcessedRawData(rawDigis.id, 0, RawDigis , suppressedDigis );
79 }
iterator end()
Definition: DetSet.h:60
iterator begin()
Definition: DetSet.h:59
int16_t SuppressProcessedRawData(const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
det_id_type id
Definition: DetSet.h:77
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
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 SuppressVirginRawData().

42  {
43 
44  subtractorPed->subtract( id, firstAPV*128,processedRawDigis);
45  return this->SuppressProcessedRawData(id, firstAPV, processedRawDigis , suppressedDigis );
46 
47 }
const std::auto_ptr< SiStripPedestalsSubtractor > subtractorPed
int16_t SuppressProcessedRawData(const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
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().

49  {
50 
51  std::vector<int16_t> RawDigis;
52  RawDigis.clear();
53  edm::DetSet<SiStripRawDigi>::const_iterator itrawDigis = rawDigis.begin();
54  for(; itrawDigis != rawDigis.end(); ++itrawDigis) RawDigis.push_back(itrawDigis->adc());
55  return this->SuppressVirginRawData(rawDigis.id, 0,RawDigis , suppressedDigis);
56 }
iterator end()
Definition: DetSet.h:60
int16_t SuppressVirginRawData(const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
iterator begin()
Definition: DetSet.h:59
det_id_type id
Definition: DetSet.h:77
collection_type::const_iterator const_iterator
Definition: DetSet.h:33

Friends And Related Function Documentation

friend class SiStripRawProcessingFactory
friend

Definition at line 13 of file SiStripRawProcessingAlgorithms.h.

Member Data Documentation

const bool SiStripRawProcessingAlgorithms::doAPVRestore
private

Definition at line 35 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize(), and SuppressProcessedRawData().

const std::auto_ptr<SiStripAPVRestorer> SiStripRawProcessingAlgorithms::restorer
const std::auto_ptr<SiStripCommonModeNoiseSubtractor> SiStripRawProcessingAlgorithms::subtractorCMN
const std::auto_ptr<SiStripPedestalsSubtractor> SiStripRawProcessingAlgorithms::subtractorPed

Definition at line 29 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize(), and SuppressVirginRawData().

const std::auto_ptr<SiStripFedZeroSuppression> SiStripRawProcessingAlgorithms::suppressor

Definition at line 31 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize(), and SuppressProcessedRawData().

const bool SiStripRawProcessingAlgorithms::useCMMeanMap
private

Definition at line 36 of file SiStripRawProcessingAlgorithms.h.

Referenced by initialize().