emcPedestalFEM Class Reference
[Tower calibration]

#include <emcPedestalFEM.h>

Inherits emcCalFEM.

Inheritance diagram for emcPedestalFEM:

Inheritance graph
[legend]
List of all members.

Detailed Description

Stores pedestal values for one FEM.

This class has 2 versions :

Definition at line 22 of file emcPedestalFEM.h.

Public Types

typedef std::vector< int > AmuVector
typedef std::vector< AmuVectorChannelVector
typedef std::map< std::string,
ChannelVector * > 
PedMap
typedef std::map< std::string,
std::vector< int > > 
PedAverageMap
typedef std::map< std::string,
std::vector< float > > 
PedRMSMap

Public Member Functions

 emcPedestalFEM (int absPosition, int version=0)
 ctor
 emcPedestalFEM (int absPosition, const PHTimeStamp &t1, const PHTimeStamp &t2, int version=0)
 ctor
 emcPedestalFEM (const emcPedestalFEM &o)
 copy ctor
emcPedestalFEMoperator= (const emcPedestalFEM &)
 assignment operator.
virtual ~emcPedestalFEM ()
 dtor
virtual emcPedestalFEMclone (void) const
virtual emcPedestalFEMcreate (void) const
void AppendOneChannel (const char *ped_type, AmuVector &vec)
 Append one-kind-pedestal values for one channel.
void GetListOfValidTypes (std::vector< std::string > &list)
 Get list of valid types.
virtual size_t GetNumberOfChannels (void) const
 Get number of channels handled by this object.
virtual const char * GetCategory (void) const
 Category of this emcManageable = "Pedestals".
virtual float getValue (int ichannel, int amucell, const std::string &kind) const
 same as above with const char* -> string (avoid temporary object).
virtual float getValueFast (int ch_index, int amu_number, const std::string &ped_type) const
 Same as above, but with char* -> string.
virtual float getValue (int ich, const std::string &kind, float &out) const
 same as above without cell-dependence
virtual float getValueFast (int ich, const std::string &kind, float &out) const
 same as above without cell-dependence
void GetValues (int ch_index, int amu_number, int &low, int &high, int &tac)
 Unchecked get of all ped. values (see implementation for warning).
virtual bool IsEqual (const emcCalFEM &) const
 comparison.
bool IsValidType (const std::string &ped_type) const
 Is ped_type a valid pedestal type ?
virtual void Reset (void)
 Reset (delete internal storage).
virtual std::ostream & Print (std::ostream &out=std::cout, int level=0) const
 Print.

Static Public Member Functions

static emcPedestalFEMDefault (const int &absPosition, const PHTimeStamp &t1, const PHTimeStamp &t2, int version=0)
 Create an object with 144 channels and default values (0).
static std::vector< std::string > ValidTypes (int version)
 Get names of valid types for a given version.

Private Member Functions

void Copy (emcPedestalFEM &) const

Private Attributes

std::vector< std::string > fValidTypes
PedMap fPed
PedAverageMap fPedAverage
PedRMSMap fPedRMS


Member Typedef Documentation

typedef std::vector<int> emcPedestalFEM::AmuVector
 

Definition at line 62 of file emcPedestalFEM.h.

typedef std::vector<AmuVector> emcPedestalFEM::ChannelVector
 

Definition at line 63 of file emcPedestalFEM.h.

typedef std::map<std::string, std::vector<int> > emcPedestalFEM::PedAverageMap
 

Definition at line 65 of file emcPedestalFEM.h.

typedef std::map<std::string, ChannelVector*> emcPedestalFEM::PedMap
 

Definition at line 64 of file emcPedestalFEM.h.

typedef std::map<std::string, std::vector<float> > emcPedestalFEM::PedRMSMap
 

Definition at line 66 of file emcPedestalFEM.h.


Constructor & Destructor Documentation

emcPedestalFEM::emcPedestalFEM int  absPosition,
int  version = 0
[explicit]
 

ctor

Definition at line 86 of file emcPedestalFEM.C.

References classname, fValidTypes, name, emcNamed::NameIt(), emcCalFEM::SetVersion(), title, Title(), and ValidTypes().

Referenced by clone(), create(), and Default().

emcPedestalFEM::emcPedestalFEM int  absPosition,
const PHTimeStamp &  t1,
const PHTimeStamp &  t2,
int  version = 0
 

ctor

Definition at line 75 of file emcPedestalFEM.C.

References classname, fValidTypes, name, emcNamed::NameIt(), emcCalFEM::SetVersion(), title, Title(), and ValidTypes().

emcPedestalFEM::emcPedestalFEM const emcPedestalFEM o  ) 
 

copy ctor

Definition at line 96 of file emcPedestalFEM.C.

References Copy().

emcPedestalFEM::~emcPedestalFEM  )  [virtual]
 

dtor

Definition at line 135 of file emcPedestalFEM.C.

References Reset().


Member Function Documentation

void emcPedestalFEM::AppendOneChannel const char *  ped_type,
AmuVector vec
 

Append one-kind-pedestal values for one channel.

Definition at line 141 of file emcPedestalFEM.C.

References fPed, and IsValidType().

Referenced by Default().

virtual emcPedestalFEM* emcPedestalFEM::clone void   )  const [inline, virtual]
 

Implements emcCalFEM.

Definition at line 45 of file emcPedestalFEM.h.

References emcPedestalFEM().

