mEmcCalibratorModulev2 Class Reference
[Tower calibration]

#include <mEmcCalibratorModulev2.h>

Inherits EMCModule.

Inheritance diagram for mEmcCalibratorModulev2:

Inheritance graph
[legend]
List of all members.

Detailed Description

Calibrator module : converts packets to emcTowerContainer.

This is essentially an adapter class. The real worker is the underlying emcDataProcessor class.

Definition at line 26 of file mEmcCalibratorModulev2.h.

Public Member Functions

 mEmcCalibratorModulev2 (int runnumber, const PHTimeStamp &ts, bool constantGains=false, const emcDataStorageMap &source=emcDataStorageMap(), const char *sectors="emcal")
 
virtual ~mEmcCalibratorModulev2 ()
PHBoolean event (PHCompositeNode *)

Private Member Functions

void changeToF (emcTowerContainer &)

Private Attributes

emcDataProcessorfDataProcessor
PHTimeStamp * fTimeStamp
emcBadModulesfBadModules
bool fConstantGains
int fRunNumber
std::string fSectors
std::vector< float > fTofSectorOffsets


Constructor & Destructor Documentation

mEmcCalibratorModulev2::mEmcCalibratorModulev2 int  runnumber,
const PHTimeStamp &  ts,
bool  constantGains = false,
const emcDataStorageMap source = emcDataStorageMap(),
const char *  sectors = "emcal"
 

Parameters:
runnumber 
ts 
constantGains : whether the emcal gains are evolved during the run or not (default = false, meaning we take full advantage of the tracing of the gain evolutions)
source : data source(s) for the calibration data (default=Postgres) For expert only you can let the data sources be different for different calibration data flavours.
sectors (expert only!) : which part of emcal are to be calibrated, can be emcal, pbsc, pbgl, or any sector names combination, e.g. W0E2

Definition at line 41 of file mEmcCalibratorModulev2.C.

References emcDataStorageMap::empty(), fDataProcessor, fSectors, emcDataProcessorv2::getCalibrationDataHelper(), emcDataStorageMap::knownStorages(), EMCModule::name, and emcDataStorageMap::storage().

mEmcCalibratorModulev2::~mEmcCalibratorModulev2  )  [virtual]
 

Definition at line 94 of file mEmcCalibratorModulev2.C.

References fBadModules, fDataProcessor, and fTimeStamp.


Member Function Documentation

void mEmcCalibratorModulev2::changeToF emcTowerContainer  )  [private]
 

Definition at line 103 of file mEmcCalibratorModulev2.C.

References EmcIndexer::decodeTowerId(), fTofSectorOffsets, emcTowerContainer::getTower(), and emcTowerContainer::size().

PHBoolean mEmcCalibratorModulev2::event PHCompositeNode *   )  [virtual]
 

Implements EMCModule.

Definition at line 117 of file mEmcCalibratorModulev2.C.

References emcTowerContainer::addTower(), emcDataProcessor::calibrate(), emcDataError::CHANNEL_DISABLED(), emcTowerContainer::create(), emcDataProcessor::decode(), fBadModules, fConstantGains, fDataProcessor, fTimeStamp, getEvent(), EMCModule::name, pbgl(), pbsc(), emcTowerContainer::Reset(), and emcDataProcessor::toADCandTDC().


Member Data Documentation

emcBadModules* mEmcCalibratorModulev2::fBadModules [private]
 

Definition at line 59 of file mEmcCalibratorModulev2.h.

Referenced by event(), and ~mEmcCalibratorModulev2().

bool mEmcCalibratorModulev2::fConstantGains [private]
 

Definition at line 60 of file mEmcCalibratorModulev2.h.

Referenced by event().

emcDataProcessor* mEmcCalibratorModulev2::fDataProcessor [private]
 

Definition at line 57 of file mEmcCalibratorModulev2.h.

Referenced by event(), mEmcCalibratorModulev2(), and ~mEmcCalibratorModulev2().

int mEmcCalibratorModulev2::fRunNumber [private]
 

Definition at line 61 of file mEmcCalibratorModulev2.h.

std::string mEmcCalibratorModulev2::fSectors [private]
 

Definition at line 62 of file mEmcCalibratorModulev2.h.

Referenced by mEmcCalibratorModulev2().

PHTimeStamp* mEmcCalibratorModulev2::fTimeStamp [private]
 

Definition at line 58 of file mEmcCalibratorModulev2.h.

Referenced by event(), and ~mEmcCalibratorModulev2().

std::vector<float> mEmcCalibratorModulev2::fTofSectorOffsets [private]
 

Definition at line 63 of file mEmcCalibratorModulev2.h.

Referenced by changeToF().


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