CMS 3D CMS Logo

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

#include <APVShotFinder.h>

Public Member Functions

 APVShotFinder (const bool zs=true)
 
 APVShotFinder (const edm::DetSet< SiStripDigi > &digis, const bool zs=true)
 
 APVShotFinder (const edm::DetSetVector< SiStripDigi > &digicoll, const bool zs=true)
 
void computeShots (const edm::DetSet< SiStripDigi > &digis)
 
void computeShots (const edm::DetSetVector< SiStripDigi > &digicoll)
 
const std::vector< APVShot > & getShots () const
 

Private Member Functions

void addShots (const edm::DetSet< SiStripDigi > &digis)
 

Private Attributes

std::vector< APVShot_shots
 
bool _zs
 

Detailed Description

Definition at line 15 of file APVShotFinder.h.

Constructor & Destructor Documentation

APVShotFinder::APVShotFinder ( const bool  zs = true)

Definition at line 10 of file APVShotFinder.cc.

10  :
11  _zs(zs), _shots() { }
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32
APVShotFinder::APVShotFinder ( const edm::DetSet< SiStripDigi > &  digis,
const bool  zs = true 
)

Definition at line 13 of file APVShotFinder.cc.

References computeShots().

13  :
14  _zs(zs), _shots() {
15 
16  computeShots(digis);
17 
18 }
void computeShots(const edm::DetSet< SiStripDigi > &digis)
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32
APVShotFinder::APVShotFinder ( const edm::DetSetVector< SiStripDigi > &  digicoll,
const bool  zs = true 
)

Definition at line 20 of file APVShotFinder.cc.

References computeShots().

20  :
21  _zs(zs), _shots() {
22 
23  computeShots(digicoll);
24 
25 }
void computeShots(const edm::DetSet< SiStripDigi > &digis)
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32

Member Function Documentation

void APVShotFinder::addShots ( const edm::DetSet< SiStripDigi > &  digis)
private

Definition at line 46 of file APVShotFinder.cc.

References _shots, _zs, edm::DetSet< T >::begin(), edm::DetSet< T >::detId(), edm::DetSet< T >::end(), and groupFilesInBlocks::temp.

Referenced by computeShots().

46  {
47 
48  DetId detid(digis.detId());
49 
50  int laststrip = -1;
51  int apv = -1;
52  std::vector<SiStripDigi> temp;
53 
54  for(edm::DetSet<SiStripDigi>::const_iterator digi=digis.begin();digi!=digis.end();digi++) {
55 
56  if(!_zs || digi->adc()>0) {
57  if(laststrip >= digi->strip()) edm::LogWarning("StripNotInOrder") << "Strips not in order in DetSet<SiStripDigi>";
58  laststrip = digi->strip();
59 
60  int newapv = digi->strip()/128;
61  if( newapv!=apv) {
62  if(apv>=0) {
63  if(temp.size() > 64) {
64  APVShot shot(temp,detid,_zs);
65  _shots.push_back(shot);
66  }
67  temp.clear();
68  }
69  apv = newapv;
70  }
71 
72  temp.push_back(*digi);
73  }
74  }
75  // last strip
76  if(temp.size() > 64) {
77  APVShot shot(temp,detid,_zs);
78  _shots.push_back(shot);
79  }
80  temp.clear();
81 
82 }
iterator end()
Definition: DetSet.h:60
det_id_type detId() const
Definition: DetSet.h:72
iterator begin()
Definition: DetSet.h:59
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32
Definition: DetId.h:18
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
void APVShotFinder::computeShots ( const edm::DetSet< SiStripDigi > &  digis)

Definition at line 27 of file APVShotFinder.cc.

References _shots, and addShots().

Referenced by APVShotFinder().

27  {
28 
29  _shots.clear();
30  addShots(digis);
31 
32 }
void addShots(const edm::DetSet< SiStripDigi > &digis)
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32
void APVShotFinder::computeShots ( const edm::DetSetVector< SiStripDigi > &  digicoll)

Definition at line 34 of file APVShotFinder.cc.

References _shots, addShots(), edm::DetSetVector< T >::begin(), and edm::DetSetVector< T >::end().

34  {
35 
36  _shots.clear();
37 
39  it!=digicoll.end();++it) {
40 
41  addShots(*it);
42  }
43 
44 }
void addShots(const edm::DetSet< SiStripDigi > &digis)
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:361
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:346
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104
const std::vector< APVShot > & APVShotFinder::getShots ( ) const

Definition at line 84 of file APVShotFinder.cc.

References _shots.

Referenced by SiStripMonitorDigi::analyze(), APVShotsAnalyzer::analyze(), SiStripShotFilter::filter(), and APVShotsFilter::filter().

84 { return _shots; }
std::vector< APVShot > _shots
Definition: APVShotFinder.h:32

Member Data Documentation

std::vector<APVShot> APVShotFinder::_shots
private

Definition at line 32 of file APVShotFinder.h.

Referenced by addShots(), computeShots(), and getShots().

bool APVShotFinder::_zs
private

Definition at line 31 of file APVShotFinder.h.

Referenced by addShots().