void emcPedestalFEM::Copy emcPedestalFEM  )  const [private]
 

Definition at line 114 of file emcPedestalFEM.C.

References emcCalFEM::Copy(), fPed, fValidTypes, j, Reset(), emcCalFEM::SetVersion(), ValidTypes(), and emcCalFEM::Version().

Referenced by emcPedestalFEM(), and operator=().

virtual emcPedestalFEM* emcPedestalFEM::create void   )  const [inline, virtual]
 

Implements emcCalFEM.

Definition at line 51 of file emcPedestalFEM.h.

References emcCalFEM::AbsolutePosition(), emcPedestalFEM(), emcCalFEM::GetEndValTime(), emcCalFEM::GetStartValTime(), and emcCalFEM::Version().

emcPedestalFEM * emcPedestalFEM::Default const int &  absPosition,
const PHTimeStamp &  t1,
const PHTimeStamp &  t2,
int  version = 0
[static]
 

Create an object with 144 channels and default values (0).

The returned pointer is yours.

Definition at line 209 of file emcPedestalFEM.C.

References AppendOneChannel(), emcPedestalFEM(), ValidTypes(), and emcCalFEM::Version().

Referenced by creator3(), and creator5().

const char * emcPedestalFEM::GetCategory void   )  const [virtual]
 

Category of this emcManageable = "Pedestals".

Implements emcCalFEM.

Definition at line 233 of file emcPedestalFEM.C.

References emcCalFEM::Version().

void emcPedestalFEM::GetListOfValidTypes std::vector< std::string > &  list  )  [inline]
 

Get list of valid types.

Definition at line 79 of file emcPedestalFEM.h.

References fValidTypes.

Referenced by reader().

size_t emcPedestalFEM::GetNumberOfChannels void   )  const [virtual]
 

Get number of channels handled by this object.

Implements emcCalFEM.

Definition at line 243 of file emcPedestalFEM.C.

References fPed, and fValidTypes.

virtual float emcPedestalFEM::getValue int  ich,
const std::string &  kind,
float &  out
const [virtual]
 

same as above without cell-dependence

Reimplemented from emcCalFEM.

virtual float emcPedestalFEM::getValue int  ichannel,
int  amucell,
const std::string &  kind
const [virtual]
 

same as above with const char* -> string (avoid temporary object).

Reimplemented from emcCalFEM.

Referenced by IsEqual(), emcOMPedestalFEMT< T >::ToPdbCalBank(), and emcOMPedestal5FEMT< T >::ToPdbCalBank().

virtual float emcPedestalFEM::getValueFast int  ich,
const std::string &  kind,
float &  out
const [virtual]
 

same as above without cell-dependence

Reimplemented from emcCalFEM.

virtual float emcPedestalFEM::getValueFast int  ch_index,
int  amu_number,
const std::string &  ped_type
const [virtual]
 

Same as above, but with char* -> string.

Reimplemented from emcCalFEM.

void emcPedestalFEM::GetValues int  ch_index,
int  amu_number,
int &  low,
int &  high,
int &  tac
 

Unchecked get of all ped. values (see implementation for warning).

Definition at line 357 of file emcPedestalFEM.C.

References fPed.

bool emcPedestalFEM::IsEqual const emcCalFEM  )  const [virtual]
 

comparison.

Implements emcCalFEM.

Definition at line 370 of file emcPedestalFEM.C.

References fValidTypes, getValue(), emcCalFEM::size(), ValidTypes(), and emcCalFEM::Version().

bool emcPedestalFEM::IsValidType const std::string &  ped_type  )  const
 

Is ped_type a valid pedestal type ?

Referenced by AppendOneChannel().

emcPedestalFEM & emcPedestalFEM::operator= const emcPedestalFEM  ) 
 

assignment operator.

Definition at line 104 of file emcPedestalFEM.C.

References Copy(), and Reset().

virtual std::ostream& emcPedestalFEM::Print std::ostream &  out = std::cout,
int  level = 0
const [virtual]
 

Print.

Reimplemented from emcCalFEM.

void emcPedestalFEM::Reset void   )  [virtual]
 

Reset (delete internal storage).

Implements emcCalFEM.

Definition at line 413 of file emcPedestalFEM.C.

References fPed, and fValidTypes.

Referenced by Copy(), operator=(), reader(), and ~emcPedestalFEM().

vector< string > emcPedestalFEM::ValidTypes int  version  )  [static]
 

Get names of valid types for a given version.

Definition at line 467 of file emcPedestalFEM.C.

Referenced by Copy(), Default(), emcPedestalFEM(), and IsEqual().


Member Data Documentation

PedMap emcPedestalFEM::fPed [mutable, private]
 

Definition at line 132 of file emcPedestalFEM.h.

Referenced by AppendOneChannel(), Copy(), GetNumberOfChannels(), GetValues(), and Reset().

PedAverageMap emcPedestalFEM::fPedAverage [mutable, private]
 

Definition at line 133 of file emcPedestalFEM.h.

PedRMSMap emcPedestalFEM::fPedRMS [mutable, private]
 

Definition at line 134 of file emcPedestalFEM.h.

std::vector<std::string> emcPedestalFEM::fValidTypes [private]
 

Definition at line 131 of file emcPedestalFEM.h.

Referenced by Copy(), emcPedestalFEM(), GetListOfValidTypes(), GetNumberOfChannels(), IsEqual(), and Reset().


The documentation for this class was generated from the following files: