CMS 3D CMS Logo

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

#include <SiStripPedestals.h>

Classes

struct  DetRegistry
 
class  StrictWeakOrdering
 

Public Types

typedef std::vector< char > Container
 
typedef std::vector< char >
::const_iterator 
ContainerIterator
 
typedef std::vector< uint16_t > InputVector
 
typedef std::pair
< ContainerIterator,
ContainerIterator
Range
 
typedef std::vector< DetRegistryRegistry
 
typedef Registry::const_iterator RegistryIterator
 

Public Member Functions

void allPeds (std::vector< int > &pefs, const Range &range) const
 
ContainerIterator getDataVectorBegin () const
 
ContainerIterator getDataVectorEnd () const
 
void getDetIds (std::vector< uint32_t > &DetIds_) const
 
float getPed (const uint16_t &strip, const Range &range) const
 
const Range getRange (const uint32_t &detID) const
 
RegistryIterator getRegistryVectorBegin () const
 
RegistryIterator getRegistryVectorEnd () const
 
void printDebug (std::stringstream &ss) const
 Prints all pedestals. More...
 
void printSummary (std::stringstream &ss) const
 Prints mean pedestal value divided for subdet, layer and mono/stereo. More...
 
bool put (const uint32_t &detID, InputVector &input)
 
void setData (float ped, InputVector &vped)
 
 SiStripPedestals ()
 
 ~SiStripPedestals ()
 

Private Member Functions

uint16_t decode (const uint16_t &strip, const Range &range) const
 
void encode (InputVector &Vi, std::vector< unsigned char > &Vo_CHAR)
 
uint16_t get10bits (const uint8_t *&ptr, int8_t skip) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

Registry indexes
 
Container v_pedestals
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Stores the pedestal of every strip.
Encodes the information in a vector<char> and uses a vector<DetRegistry> to connect each range of values to the corresponding detId.
The DetRegistry struct contains the detId and two uint32_t giving the index of begin and end of the corresponding range in the vector<char>.
Has methods to return the pedestal of a given strip of of all the strips.

The printSummary method uses SiStripDetSummary. See description therein.
The printDebug method prints the pedestal value for every strip of every detId.

Definition at line 27 of file SiStripPedestals.h.

Member Typedef Documentation

typedef std::vector<char> SiStripPedestals::Container

Definition at line 50 of file SiStripPedestals.h.

typedef std::vector<char>::const_iterator SiStripPedestals::ContainerIterator

Definition at line 51 of file SiStripPedestals.h.

typedef std::vector<uint16_t> SiStripPedestals::InputVector

Definition at line 55 of file SiStripPedestals.h.

Definition at line 52 of file SiStripPedestals.h.

Definition at line 53 of file SiStripPedestals.h.

typedef Registry::const_iterator SiStripPedestals::RegistryIterator

Definition at line 54 of file SiStripPedestals.h.

Constructor & Destructor Documentation

SiStripPedestals::SiStripPedestals ( )
inline

Definition at line 57 of file SiStripPedestals.h.

57 {};
SiStripPedestals::~SiStripPedestals ( )
inline

Definition at line 58 of file SiStripPedestals.h.

58 {};

Member Function Documentation

void SiStripPedestals::allPeds ( std::vector< int > &  pefs,
const Range range 
) const

Definition at line 142 of file SiStripPedestals.cc.

uint16_t SiStripPedestals::decode ( const uint16_t &  strip,
const Range range 
) const
private
void SiStripPedestals::encode ( InputVector Vi,
std::vector< unsigned char > &  Vo_CHAR 
)
private

Definition at line 59 of file SiStripPedestals.cc.

uint16_t SiStripPedestals::get10bits ( const uint8_t *&  ptr,
int8_t  skip 
) const
inlineprivate

Get 9 bit words from a bit stream, starting from the right, skipping the first 'skip' bits (0 < skip < 7). Ptr must point to the rightmost byte that has some bits of this word, and is updated by this function

Definition at line 133 of file SiStripPedestals.cc.

ContainerIterator SiStripPedestals::getDataVectorBegin ( ) const
inline

Definition at line 65 of file SiStripPedestals.h.

References v_pedestals.

65 {return v_pedestals.begin();}
ContainerIterator SiStripPedestals::getDataVectorEnd ( ) const
inline

Definition at line 66 of file SiStripPedestals.h.

References v_pedestals.

66 {return v_pedestals.end();}
void SiStripPedestals::getDetIds ( std::vector< uint32_t > &  DetIds_) const

Definition at line 37 of file SiStripPedestals.cc.

float SiStripPedestals::getPed ( const uint16_t &  strip,
const Range range 
) const

Definition at line 51 of file SiStripPedestals.cc.

const SiStripPedestals::Range SiStripPedestals::getRange ( const uint32_t &  detID) const

Definition at line 27 of file SiStripPedestals.cc.

RegistryIterator SiStripPedestals::getRegistryVectorBegin ( ) const
inline

Definition at line 67 of file SiStripPedestals.h.

References indexes.

67 {return indexes.begin();}
RegistryIterator SiStripPedestals::getRegistryVectorEnd ( ) const
inline

Definition at line 68 of file SiStripPedestals.h.

References indexes.

68 {return indexes.end();}
void SiStripPedestals::printDebug ( std::stringstream &  ss) const

Prints all pedestals.

Definition at line 180 of file SiStripPedestals.cc.

void SiStripPedestals::printSummary ( std::stringstream &  ss) const

Prints mean pedestal value divided for subdet, layer and mono/stereo.

Definition at line 164 of file SiStripPedestals.cc.

bool SiStripPedestals::put ( const uint32_t &  detID,
InputVector input 
)
template<class Archive >
void SiStripPedestals::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void SiStripPedestals::setData ( float  ped,
SiStripPedestals::InputVector vped 
)

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 88 of file SiStripPedestals.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 88 of file SiStripPedestals.h.

Member Data Documentation

Registry SiStripPedestals::indexes
private

Definition at line 86 of file SiStripPedestals.h.

Referenced by getRegistryVectorBegin(), and getRegistryVectorEnd().

Container SiStripPedestals::v_pedestals
private

Definition at line 85 of file SiStripPedestals.h.

Referenced by getDataVectorBegin(), and getDataVectorEnd().