|
//_________________________________________________________________ // // BrSiDig // // Elementary objects for digitized Mult Si information. The are // derived from BrDataObject in order to be attached directly to a // BrEventNode. // // The index into the internal array of ADC and temperature values // are the one defined by the DAQ event builder - see also // BrRawDataInput. // // There can be a total of 288 channels from the silicon array. // // 6 rows * 6 wafers/row * 8 channels/wafer // // The 8 channels per wafer are composed of 7 strip channels and 1 // temperature readout channel // // Example of reading back the digits: // // // Calibration // BrSiTmpCalibration* calibration = // BrSiTmpCalibration::Instance(); // // // Detector parameters // TString tableName(BrDetectorList::GetDetectorName(kBrSi)); // BrParameterDbManager* paramManager = // parameters = (BrSiParameters*)BrParameterDbManager::Instance() // ->GetDetectorParameters("BrSiParameters", tableName.Data()); // // // Raw data // tableName.Prepend("Dig"); // BrSiDig* siDig = (BrSiDig*)inNode->GetObject(tableName.Data()); // // nSi = parameters->GetNoModules(); // for (Int_t i = 0; i < nSi; i++) { // Int_t ringNo = calibration->GetRingMap(i); // Int_t rowNo = calibration->GetRowMap(i); // Short_t adc = siDig->GetAdc(i + 1); // // // Do what ever. // } // //_________________________________________________________________ // $Id: BrSiDig.cxx,v 1.3 2001/06/28 16:42:44 cholm Exp $ // $Author: cholm $ // $Date: 2001/06/28 16:42:44 $ // $Copyright: 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov> // #include "BrSiDig.h" #include <iostream.h> #include <iomanip.h> //_________________________________________________________________ ClassImp(BrSiDig); //_________________________________________________________________ BrSiDig::BrSiDig() { // Default CTOR. Do not use. Clear(); } //_________________________________________________________________ BrSiDig::BrSiDig(const Char_t* name, const Char_t* title) : BrDataObject(name, title) { // Named CTOR. Clear(); } //_______________________________________________________________ Short_t BrSiDig::GetAdc(const Int_t itube) const { // Get ADC value. itube is channel number in range [1,fNumSiChan] if(itube > 0 && itube <= fNumSiChan) return fAdc[itube-1]; else return 0; } //_______________________________________________________________ void BrSiDig::SetAdc(const Int_t itube,const Short_t val) { //Set ADC value. itube is channel number in range [1,fNumSiChan] if(itube > 0 && itube<= fNumSiChan) fAdc[itube-1] = val; } //_______________________________________________________________ void BrSiDig::Clear(Option_t* option) { //Set all values to 0 fNumSiChan = BR_SI_CHAN_MAX; for(Short_t i = 0; i < fNumSiChan; i++) fAdc[i] = 0; } //_______________________________________________________________ void BrSiDig::Print(Option_t* option) const { // Print information on this object. // Options: // D Give detailed class information as well // R Recursively list internal data (Default) cout << "SMA Digits:" << endl; TString opt(option); opt.ToLower(); BrDataObject::Print(option); if (opt.Contains("d")) cout << endl << " Original author: Hiro Ito" << endl << " Last Modifications: " << endl << " $Author: cholm $" << endl << " $Date: 2001/06/28 16:42:44 $" << endl << " $Revision: 1.3 $ " << endl << endl << "-------------------------------------------------" << endl; if (opt.Contains("r")) for (Short_t i = 0; i < fNumSiChan; i++) cout << " ID # " << setw(4) << i << " ADC: " << setw(8) << fAdc[i] << endl; } // $Log: BrSiDig.cxx,v $ // Revision 1.3 2001/06/28 16:42:44 cholm // Added initialisation and fleshed out a couple of methods. Also added // Clear method to clear the internal array easily. // // Revision 1.2 2001/06/25 14:26:47 cholm // Made Print conform to TObject // // Revision 1.1.1.1 2001/06/21 14:55:01 hagel // Initial revision of brat2 // // Revision 1.2 2001/05/31 01:46:30 cholm // Second rewamp of this directory. All RDO modules use the common // BrMultRdoModule, and they both write BrMultRdo Objects. Also introduced // ABC for Br[Tile|Si][Parameters|Calibration] since they have a lot in common, // and the code can be made more efficient this way. // // A possible further thing to do, is to make an ABC for the CentModules, and // the corresponding calibration modules, since they are very VERY similar. // However, the current module BrMultCentModule is in the way. Need to talk // to Steve about that. // // Revision 1.1 2001/01/29 20:46:30 cholm // Added the two classes BrSiDig and BrTileDig, which are basically a renaming // of the classes BrDigSi and BrDigTiles, however, the new ones fit in with // the intented naming scheme. The two old classes are kept for backward // compatiblity , but can be faced out soon. // // Revision 1.2 2000/05/24 13:58:03 cholm // Added some new method. Most noticably "BrSiDig::GetNumberOfChannels()", // and "BrDigMultSi::GetName()". Hito has maked "BrDigMultSi" as obsolete, // should probably be put in the Attic. // Also. "BrDitigitizeMultSi" now uses "BrSiDig", similar to what // "BrDigitizeMultTile" does. // Put a body into "BrSiDig::List()". // // Revision 1.1 2000/05/20 18:18:27 hito // I (Hiro) added the Silicon strip detector. // // Revision 1.1 2000/02/16 22:22:21 brahmlib // New Raw Digitzed data class - replaces BrDigMultSi. // // |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|