RawChannelId Class Reference

#include <RawChannelId.h>

List of all members.

Public Member Functions

 RawChannelId ()
 RawChannelId (Detector::Detector_t detector, ElecType::Elec_t etype, UInt_t crate, UInt_t chadd)
 RawChannelId (Detector::Detector_t detector, ElecType::Elec_t etype, UInt_t crate, UInt_t geoaddr, UInt_t masterChan, UInt_t minderChan)
 RawChannelId (Detector::Detector_t detector, ElecType::Elec_t etype, UInt_t crate, UInt_t varc, UInt_t vmm, UInt_t adcsel, UInt_t vachip, UInt_t vachan)
 RawChannelId (Detector::Detector_t detector, UInt_t crateinfo, UInt_t chadd)
virtual ~RawChannelId ()
 RawChannelId (const UInt_t encoded)
UInt_t GetEncoded () const
const char * AsString (Option_t *option="") const
Detector::Detector_t GetDetector () const
ElecType::Elec_t GetElecType () const
Bool_t GetPedMode () const
Bool_t GetSparsMode () const
Bool_t GetCommonMode () const
UShort_t GetCrate () const
UShort_t GetChAdd () const
UShort_t GetGeographicAddress () const
UShort_t GetMasterChannel () const
UShort_t GetMinderChannel () const
UShort_t GetMaster () const
UShort_t GetMinder () const
UShort_t GetMenu () const
UShort_t GetVarcId () const
UShort_t GetVfb () const
UShort_t GetVmm () const
UShort_t GetVaAdcSel () const
UShort_t GetVaChip () const
UShort_t GetVaChannel () const
virtual void Print (Option_t *option="") const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const
Bool_t IsSameChannel (const RawChannelId &other) const
Bool_t IsSameCrate (const RawChannelId &other) const
Bool_t IsSameVAChip (const RawChannelId &other) const
Bool_t IsSameVfb (const RawChannelId &other) const
Bool_t IsSameMinder (const RawChannelId &other) const
Bool_t IsNull () const
void SetDetector (Detector::Detector_t detector)
void SetElecType (ElecType::Elec_t etype)
void SetPedMode (Bool_t pedmode)
void SetSparsMode (Bool_t sparsmode)
void SetCommonMode (Bool_t commonmode)
void SetModeBits (Bool_t commonmode, Bool_t sparsmode, Bool_t pedmode)
void ClearModeBits ()
void SetCrate (UInt_t crate)
void SetChAdd (UInt_t chadd)
void SetGeographicAddress (UInt_t geoaddr)
void SetMasterChannel (UInt_t master)
void SetMinderChannel (UInt_t minder)
void SetVarcId (UInt_t varc)
void SetVmm (UInt_t vmm)
void SetVaAdcSel (UInt_t adcsel)
void SetVaChip (UInt_t vachip)
void SetVaChannel (UInt_t vachan)

Static Public Member Functions

static Int_t CalcChAdd (UInt_t geo, UInt_t master, UInt_t minder)
static Int_t CalcChAdd (UInt_t varcid, UInt_t vmm, UInt_t adcsel, UInt_t vachip, UInt_t vachan)
static void DecompChAdd (UInt_t chadd, UInt_t &geo, UInt_t &master, UInt_t &minder)
static void DecompChAdd (UInt_t chadd, UInt_t &varcid, UInt_t &vmm, UInt_t &adcsel, UInt_t &vachip, UInt_t &vachan)

Protected Member Functions

void Init (Detector::Detector_t detector, ElecType::Elec_t etype, UInt_t crate, UInt_t chadd)
Bool_t CheckElecType (ElecType::Elec_t etype, const char *from="")
void ConvertToVersion2 (Bool_t inStreamerRead=false) const

Static Protected Member Functions

static UInt_t ConvertEncodedToVersion2 (UInt_t encoded)

Protected Attributes

UInt_t fEncoded

Friends

Bool_t operator< (const RawChannelId &lhs, const RawChannelId &rhs)
Bool_t operator== (const RawChannelId &lhs, const RawChannelId &rhs)
Bool_t operator!= (const RawChannelId &lhs, const RawChannelId &rhs)

Detailed Description

Definition at line 25 of file RawChannelId.h.


Constructor & Destructor Documentation

RawChannelId::RawChannelId (  )  [inline]

Definition at line 177 of file RawChannelId.h.

RawChannelId::RawChannelId ( Detector::Detector_t  detector,
ElecType::Elec_t  etype,
UInt_t  crate,
UInt_t  chadd 
)

Definition at line 118 of file RawChannelId.cxx.

References Init().

00121    : fEncoded(0)
00122 {
00123    // Constructor from Chadd
00124    // Pack the crate, chadd and readout type into an encoded value
00125 
00126    Init(detector,etype,crate,chadd);
00127 }

RawChannelId::RawChannelId ( Detector::Detector_t  detector,
ElecType::Elec_t  etype,
UInt_t  crate,
UInt_t  geoaddr,
UInt_t  masterChan,
UInt_t  minderChan 
)

Definition at line 130 of file RawChannelId.cxx.

References AsString(), CalcChAdd(), Init(), ElecType::kQIE, Msg::kWarning, maskQieGeoAddr, and MSG.

00134    : fEncoded(0)
00135 {
00136    // Constructor from QIE components
00137    // Pack the crate, chadd and readout type into an encoded value
00138 
00139    if (ElecType::kQIE != etype) {
00140      MSG("RawData",Msg::kWarning)
00141        << "RawChannelId QIE ctor was passed "
00142        << ElecType::AsString(etype) << " etype,"
00143        << endl
00144        << "  probably due to extra pedmode,commonmode args."
00145        << endl
00146        << "  no doubt this will end in tears..."
00147        << endl;
00148      assert(0);
00149    }
00150    if ( geoaddr > maskQieGeoAddr ) {
00151      MSG("RawData",Msg::kWarning)
00152        << "RawChannelId QIE ctor was passed geoAddr 0x" 
00153        << hex << geoaddr << dec
00154        << " which is larger then the expected max of 0x"
00155        << hex << maskQieGeoAddr << dec
00156        << endl
00157        << "  probably due to extra pedmode,commonmode args."
00158        << endl
00159        << "  no doubt this will end in tears..."
00160        << endl;
00161      assert(0);
00162    }
00163    UInt_t chadd = CalcChAdd(geoaddr,masterChan,minderChan);
00164    Init(detector,etype,crate,chadd);
00165 }

RawChannelId::RawChannelId ( Detector::Detector_t  detector,
ElecType::Elec_t  etype,
UInt_t  crate,
UInt_t  varc,
UInt_t  vmm,
UInt_t  adcsel,
UInt_t  vachip,
UInt_t  vachan 
)

Definition at line 168 of file RawChannelId.cxx.

References AsString(), CalcChAdd(), Init(), ElecType::kVA, Msg::kWarning, and MSG.

00172    : fEncoded(0)
00173 {
00174    // Constructor from VA components
00175    // Pack the crate, chadd and readout type into an encoded value
00176 
00177    if (ElecType::kVA != etype) {
00178      MSG("RawData",Msg::kWarning)
00179        << "RawChannelId VA ctor was passed "
00180        << ElecType::AsString(etype) << " etype,"
00181        << endl
00182        << "  probably due to extra pedmode,commonmode args."
00183        << endl
00184        << "  no doubt this will end in tears..."
00185        << endl;
00186      assert(0);
00187    }
00188    UInt_t chadd = CalcChAdd(varc,vmm,adcsel,vachip,vachan);
00189    Init(detector,etype,crate,chadd);
00190 }

RawChannelId::RawChannelId ( Detector::Detector_t  detector,
UInt_t  crateinfo,
UInt_t  chadd 
)

Definition at line 193 of file RawChannelId.cxx.

References fEncoded, maskChAdd, maskComMode, maskCrate, maskElec, maskPedMode, maskSparsMode, SetDetector(), shiftChAdd, and shiftCrate.

00195    : fEncoded(0)
00196 {
00197    // Constructor from CrateId (w/ mode bits) & Chadd
00198    SetDetector(detector);
00199    const UInt_t maskCrateInfo = 
00200      maskComMode|maskSparsMode|maskPedMode|maskElec|maskCrate;
00201    fEncoded |= ( crateinfo << shiftCrate ) & maskCrateInfo;
00202    fEncoded |= ( chadd << shiftChAdd ) & maskChAdd;
00203 
00204 }

virtual RawChannelId::~RawChannelId (  )  [inline, virtual]

Definition at line 53 of file RawChannelId.h.

00053 { ; } // no owned data members

RawChannelId::RawChannelId ( const UInt_t  encoded  )  [inline]

Definition at line 178 of file RawChannelId.h.

00178 : fEncoded(encoded) { ; }


Member Function Documentation

const char * RawChannelId::AsString ( Option_t *  option = ""  )  const

Definition at line 221 of file RawChannelId.cxx.

References GetChAdd(), GetCommonMode(), GetCrate(), GetDetector(), GetElecType(), GetGeographicAddress(), GetMasterChannel(), GetMinderChannel(), GetPedMode(), GetSparsMode(), GetVaAdcSel(), GetVaChannel(), GetVaChip(), GetVarcId(), GetVmm(), ElecType::kQIE, and ElecType::kVA.

Referenced by DigitText::AddCandDigitText(), RawTpSinglesSummaryBlock::AddChannelRate(), RerootToRawDataModule::AddToCrate(), RunSummary::Ana(), EvtAddRawDigitBlockModule::Ana(), NoiseFilterModule::Ana(), FarmListModule::Ana(), SimDigit::AsString(), Plexus::BuildPinDiodeMap(), Plexus::BuildPixelMaps(), PulserTimeCalScheme::CalibrateByPulser(), CheckElecType(), VaLinearityCalScheme::DecalVALinearity(), FitNdNonlinQuad(), RawQieErrorStatsBlock::FormatToOStream(), RawQieCalibrationDataBlock::FormatToOStream(), RawPedestalTableBlock::FormatToOStream(), RawQieDataBlock::FormatToOStream(), RawDigit::FormatToOStream(), RawLinearizedDataBlock::FormatToOStream(), RawCurrentInjectDataBlock::FormatToOStream(), RawSparsifierTableBlock::FormatToOStream(), FormatToOStream(), VaLinearityCalScheme::GetLinearizedVA(), AlgFilterDigitList::MakeBadChannelMap(), operator<<(), PlotPmt(), RawDigitDataBlock::PostFillRawDigits(), TridModelCrate::Print(), ElecChannel::PrintSummary(), RawChannelId(), SimVaTimedElectronics::ReadoutPmt(), AlgFilterDigitList::RunAlg(), Plexus::ValidateConsistency(), DbuDaqMonitorModule::WriteVaChipPedsEntry(), and DbuDaqMonitorModule::WriteVaChipSparsEntry().

00222 {
00223    // Return the unpacked RawChannelId as a string
00224    // User should copy result because it points to a
00225    // statically allocated string.  This is somewhat mitigated
00226    // by use of a circular buffer of strings.
00227 
00228    const int nbuffers = 8; // # of buffers in circular list
00229    static char newstring[nbuffers][80];
00230 
00231    static int ibuffer = nbuffers;
00232    ibuffer = (ibuffer+1)%nbuffers; // each call moves to next buffer
00233 
00234    char dchar = Detector::AsString(GetDetector())[0];
00235    ElecType::Elec_t elec = GetElecType();
00236    char echar = ElecType::AsString(elec)[0];
00237    char pchar = (GetPedMode()) ? 'P' : '-';
00238    char schar = (GetSparsMode()) ? 'S' : '-';
00239    char cchar = (GetCommonMode()) ? 'C' : '-';
00240    int  crate = GetCrate();
00241    int  chadd = GetChAdd();
00242 
00243    string opt = option;
00244    bool extended   = (opt.find("e") != string::npos);
00245    bool compact    = (opt.find("c") != string::npos);
00246    bool crate_only = (opt.find("C") != string::npos);
00247    const char* efmt    = 
00248      "%c:%c%c%c%c:0x%2.2x:%4.4x";
00249 
00250    if (crate_only) {
00251       const char* cratefmt = "%c:%c%c%c%c:0x%2.2x";
00252       sprintf(newstring[ibuffer],cratefmt,
00253               dchar,echar,pchar,schar,cchar,crate);
00254    }
00255    else
00256    if (extended) {
00257       // expanded version, break out all components
00258       const char* efmtva  = 
00259         "%c:%c%c%c%c:0x%2.2x: varc %1d vmm %1d adcsel %1d chip %1d chan %2d";
00260       const char* efmtqie = 
00261         "%c:%c%c%c%c:0x%2.2x: geoaddr %2d master %1d minder %2d";
00262       if (compact) {
00263         efmtva  = "%c:%c%c%c%c:0x%2.2x:%1d-%1d-%1d-%1d-%2.2d";
00264         efmtqie = "%c:%c%c%c%c:0x%2.2x:%2.2d-%1d-%2.2d";
00265       }
00266       switch (elec) {
00267       case ElecType::kVA:
00268          // VA electronics -- break out components of ChAdd
00269          sprintf(newstring[ibuffer],efmtva,
00270                  dchar,echar,pchar,schar,cchar,crate,
00271                  GetVarcId(),GetVmm(),GetVaAdcSel(),
00272                  GetVaChip(),GetVaChannel());
00273          break;
00274       case ElecType::kQIE:
00275          // QIE electronics -- break out components of ChAdd
00276          sprintf(newstring[ibuffer],efmtqie,
00277                  dchar,echar,pchar,schar,cchar,crate,
00278                  GetGeographicAddress(),
00279                  GetMasterChannel(),GetMinderChannel());
00280          break;
00281       default:
00282          sprintf(newstring[ibuffer],efmt,
00283                  dchar,echar,pchar,schar,cchar,crate,chadd);
00284          break;
00285       }
00286    }
00287    else
00288    sprintf(newstring[ibuffer],efmt,
00289            dchar,echar,pchar,schar,cchar,crate,chadd);
00290 
00291    return newstring[ibuffer];
00292 }

Int_t RawChannelId::CalcChAdd ( UInt_t  varcid,
UInt_t  vmm,
UInt_t  adcsel,
UInt_t  vachip,
UInt_t  vachan 
) [static]

Definition at line 722 of file RawChannelId.cxx.

References maskVaAdcSel, maskVaVaChannel, maskVaVaChip, maskVaVarcId, maskVaVmm, shiftVaAdcSel, shiftVaVaChannel, shiftVaVaChip, shiftVaVarcId, and shiftVaVmm.

00724 {
00725    // compute a ChAdd (channel address) based on VA components
00726 
00727    return
00728       (vachan & maskVaVaChannel) << shiftVaVaChannel |
00729       (vachip & maskVaVaChip)    << shiftVaVaChip    |
00730       (adcsel & maskVaAdcSel)    << shiftVaAdcSel    |
00731       (vmm    & maskVaVmm)       << shiftVaVmm       |
00732       (varcid & maskVaVarcId)    << shiftVaVarcId;
00733 }

Int_t RawChannelId::CalcChAdd ( UInt_t  geo,
UInt_t  master,
UInt_t  minder 
) [static]

Definition at line 711 of file RawChannelId.cxx.

References maskQieGeoAddr, maskQieMasterCh, maskQieMinderCh, shiftQieGeoAddr, shiftQieMasterCh, and shiftQieMinderCh.

Referenced by RawTpSinglesSummaryBlock::AddQieRate(), RawTpSinglesSummaryBlock::AddVaRate(), Cutter::FillChipsToCut(), and RawChannelId().

00712 {
00713    // compute a ChAdd (channel address) based on QIE components
00714 
00715    return
00716       (minder & maskQieMinderCh)  << shiftQieMinderCh |
00717       (master & maskQieMasterCh)  << shiftQieMasterCh |
00718       (geo    & maskQieGeoAddr) << shiftQieGeoAddr;
00719 }

Bool_t RawChannelId::CheckElecType ( ElecType::Elec_t  etype,
const char *  from = "" 
) [protected]

Definition at line 699 of file RawChannelId.cxx.

References AsString(), GetElecType(), Msg::kInfo, and MSG.

Referenced by SetGeographicAddress(), SetMasterChannel(), SetMinderChannel(), SetVaAdcSel(), SetVaChannel(), SetVaChip(), SetVarcId(), and SetVmm().

00701 {
00702    if ( GetElecType() == etype ) return true;
00703 
00704    MSG("Raw",Msg::kInfo)
00705       << "RawChannelId::" << from << " is NOP for non-"
00706       << ElecType::AsString(etype) << " electronics" << endl;
00707    return false;
00708 }

void RawChannelId::ClearModeBits (  ) 
UInt_t RawChannelId::ConvertEncodedToVersion2 ( UInt_t  encoded  )  [static, protected]

Definition at line 783 of file RawChannelId.cxx.

References defaultRawChannelId, Detector::kNear, maskDetector, maskRCIDVersion, shiftDetector, and zeroDetector.

Referenced by ConvertToVersion2().

00784 {
00785   // VERY DANGEROUS
00786   // conversion for version 1 having bad shift for detector component
00787   if ( encoded & maskRCIDVersion ) return encoded;  // do nothing
00788   if ( encoded == defaultRawChannelId ) {
00789     encoded |= maskRCIDVersion;
00790     return encoded;
00791   }
00792 
00793   // version 1 had the mask right but the shift wrong (23 instead of 24)
00794   // retrieve detector field as it was stored
00795   UInt_t detector = ( encoded & maskDetector ) >> 23 ;
00796   // if it is zero, then it probably was Near and got shifted away
00797   if ( ! detector ) detector = Detector::kNear;
00798   
00799   // store it as it should have been stored
00800   encoded = ( encoded & zeroDetector ) |
00801     ( ( detector << shiftDetector ) & maskDetector );
00802   // set the flag that we've done so
00803   encoded |= maskRCIDVersion;
00804   
00805   return encoded;
00806 }

void RawChannelId::ConvertToVersion2 ( Bool_t  inStreamerRead = false  )  const [protected]

Definition at line 762 of file RawChannelId.cxx.

References ConvertEncodedToVersion2(), defaultRawChannelId, fEncoded, Msg::kError, maskRCIDVersion, and MSG.

Referenced by GetDetector(), operator!=(), operator<(), and operator==().

00763 { // VERY DANGEROUS!
00764   if (! ( fEncoded & maskRCIDVersion ) ) {
00765     // make some noise in cases other than streamer reading
00766     // and the default dummy case
00767     if ( ! inStreamerRead && ( fEncoded != defaultRawChannelId ) ) {
00768       MSG("RawData",Msg::kError)
00769         <<"RawChannelId::ConvertToVersion2() called for encoded 0x"
00770         << hex << setw(8) << setfill('0') << fEncoded
00771         << setfill(' ') << dec 
00772         << "  at a time other than Streamer(). "
00773         << endl
00774         << "  Please contact rhatcher@fnal.gov about this strange case"
00775         << endl;
00776     }
00777     RawChannelId *nonconst = const_cast<RawChannelId*>(this);
00778     nonconst->fEncoded = ConvertEncodedToVersion2(fEncoded);
00779   }
00780 }

void RawChannelId::DecompChAdd ( UInt_t  chadd,
UInt_t &  varcid,
UInt_t &  vmm,
UInt_t &  adcsel,
UInt_t &  vachip,
UInt_t &  vachan 
) [static]

Definition at line 748 of file RawChannelId.cxx.

References maskVaAdcSel, maskVaVaChannel, maskVaVaChip, maskVaVarcId, maskVaVmm, shiftVaAdcSel, shiftVaVaChannel, shiftVaVaChip, shiftVaVarcId, and shiftVaVmm.

00750 {
00751    // decompose a ChAdd (channel address) based into VA components
00752 
00753    varcid = (chadd >> shiftVaVarcId)    & maskVaVarcId;
00754    vmm    = (chadd >> shiftVaVmm)       & maskVaVmm;
00755    adcsel = (chadd >> shiftVaAdcSel)    & maskVaAdcSel;
00756    vachip = (chadd >> shiftVaVaChip)    & maskVaVaChip;
00757    vachan = (chadd >> shiftVaVaChannel) & maskVaVaChannel;
00758 
00759 }

void RawChannelId::DecompChAdd ( UInt_t  chadd,
UInt_t &  geo,
UInt_t &  master,
UInt_t &  minder 
) [static]

Definition at line 736 of file RawChannelId.cxx.

References maskQieGeoAddr, maskQieMasterCh, maskQieMinderCh, shiftQieGeoAddr, shiftQieMasterCh, and shiftQieMinderCh.

Referenced by PlexRawChannelReadoutType::Store().

00738 {
00739    // decompose a ChAdd (channel address) based into QIE components
00740 
00741    geo    = (chadd >> shiftQieGeoAddr)   & maskQieGeoAddr;
00742    master = (chadd >> shiftQieMasterCh)  & maskQieMasterCh;
00743    minder = (chadd >> shiftQieMinderCh)  & maskQieMinderCh;
00744 
00745 }

std::ostream & RawChannelId::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Definition at line 433 of file RawChannelId.cxx.

References AsString().

Referenced by Print().

00435 {
00436    if (os.good()) {
00437       if (os.tie()) os.tie()->flush(); // instead of opfx
00438       os << AsString(option);
00439    }
00440    // instead of os.osfx()
00441    if (os.flags() & std::ios::unitbuf) os.flush();
00442    return os;
00443 }

UShort_t RawChannelId::GetChAdd (  )  const
Bool_t RawChannelId::GetCommonMode (  )  const
UShort_t RawChannelId::GetCrate (  )  const

Definition at line 339 of file RawChannelId.cxx.

References fEncoded, maskCrate, and shiftCrate.

Referenced by Detector::AddEntry(), LISummarySorter::AddEntry(), DetSim::AddToCrate(), RerootToRawDataModule::AddToCrate(), LIRawNt::Ana(), DmxDeMuxModule::Ana(), FarDetRawRateDump::Ana(), GetFidModule::Ana(), CDAnaModule::Ana(), EvtAddRawDigitBlockModule::Ana(), FitTrackMSListModule::Ana(), FarDetShieldPlankListModule::Ana(), RateSummary::Ana(), DmxDeMuxCosmicsModule::Ana(), FarDetStripListModule::Ana(), FarDetRawDigitDump::Ana(), FarDetTpSinglesDump::Ana(), LISummaryAnalyser::Ana(), AsString(), PulserTimeCalScheme::CalibrateByPulser(), TridCratePage::ChannelToCoords(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpEMModule::FillNtpStrip(), NtpSRModule::FillNtpStrip(), PhotonStatSummarizer::FillPmtDatabase(), CDPreFilterModule::FilterSnarlForErrors(), MnvRawDigitSuppression::FindMCTDCMinMax(), RawTpSinglesSummaryBlock::FormatToOStream(), CalPmtDrift::GetAggregateNo(), DbuVaChipPeds::GetAggregateNo(), DbuVaChipSpars::GetAggregateNo(), RawChip::GetCrate(), RawQieDataBlock::GetCrate(), RawLinearizedDataBlock::GetCrate(), RawCrateMonitorBlock::GetCrate(), RawQieCalibrationDataBlock::GetCrate(), RawQieLookUpTableBlock::GetCrate(), RawVtmTimeInfoBlock::GetCrate(), RawCurrentInjectDataBlock::GetCrate(), CalPmtDrift::GetCrate(), EvtOverlaySingleton::GetCrateT0s(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), CalTimeJump::GetIndex(), RawCrateMonitorBlock::GetMasterMonitor(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), PlexusReroot::GetSEIdAltL(), PhotonDefaultModel::GetStripEndRate(), RawSparsifierTableBlock::GetThresholdValue(), CandDeadChipHandle::IsSameChip(), RawChip::IsSameCrate(), VaDigit::IsSamePmt(), AlgFilterDigitListAB::IsTpmt(), CalHelpers::KeyFromCrate(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeBoxIndex(), PEGainModule::makeChannelIndex(), Plotter::myGetLedId(), StripStat::Print(), TridModelCrate::Print(), LIPatternFinderSimple::PrintSnarl(), DQHotColdElectronics::Process(), FarDetDataQualityModule::ProcessBlock(), FillFarRunQuality::ProcessBlock(), FillNearRunQuality::ProcessBlock(), FillHvFromSingles::ProcessBlock(), FillBadChannelDB::ProcessBlock(), RawDeadChipBlock::RawDeadChipBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), SimVaTimedElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), OltDataIntegrity::Reco(), OltRawLI::Reco(), OltBlockScan::Reco(), AlgFarDetShieldPlankList::RunAlg(), AlgFilterDigitList::RunAlg(), AlgFarDetStripList::RunAlg(), ShieldGeom::SetupShieldGeom(), PlexPixelToRawChannel::Store(), PlexRawChannelReadoutType::Store(), DbuVaChipSpars::Store(), DbuVaChipPeds::Store(), PlexRawChannelToPinDiode::Store(), TridModelCrate::TridModelCrate(), Detector::Update(), FillBadChannelDB::WriteAllBadToDatabase(), and FillBadChannelDB::WriteToDatabase().

00340 {
00341    //
00342 
00343    return ( fEncoded & maskCrate ) >> shiftCrate;
00344 }

Detector::Detector_t RawChannelId::GetDetector (  )  const
ElecType::Elec_t RawChannelId::GetElecType (  )  const

Definition at line 307 of file RawChannelId.cxx.

References fEncoded, maskElec, and shiftElec.

Referenced by PulserFromRawSummaryList::Add(), RawChip::AddChannel(), DetSim::AddToCrate(), RerootToRawDataModule::AddToCrate(), LIRawNt::Ana(), CDAnaModule::Ana(), LightInjector::Ana(), AsString(), TridCratePage::ChannelToCoords(), CheckElecType(), VaLinearityCalScheme::DecalVALinearity(), Cutter::FillChipsToCut(), NtpSRModule::FillNtpDataQuality(), NtpMCModule::FillNtpMCTruth(), CDPreFilterModule::FilterOnSnarlSize(), CDPreFilterModule::FilterSnarlForErrors(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), RawCurrentInjectDataBlock::GetElecType(), RawQieDataBlock::GetElecType(), RawVtmTimeInfoBlock::GetElecType(), RawChip::GetElecType(), RawQieLookUpTableBlock::GetElecType(), RawCrateMonitorBlock::GetElecType(), RawQieCalibrationDataBlock::GetElecType(), RawLinearizedDataBlock::GetElecType(), GetGeographicAddress(), VaLinearityCalScheme::GetLinearizedVA(), GetMasterChannel(), RawCrateMonitorBlock::GetMasterMonitor(), GetMinderChannel(), RawChip::GetNanosec(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetPulserBox(), RawReadout::GetReadoutType(), Calibrator::GetTDCConvert(), RawSparsifierTableBlock::GetThresholdValue(), GetVaAdcSel(), GetVaChannel(), GetVaChip(), GetVarcId(), GetVfb(), RawCrateMonitorBlock::GetVfbMonitor(), GetVmm(), CandDeadChipHandle::IsSameChip(), RawChip::IsSameElecType(), IsSameMinder(), IsSameVAChip(), IsSameVfb(), PEGainModule::MakeHistosFromData(), Cutter::NDErrorCutter(), RawDigitDataBlock::PostFillRawDigits(), TridModelCrate::Print(), DQRawDigits::Process(), DQHotColdElectronics::Process(), DQLightInjection::Process(), SimVaTimedElectronics::ReadoutDetector(), SimQieElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), UberModule::Reco(), UberModuleLite::Reco(), AlgCaldetDigit::RunAlg(), AlgMCDigit::RunAlg(), AlgDigit::RunAlg(), AlgStripSRList::RunAlg(), AlgDIConvert::RunAlg(), AlgCalDetSI::RunAlg(), TridModelCrate::ShouldContain(), PlexRawChannelReadoutType::Store(), PlexRawChannelToPinDiode::Store(), and TridModelCrate::TridModelCrate().

00308 {
00309    //
00310 
00311    UInt_t bitField = ( fEncoded & maskElec ) >> shiftElec;
00312 
00313    return (ElecType::Elec_t) bitField;
00314 }

UInt_t RawChannelId::GetEncoded (  )  const [inline]
UShort_t RawChannelId::GetGeographicAddress (  )  const
UShort_t RawChannelId::GetMaster (  )  const [inline]
UShort_t RawChannelId::GetMasterChannel (  )  const
UShort_t RawChannelId::GetMenu (  )  const [inline]
UShort_t RawChannelId::GetMinder (  )  const [inline]
UShort_t RawChannelId::GetMinderChannel (  )  const
Bool_t RawChannelId::GetPedMode (  )  const
Bool_t RawChannelId::GetSparsMode (  )  const
UShort_t RawChannelId::GetVaAdcSel (  )  const

Definition at line 403 of file RawChannelId.cxx.

References badUShort, GetChAdd(), GetElecType(), ElecType::kVA, maskVaAdcSel, and shiftVaAdcSel.

Referenced by LIRawNt::Ana(), FarDetRawRateDump::Ana(), CDAnaModule::Ana(), FitTrackMSListModule::Ana(), FarDetShieldPlankListModule::Ana(), RateSummary::Ana(), FarDetStripListModule::Ana(), FarDetRawDigitDump::Ana(), FarDetTpSinglesDump::Ana(), LISummaryAnalyser::Ana(), AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpEMModule::FillNtpStrip(), NtpSRModule::FillNtpStrip(), CDPreFilterModule::FilterSnarlForErrors(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), CalTimeJump::GetIndex(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), RawSparsifierTableBlock::GetThresholdValue(), RawChip::GetVaadc(), CandDeadChipHandle::IsSameChip(), VaDigit::IsSamePmt(), RawChip::IsSameVaadc(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeBoxIndex(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), TridModelCrate::Print(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetStripList::RunAlg(), ShieldGeom::SetupShieldGeom(), DbuVaChipSpars::Store(), DbuVaChipPeds::Store(), PlexRawChannelToPinDiode::Store(), and Detector::Update().

00404 {
00405    if ( GetElecType() != ElecType::kVA ) return badUShort;
00406 
00407    return ( GetChAdd() >> shiftVaAdcSel ) & maskVaAdcSel;
00408 }

UShort_t RawChannelId::GetVaChannel (  )  const

Definition at line 419 of file RawChannelId.cxx.

References badUShort, GetChAdd(), GetElecType(), ElecType::kVA, maskVaVaChannel, and shiftVaVaChannel.

Referenced by RawChip::AddChannel(), LIRawNt::Ana(), DmxDeMuxModule::Ana(), FarDetRawRateDump::Ana(), CDAnaModule::Ana(), FitTrackMSListModule::Ana(), FarDetShieldPlankListModule::Ana(), DmxDeMuxCosmicsModule::Ana(), FarDetStripListModule::Ana(), FarDetRawDigitDump::Ana(), FarDetTpSinglesDump::Ana(), AsString(), DmxUtilities::FillHitPixels(), NtpSRModule::FillNtpShieldStrip(), DmxUtilities::FillPlaneArray(), CDPreFilterModule::FilterSnarlForErrors(), VaDigit::GetCrossTalk(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetPulserBox(), Plexus::GetReadoutType(), RawReadout::GetReadoutType(), RawSparsifierTableBlock::GetThresholdValue(), AlgFilterDigitListAB::IsPmt(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetStripList::RunAlg(), PlexRawChannelToPinDiode::Store(), Detector::Update(), DbuDaqMonitorModule::WriteVaChipPedsEntry(), and DbuDaqMonitorModule::WriteVaChipSparsEntry().

00420 {
00421    if ( GetElecType() != ElecType::kVA ) return badUShort;
00422 
00423    return ( GetChAdd() >> shiftVaVaChannel ) & maskVaVaChannel;
00424 }

UShort_t RawChannelId::GetVaChip (  )  const

Definition at line 411 of file RawChannelId.cxx.

References badUShort, GetChAdd(), GetElecType(), ElecType::kVA, maskVaVaChip, and shiftVaVaChip.

Referenced by LIRawNt::Ana(), DmxDeMuxModule::Ana(), FarDetRawRateDump::Ana(), CDAnaModule::Ana(), FitTrackMSListModule::Ana(), FarDetShieldPlankListModule::Ana(), RateSummary::Ana(), DmxDeMuxCosmicsModule::Ana(), FarDetStripListModule::Ana(), FarDetRawDigitDump::Ana(), FarDetTpSinglesDump::Ana(), LISummaryAnalyser::Ana(), AsString(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), DmxUtilities::FillHitPixels(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpEMModule::FillNtpStrip(), NtpSRModule::FillNtpStrip(), DmxUtilities::FillPlaneArray(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), CalTimeJump::GetIndex(), RawPedestalTableBlock::GetPedValue(), LILookup::GetPinDiodePlanes(), RawReadout::GetReadoutType(), RawSparsifierTableBlock::GetThresholdValue(), RawChip::GetVaChip(), CandDeadChipHandle::IsSameChip(), VaDigit::IsSamePmt(), RawChip::IsSameVaChip(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetStripList::RunAlg(), ShieldGeom::SetupShieldGeom(), DbuVaChipSpars::Store(), DbuVaChipPeds::Store(), PlexRawChannelToPinDiode::Store(), and Detector::Update().

00412 {
00413    if ( GetElecType() != ElecType::kVA ) return badUShort;
00414 
00415    return ( GetChAdd() >> shiftVaVaChip ) & maskVaVaChip;
00416 }

UShort_t RawChannelId::GetVarcId (  )  const

Definition at line 379 of file RawChannelId.cxx.

References badUShort, GetChAdd(), GetElecType(), ElecType::kVA, maskVaVarcId, and shiftVaVarcId.

Referenced by LIRawNt::Ana(), FarDetRawRateDump::Ana(), CDAnaModule::Ana(), FitTrackMSListModule::Ana(), FarDetShieldPlankListModule::Ana(), RateSummary::Ana(), FarDetStripListModule::Ana(), FarDetRawDigitDump::Ana(), FarDetTpSinglesDump::Ana(), LISummaryAnalyser::Ana(), AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpEMModule::FillNtpStrip(), NtpSRModule::FillNtpStrip(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), CalTimeJump::GetIndex(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), RawSparsifierTableBlock::GetThresholdValue(), RawChip::GetVarc(), CandDeadChipHandle::IsSameChip(), VaDigit::IsSamePmt(), RawChip::IsSameVarc(), AlgFilterDigitListAB::IsTpmt(), CalHelpers::KeyFromVarc(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeBoxIndex(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), TridModelCrate::Print(), LIPatternFinderSimple::PrintSnarl(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), SimVaTimedElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetStripList::RunAlg(), ShieldGeom::SetupShieldGeom(), DbuVaChipSpars::Store(), DbuVaChipPeds::Store(), PlexRawChannelToPinDiode::Store(), and Detector::Update().

00380 {
00381    if ( GetElecType() != ElecType::kVA ) return badUShort;
00382 
00383    return ( GetChAdd() >> shiftVaVarcId ) & maskVaVarcId;
00384 }

UShort_t RawChannelId::GetVfb (  )  const

Definition at line 387 of file RawChannelId.cxx.

References badUShort, GetChAdd(), GetElecType(), ElecType::kVA, maskVaVfb, and shiftVaVfb.

Referenced by RawTpSinglesSummaryBlock::FormatToOStream().

00388 {
00389    if ( GetElecType() != ElecType::kVA ) return badUShort;
00390 
00391    return ( GetChAdd() >> shiftVaVfb ) & maskVaVfb;
00392 }

UShort_t RawChannelId::GetVmm (  )  const

Definition at line 395 of file RawChannelId.cxx.

References badUShort, GetChAdd(), GetElecType(), ElecType::kVA, maskVaVmm, and shiftVaVmm.

Referenced by LIRawNt::Ana(), FarDetRawRateDump::Ana(), CDAnaModule::Ana(), FitTrackMSListModule::Ana(), FarDetShieldPlankListModule::Ana(), RateSummary::Ana(), FarDetStripListModule::Ana(), FarDetRawDigitDump::Ana(), FarDetTpSinglesDump::Ana(), LISummaryAnalyser::Ana(), AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpEMModule::FillNtpStrip(), NtpSRModule::FillNtpStrip(), CDPreFilterModule::FilterOnSnarlSize(), CDPreFilterModule::FilterSnarlForErrors(), LIPlexMaps::GetElecString(), LISummarySorter::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), CalTimeJump::GetIndex(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), RawSparsifierTableBlock::GetThresholdValue(), RawChip::GetVmm(), CandDeadChipHandle::IsSameChip(), VaDigit::IsSamePmt(), RawChip::IsSameVmm(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeBoxIndex(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), TridModelCrate::Print(), LIPatternFinderSimple::PrintSnarl(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), SimVaTimedElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetStripList::RunAlg(), ShieldGeom::SetupShieldGeom(), DbuVaChipSpars::Store(), DbuVaChipPeds::Store(), PlexRawChannelToPinDiode::Store(), and Detector::Update().

00396 {
00397    if ( GetElecType() != ElecType::kVA ) return badUShort;
00398 
00399    return ( GetChAdd() >> shiftVaVmm ) & maskVaVmm;
00400 }

void RawChannelId::Init ( Detector::Detector_t  detector,
ElecType::Elec_t  etype,
UInt_t  crate,
UInt_t  chadd 
) [protected]

Definition at line 207 of file RawChannelId.cxx.

References fEncoded, SetChAdd(), SetCrate(), SetDetector(), SetElecType(), and zeroModeBits.

Referenced by RawChannelId().

00210 {
00211    // Pack the crate, chadd and readout type into an encoded value
00212 
00213    SetDetector(detector);
00214    SetElecType(etype);
00215    SetCrate(crate);
00216    SetChAdd(chadd);
00217    fEncoded &= zeroModeBits;  // clear all the mode bits
00218 }

Bool_t RawChannelId::IsNull (  )  const
Bool_t RawChannelId::IsSameChannel ( const RawChannelId other  )  const

Definition at line 447 of file RawChannelId.cxx.

References fEncoded, and zeroModeBits.

Referenced by LightInjector::Ana(), CustomLightInjector::Ana(), CDTrackerModule::Ana(), CDAnaModule::Ana(), ChannelsToFilter::IsSameChannel(), UberModuleLite::Reco(), UberModule::Reco(), AlgCalDetSI::RunAlg(), and TridModelCrate::ShouldContain().

00448 {
00449    // compare two channel id's irrespective of ped/common/spars modes
00450    
00451    return (fEncoded&zeroModeBits) == (other.fEncoded&zeroModeBits);
00452 
00453 }

Bool_t RawChannelId::IsSameCrate ( const RawChannelId other  )  const

Definition at line 456 of file RawChannelId.cxx.

References fEncoded, maskChAdd, shiftChAdd, and zeroModeBits.

00457 {
00458    // compare two channel id's for same crate
00459    // irrespective of ped/common/spars modes
00460    // (tests detector + electype + crate)
00461    
00462    const UInt_t zeroBits = zeroModeBits & ~( maskChAdd << shiftChAdd );
00463    UInt_t thischip =       fEncoded & zeroBits;
00464    UInt_t thatchip = other.fEncoded & zeroBits;
00465 
00466    return ( thischip == thatchip );
00467 
00468 }

Bool_t RawChannelId::IsSameMinder ( const RawChannelId other  )  const

Definition at line 513 of file RawChannelId.cxx.

References fEncoded, GetElecType(), Msg::kInfo, ElecType::kQIE, MSG, zeroModeBits, and zeroQieMinderCh.

Referenced by RawDigitDataBlock::PostFillRawDigits().

00514 {
00515    // compare for same Minder-ness
00516    
00517    if (       GetElecType() != ElecType::kQIE || 
00518         other.GetElecType() != ElecType::kQIE   ) {
00519       MSG("RawData",Msg::kInfo) 
00520          << "RawChannelId::IsSameMinder always fails if "
00521          << "the electronics are not QIE" << endl;
00522       return false;
00523    }
00524 
00525    const UInt_t zeroBits = zeroModeBits & zeroQieMinderCh;
00526    UInt_t thischip =       fEncoded & zeroBits;
00527    UInt_t thatchip = other.fEncoded & zeroBits;
00528 
00529    return ( thischip == thatchip );
00530 
00531 }

Bool_t RawChannelId::IsSameVAChip ( const RawChannelId other  )  const

Definition at line 471 of file RawChannelId.cxx.

References fEncoded, GetElecType(), Msg::kInfo, ElecType::kVA, MSG, zeroModeBits, and zeroVaVaChannel.

Referenced by UberModuleLite::Reco(), UberModule::Reco(), AlgCalDetSI::RunAlg(), DbuDaqMonitorModule::WriteVaChipPedsEntry(), and DbuDaqMonitorModule::WriteVaChipSparsEntry().

00472 {
00473    // compare for same VA chip-ness
00474    
00475    if (       GetElecType() != ElecType::kVA || 
00476         other.GetElecType() != ElecType::kVA   ) {
00477       MSG("RawData",Msg::kInfo) 
00478          << "RawChannelId::IsSameVAChip always fails if "
00479          << "the electronics are not VA" << endl;
00480       return false;
00481    }
00482 
00483    const UInt_t zeroBits = zeroModeBits & zeroVaVaChannel;
00484    UInt_t thischip =       fEncoded & zeroBits;
00485    UInt_t thatchip = other.fEncoded & zeroBits;
00486 
00487    return ( thischip == thatchip );
00488 
00489 }

Bool_t RawChannelId::IsSameVfb ( const RawChannelId other  )  const

Definition at line 492 of file RawChannelId.cxx.

References fEncoded, GetElecType(), Msg::kInfo, ElecType::kVA, MSG, zeroModeBits, zeroVaVaChannel, and zeroVaVaChip.

Referenced by RawCrateMonitorBlock::GetVfbMonitor().

00493 {
00494    // compare for same Vfb-ness
00495    
00496    if (       GetElecType() != ElecType::kVA || 
00497         other.GetElecType() != ElecType::kVA   ) {
00498       MSG("RawData",Msg::kInfo) 
00499          << "RawChannelId::IsSameVfb always fails if "
00500          << "the electronics are not VA" << endl;
00501       return false;
00502    }
00503 
00504    const UInt_t zeroBits = zeroModeBits & zeroVaVaChannel & zeroVaVaChip;
00505    UInt_t thischip =       fEncoded & zeroBits;
00506    UInt_t thatchip = other.fEncoded & zeroBits;
00507 
00508    return ( thischip == thatchip );
00509 
00510 }

void RawChannelId::Print ( Option_t *  option = ""  )  const [virtual]

Definition at line 427 of file RawChannelId.cxx.

References FormatToOStream().

Referenced by LILookup::GetPinDiodePlanes().

00428 {
00429    FormatToOStream(cout,option);
00430 
00431 }

void RawChannelId::SetChAdd ( UInt_t  chadd  ) 

Definition at line 620 of file RawChannelId.cxx.

References fEncoded, maskChAdd, shiftChAdd, and zeroChAdd.

Referenced by Cutter::FillChipsToCut(), and Init().

00621 {
00622    fEncoded = (fEncoded & zeroChAdd) |
00623       ( ( chadd << shiftChAdd ) & maskChAdd );
00624 }

void RawChannelId::SetCommonMode ( Bool_t  commonmode  ) 

Definition at line 577 of file RawChannelId.cxx.

References fEncoded, and maskComMode.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00578 {
00579    if (commonmode) {
00580       fEncoded |= maskComMode;
00581    } else {
00582       fEncoded &= ~maskComMode;
00583    }
00584 }

void RawChannelId::SetCrate ( UInt_t  crate  ) 

Definition at line 613 of file RawChannelId.cxx.

References fEncoded, maskCrate, shiftCrate, and zeroCrate.

Referenced by Init(), UberModule::Reco(), and UberModuleLite::Reco().

00614 {
00615    fEncoded = (fEncoded & zeroCrate) |
00616       ( ( crate << shiftCrate ) & maskCrate );
00617 }

void RawChannelId::SetDetector ( Detector::Detector_t  detector  ) 
void RawChannelId::SetElecType ( ElecType::Elec_t  etype  ) 

Definition at line 550 of file RawChannelId.cxx.

References fEncoded, maskElec, shiftElec, and zeroElec.

Referenced by RawTpSinglesSummaryBlock::FormatToOStream(), Init(), UberModule::Reco(), and UberModuleLite::Reco().

00551 {
00552    fEncoded = (fEncoded & zeroElec) |
00553       ( ( etype <<  shiftElec ) & maskElec );
00554 }

void RawChannelId::SetGeographicAddress ( UInt_t  geoaddr  ) 

Definition at line 627 of file RawChannelId.cxx.

References CheckElecType(), fEncoded, ElecType::kQIE, maskQieGeoAddr, shiftQieGeoAddr, and zeroQieGeoAddr.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00628 {
00629    if (!CheckElecType(ElecType::kQIE,"SetGeographicAddress")) return;
00630 
00631    fEncoded = ( fEncoded & zeroQieGeoAddr ) |
00632               ( (geoaddr & maskQieGeoAddr) << shiftQieGeoAddr ) ;
00633 }

void RawChannelId::SetMasterChannel ( UInt_t  master  ) 

Definition at line 636 of file RawChannelId.cxx.

References CheckElecType(), fEncoded, ElecType::kQIE, maskQieMasterCh, shiftQieMasterCh, and zeroQieMasterCh.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00637 {
00638    if (!CheckElecType(ElecType::kQIE,"SetMasterChannel")) return;
00639 
00640    fEncoded = ( fEncoded & zeroQieMasterCh ) |
00641               ( (master  & maskQieMasterCh) << shiftQieMasterCh ) ;
00642 }

void RawChannelId::SetMinderChannel ( UInt_t  minder  ) 
void RawChannelId::SetModeBits ( Bool_t  commonmode,
Bool_t  sparsmode,
Bool_t  pedmode 
)

Definition at line 587 of file RawChannelId.cxx.

References fEncoded, maskComMode, maskPedMode, and maskSparsMode.

Referenced by RawLIAdcSummary::BuildRawChannelId(), RawLITimingSummary::BuildRawChannelId(), RawDigit::BuildRawChannelId(), DbuVaChipSpars::Fill(), DbuVaChipPeds::Fill(), RawPedestalTableBlock::GetPedValue(), and RawSparsifierTableBlock::GetThresholdValue().

00588 {
00589    if (commonmode) {
00590       fEncoded |= maskComMode;
00591    } else {
00592       fEncoded &= ~maskComMode;
00593    }
00594    if (sparsmode) {
00595       fEncoded |= maskSparsMode;
00596    } else {
00597       fEncoded &= ~maskSparsMode;
00598    }
00599    if (pedmode) {
00600       fEncoded |= maskPedMode;
00601    } else {
00602       fEncoded &= ~maskPedMode;
00603    }
00604 }

void RawChannelId::SetPedMode ( Bool_t  pedmode  ) 

Definition at line 557 of file RawChannelId.cxx.

References fEncoded, and maskPedMode.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00558 {
00559    if (pedmode) {
00560       fEncoded |= maskPedMode;
00561    } else {
00562       fEncoded &= ~maskPedMode;
00563    }
00564 }

void RawChannelId::SetSparsMode ( Bool_t  sparsmode  ) 

Definition at line 567 of file RawChannelId.cxx.

References fEncoded, and maskSparsMode.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00568 {
00569    if (sparsmode) {
00570       fEncoded |= maskSparsMode;
00571    } else {
00572       fEncoded &= ~maskSparsMode;
00573    }
00574 }

void RawChannelId::SetVaAdcSel ( UInt_t  adcsel  ) 

Definition at line 672 of file RawChannelId.cxx.

References CheckElecType(), fEncoded, ElecType::kVA, maskVaAdcSel, shiftVaAdcSel, and zeroVaAdcSel.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00673 {
00674    if (!CheckElecType(ElecType::kVA,"SetVaAdcSel")) return;
00675 
00676    fEncoded = ( fEncoded & zeroVaAdcSel ) |
00677               ( (adcsel & maskVaAdcSel) << shiftVaAdcSel ) ;
00678 }

void RawChannelId::SetVaChannel ( UInt_t  vachan  ) 
void RawChannelId::SetVaChip ( UInt_t  vachip  ) 
void RawChannelId::SetVarcId ( UInt_t  varc  ) 

Definition at line 654 of file RawChannelId.cxx.

References CheckElecType(), fEncoded, ElecType::kVA, maskVaVarcId, shiftVaVarcId, and zeroVaVarcId.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00655 {
00656    if (!CheckElecType(ElecType::kVA,"SetVarcId")) return;
00657 
00658    fEncoded = ( fEncoded & zeroVaVarcId ) |
00659               ( (varc & maskVaVarcId) << shiftVaVarcId ) ;
00660 }

void RawChannelId::SetVmm ( UInt_t  vmm  ) 

Definition at line 663 of file RawChannelId.cxx.

References CheckElecType(), fEncoded, ElecType::kVA, maskVaVmm, shiftVaVmm, and zeroVaVmm.

Referenced by UberModule::Reco(), and UberModuleLite::Reco().

00664 {
00665    if (!CheckElecType(ElecType::kVA,"SetVmm")) return;
00666 
00667    fEncoded = ( fEncoded & zeroVaVmm ) |
00668               ( (vmm & maskVaVmm) << shiftVaVmm ) ;
00669 }


Friends And Related Function Documentation

Bool_t operator!= ( const RawChannelId lhs,
const RawChannelId rhs 
) [friend]
Bool_t operator< ( const RawChannelId lhs,
const RawChannelId rhs 
) [friend]
Bool_t operator== ( const RawChannelId lhs,
const RawChannelId rhs 
) [friend]

Member Data Documentation

UInt_t RawChannelId::fEncoded [protected]

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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1