Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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

Int_t CalcChAdd (UInt_t geo, UInt_t master, UInt_t minder)
Int_t CalcChAdd (UInt_t varcid, UInt_t vmm, UInt_t adcsel, UInt_t vachip, UInt_t vachan)
void DecompChAdd (UInt_t chadd, UInt_t &geo, UInt_t &master, UInt_t &minder)
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

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)


Constructor & Destructor Documentation

RawChannelId::RawChannelId  )  [inline]
 

Definition at line 177 of file RawChannelId.h.

References defaultRawChannelId.

00177 : fEncoded(defaultRawChannelId) { ; }

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 ElecType::AsString(), CalcChAdd(), Init(), 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 ElecType::AsString(), CalcChAdd(), Init(), 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, maskComMode, maskElec, maskPedMode, maskSparsMode, and SetDetector().

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 ElecType::AsString(), Detector::AsString(), GetChAdd(), GetCommonMode(), GetCrate(), GetDetector(), GetElecType(), GetGeographicAddress(), GetMasterChannel(), GetMinderChannel(), GetPedMode(), GetSparsMode(), GetVaAdcSel(), GetVaChannel(), GetVaChip(), GetVarcId(), and GetVmm().

Referenced by DigitText::AddCandDigitText(), RawTpSinglesSummaryBlock::AddChannelRate(), RerootToRawDataModule::AddToCrate(), RunSummary::Ana(), NoiseFilterModule::Ana(), FarmListModule::Ana(), SimDigit::AsString(), Plexus::BuildPinDiodeMap(), Plexus::BuildPixelMaps(), PulserTimeCalScheme::CalibrateByPulser(), VaLinearityCalScheme::DecalVALinearity(), FitNdNonlinQuad(), RawSparsifierTableBlock::FormatToOStream(), RawQieErrorStatsBlock::FormatToOStream(), RawQieDataBlock::FormatToOStream(), RawQieCalibrationDataBlock::FormatToOStream(), RawPedestalTableBlock::FormatToOStream(), RawLinearizedDataBlock::FormatToOStream(), RawDigit::FormatToOStream(), RawDeadChipBlock::FormatToOStream(), RawCurrentInjectDataBlock::FormatToOStream(), FormatToOStream(), VaLinearityCalScheme::GetLinearizedVA(), HardwareComponent::GetStripEndsForCrate(), AlgFilterDigitList::MakeBadChannelMap(), PlotPmt(), RawDigitDataBlock::PostFillRawDigits(), TridModelCrate::Print(), SimVaTimedElectronics::ReadoutPmt(), LISummarySorter::ReconstructPin(), 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 shiftVaAdcSel, shiftVaVaChannel, shiftVaVaChip, 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 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 ElecType::AsString(), GetElecType(), 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  ) 
 

Definition at line 607 of file RawChannelId.cxx.

References fEncoded.

Referenced by Plexus::BuildPinDiodeMap(), Plexus::BuildPixelMaps(), Plexus::BuildReadoutMap(), RawDeadChipBlock::ChipWasDead(), RawDeadChipBlock::FillDeadChannels(), Plexus::GetPinDiodeId(), Plexus::GetPixelSpotIdVector(), Plexus::GetReadoutType(), Plexus::GetSEIdAltL(), Plexus::GetSpecialDescript(), HardwareComponent::HardwareComponent(), AlgFilterDigitList::MakeBadChannelMap(), AlgStripSRList::PassNearNoise(), RawDigitDataBlock::PostFillRawDigits(), FiltSGateModule::ProcessDigitDataBlks(), and AlgFilterDigitList::RunAlg().

00608 {
00609    fEncoded &= zeroModeBits;
00610 }

UInt_t RawChannelId::ConvertEncodedToVersion2 UInt_t  encoded  )  [static, protected]
 

Definition at line 782 of file RawChannelId.cxx.

Referenced by ConvertToVersion2().

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

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

Definition at line 762 of file RawChannelId.cxx.

References ConvertEncodedToVersion2(), fEncoded, 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     RawChannelId *nonconst = const_cast<RawChannelId*>(this);
00777     nonconst->fEncoded = ConvertEncodedToVersion2(fEncoded);
00778   }
00779 }

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.

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.

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(), and option.

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
 

Definition at line 347 of file RawChannelId.cxx.

References fEncoded.

Referenced by LISummarySorter::AddEntry(), Detector::AddEntry(), RerootToRawDataModule::AddToCrate(), DataQualityReader::Ana(), AsString(), LIRawNtAna::Demo(), LIRawNtAna::DemoOpenFile(), LISummarySorter::GetElectronicsData(), GetGeographicAddress(), GetMasterChannel(), GetMinderChannel(), PlexusReroot::GetSEIdAltL(), PhotonDefaultModel::GetStripEndRate(), GetVaAdcSel(), GetVaChannel(), GetVaChip(), GetVarcId(), GetVfb(), GetVmm(), DetSim::PackQieDigit(), DetSim::PackVaDigit(), LIPlexMaps::PrintPlexPinDiodeInfo(), RawDeadChipBlock::RawDeadChipBlock(), LIPlexMaps::ReadDbPulserDriftPin(), OltRawLI::Reco(), AlgDeadChip::RunAlg(), PlexRawChannelReadoutType::Store(), PlexPixelToRawChannel::Store(), and Detector::Update().

00348 {
00349    //
00350 
00351    return ( fEncoded & maskChAdd ) >> shiftChAdd;
00352 }

Bool_t RawChannelId::GetCommonMode  )  const
 

Definition at line 331 of file RawChannelId.cxx.

References fEncoded.

Referenced by AsString(), RawVtmTimeInfoBlock::GetCommonMode(), RawQieLookUpTableBlock::GetCommonMode(), RawQieDataBlock::GetCommonMode(), RawQieCalibrationDataBlock::GetCommonMode(), RawLinearizedDataBlock::GetCommonMode(), RawCurrentInjectDataBlock::GetCommonMode(), and RawCrateMonitorBlock::GetCommonMode().

00332 {
00333    //
00334 
00335    return (fEncoded & maskComMode) ? 1 : 0 ;
00336 }

UShort_t RawChannelId::GetCrate  )  const
 

Definition at line 339 of file RawChannelId.cxx.

References fEncoded.

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

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

Detector::Detector_t RawChannelId::GetDetector  )  const
 

Definition at line 295 of file RawChannelId.cxx.

References ConvertToVersion2(), and fEncoded.

Referenced by RerootToRawDataModule::AddToCrate(), AsString(), RawQieDataBlock::GetDetector(), RawQieCalibrationDataBlock::GetDetector(), RawLinearizedDataBlock::GetDetector(), RawCurrentInjectDataBlock::GetDetector(), PulserTimeDrift::GetIndex(), RawCrateMonitorBlock::GetMasterMonitor(), RawReadout::GetPulserBox(), RawReadout::GetReadoutType(), Calibrator::GetTDCConvert(), CalVaLinearity::Rcid2Index(), and Plexus::ValidateConsistency().

00296 {
00297    //
00298 
00299    if (! (fEncoded & maskRCIDVersion) ) ConvertToVersion2();
00300 
00301    UInt_t bitField = ( fEncoded & maskDetector ) >> shiftDetector;
00302 
00303    return (Detector::Detector_t) bitField;
00304 }

ElecType::Elec_t RawChannelId::GetElecType  )  const
 

Definition at line 307 of file RawChannelId.cxx.

References fEncoded.

Referenced by PulserFromRawSummaryList::Add(), RawChip::AddChannel(), RerootToRawDataModule::AddToCrate(), DetSim::AddToCrate(), LIRawNt::Ana(), LightInjector::Ana(), CDAnaModule::Ana(), AsString(), PmtMap::BuildMap(), TridCratePage::ChannelToCoords(), CheckElecType(), VaLinearityCalScheme::DecalVALinearity(), Cutter::FillChipsToCut(), NtpSRModule::FillNtpDataQuality(), NtpMCModule::FillNtpMCTruth(), CDPreFilterModule::FilterOnSnarlSize(), CDPreFilterModule::FilterSnarlForErrors(), CDCrossTalker::GetCleanStripMap(), CDMapMaker::GetDigitMap(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), RawVtmTimeInfoBlock::GetElecType(), RawQieLookUpTableBlock::GetElecType(), RawQieDataBlock::GetElecType(), RawQieCalibrationDataBlock::GetElecType(), RawLinearizedDataBlock::GetElecType(), RawCurrentInjectDataBlock::GetElecType(), RawCrateMonitorBlock::GetElecType(), RawChip::GetElecType(), GetGeographicAddress(), VaLinearityCalScheme::GetLinearizedVA(), GetMasterChannel(), RawCrateMonitorBlock::GetMasterMonitor(), GetMinderChannel(), RawChip::GetNanosec(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetPulserBox(), RawReadout::GetReadoutType(), HardwareComponent::GetStripEndsForCrate(), 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(), ElecChannel::PrintSummary(), DQRawDigits::Process(), DQLightInjection::Process(), DQHotColdElectronics::Process(), SimVaTimedElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), SimQieElectronics::ReadoutDetector(), UberModuleLite::Reco(), UberModule::Reco(), AlgStripSRList::RunAlg(), AlgMCDigit::RunAlg(), AlgDigit::RunAlg(), AlgCalDetSI::RunAlg(), AlgCaldetDigit::RunAlg(), TridModelCrate::ShouldContain(), PlexRawChannelToPinDiode::Store(), PlexRawChannelReadoutType::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]
 

Definition at line 57 of file RawChannelId.h.

Referenced by RawTofConverter::AbandonRawTOFBlock(), PulserSummary::Add(), PulserNearDigit::Add(), PulserFromRawSummaryList::Add(), PulserSummary::AddDigit(), PEGainMuxBox::AddOtherHit(), PEGainMuxBox::AddRealHit(), CDPreFilterModule::FilterOnSnarlSize(), HardwareComponent::HardwareComponent(), AlgFilterDigitList::MakeBadChannelMap(), OltNewModule::OltNewModule(), SimQieElectronics::ReadoutPmt(), OltNewModule::Reco(), DbuVaChipSpars::Store(), and DbuVaChipPeds::Store().

00057 { return fEncoded; }

UShort_t RawChannelId::GetGeographicAddress  )  const
 

Definition at line 355 of file RawChannelId.cxx.

References GetChAdd(), and GetElecType().

Referenced by AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), RawCrateMonitorBlock::GetMasterMonitor(), PhotonStatSummarizer::LoadDataFromDB(), TridModelCrate::Print(), AlgFilterDigitList::RunAlg(), and PlexRawChannelToPinDiode::Store().

00356 {
00357    if ( GetElecType() != ElecType::kQIE ) return badUShort;
00358 
00359    return ( GetChAdd() >> shiftQieGeoAddr ) & maskQieGeoAddr;
00360 }

UShort_t RawChannelId::GetMaster  )  const [inline]
 

Definition at line 74 of file RawChannelId.h.

Referenced by NtpSRModule::FillNtpDataQuality(), RawChip::GetMaster(), RawReadout::GetReadoutType(), CandDeadChipHandle::IsSameChip(), RawChip::IsSameMaster(), StripStat::Print(), and ElecChannel::PrintSummary().

00074 {return GetGeographicAddress();}

UShort_t RawChannelId::GetMasterChannel  )  const
 

Definition at line 363 of file RawChannelId.cxx.

References GetChAdd(), and GetElecType().

Referenced by AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), PhotonStatSummarizer::LoadDataFromDB(), TridModelCrate::Print(), AlgFilterDigitList::RunAlg(), and PlexRawChannelToPinDiode::Store().

00364 {
00365    if ( GetElecType() != ElecType::kQIE ) return badUShort;
00366 
00367    return ( GetChAdd() >> shiftQieMasterCh ) & maskQieMasterCh;
00368 }

UShort_t RawChannelId::GetMenu  )  const [inline]
 

Definition at line 76 of file RawChannelId.h.

Referenced by NtpSRModule::FillNtpDataQuality(), RawChip::GetMenu(), RawReadout::GetPulserBox(), RawReadout::GetReadoutType(), CandDeadChipHandle::IsSameChip(), RawChip::IsSameMenu(), StripStat::Print(), and ElecChannel::PrintSummary().

00076 {return GetMinderChannel();}

UShort_t RawChannelId::GetMinder  )  const [inline]
 

Definition at line 75 of file RawChannelId.h.

Referenced by NtpSRModule::FillNtpDataQuality(), RawChip::GetMinder(), RawReadout::GetReadoutType(), CandDeadChipHandle::IsSameChip(), RawChip::IsSameMinder(), StripStat::Print(), and ElecChannel::PrintSummary().

00075 {return GetMasterChannel();}

UShort_t RawChannelId::GetMinderChannel  )  const
 

Definition at line 371 of file RawChannelId.cxx.

References GetChAdd(), and GetElecType().

Referenced by AsString(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), PhotonStatSummarizer::LoadDataFromDB(), AlgFilterDigitList::RunAlg(), and PlexRawChannelToPinDiode::Store().

00372 {
00373    if ( GetElecType() != ElecType::kQIE ) return badUShort;
00374 
00375    return ( GetChAdd() >> shiftQieMinderCh ) & maskQieMinderCh;
00376 }

Bool_t RawChannelId::GetPedMode  )  const
 

Definition at line 317 of file RawChannelId.cxx.

References fEncoded.

Referenced by AsString(), RawVtmTimeInfoBlock::GetPedMode(), RawQieLookUpTableBlock::GetPedMode(), RawQieDataBlock::GetPedMode(), RawQieCalibrationDataBlock::GetPedMode(), RawLinearizedDataBlock::GetPedMode(), RawCurrentInjectDataBlock::GetPedMode(), and RawCrateMonitorBlock::GetPedMode().

00318 {
00319    //
00320    return (fEncoded & maskPedMode) ? 1 : 0 ;
00321 }

Bool_t RawChannelId::GetSparsMode  )  const
 

Definition at line 324 of file RawChannelId.cxx.

References fEncoded.

Referenced by AsString(), RawVtmTimeInfoBlock::GetSparsMode(), RawQieLookUpTableBlock::GetSparsMode(), RawQieDataBlock::GetSparsMode(), RawQieCalibrationDataBlock::GetSparsMode(), RawLinearizedDataBlock::GetSparsMode(), RawCurrentInjectDataBlock::GetSparsMode(), and RawCrateMonitorBlock::GetSparsMode().

00325 {
00326    //
00327    return (fEncoded & maskSparsMode) ? 1 : 0 ;
00328 }

UShort_t RawChannelId::GetVaAdcSel  )  const
 

Definition at line 403 of file RawChannelId.cxx.

References GetChAdd(), and GetElecType().

Referenced by TimeCalibratorSRModule::Ana(), RateSummary::Ana(), LISummaryAnalyser::Ana(), LIRawNt::Ana(), FitTrackMSListModule::Ana(), FarPlaneCheckout::Ana(), FarDetTpSinglesDump::Ana(), FarDetStripListModule::Ana(), FarDetShieldPlankListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), CDAnaModule::Ana(), AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpSRModule::FillNtpStrip(), NtpEMModule::FillNtpStrip(), CDPreFilterModule::FilterSnarlForErrors(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), SexyPedReco::GetSexyPedestals(), RawSparsifierTableBlock::GetThresholdValue(), RawChip::GetVaadc(), CandDeadChipHandle::IsSameChip(), VaDigit::IsSamePmt(), RawChip::IsSameVaadc(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeBoxIndex(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), TridModelCrate::Print(), ElecChannel::PrintSummary(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), AlgFilterDigitListAB::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), ShieldGeom::SetupShieldGeom(), PlexRawChannelToPinDiode::Store(), DbuVaChipSpars::Store(), DbuVaChipPeds::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 GetChAdd(), and GetElecType().

Referenced by RawChip::AddChannel(), LIRawNt::Ana(), FitTrackMSListModule::Ana(), FarPlaneCheckout::Ana(), FarDetTpSinglesDump::Ana(), FarDetStripListModule::Ana(), FarDetShieldPlankListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), CDAnaModule::Ana(), AsString(), DmxUtilities::FillHitPixels(), NtpSRModule::FillNtpShieldStrip(), DmxUtilities::FillPlaneArray(), CDPreFilterModule::FilterSnarlForErrors(), VaDigit::GetCrossTalk(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetPulserBox(), RawReadout::GetReadoutType(), Plexus::GetReadoutType(), SexyPedReco::GetSexyPedestals(), RawSparsifierTableBlock::GetThresholdValue(), AlgFilterDigitListAB::IsPmt(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), ElecChannel::PrintSummary(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), DemuxFast::Reco(), AlgFilterDigitListAB::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::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 GetChAdd(), and GetElecType().

Referenced by TimeCalibratorSRModule::Ana(), RateSummary::Ana(), LISummaryAnalyser::Ana(), LIRawNt::Ana(), FitTrackMSListModule::Ana(), FarPlaneCheckout::Ana(), FarDetTpSinglesDump::Ana(), FarDetStripListModule::Ana(), FarDetShieldPlankListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), CDAnaModule::Ana(), AsString(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), DmxUtilities::FillHitPixels(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpSRModule::FillNtpStrip(), NtpEMModule::FillNtpStrip(), DmxUtilities::FillPlaneArray(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), RawPedestalTableBlock::GetPedValue(), LILookup::GetPinDiodePlanes(), RawReadout::GetReadoutType(), SexyPedReco::GetSexyPedestals(), RawSparsifierTableBlock::GetThresholdValue(), CDTruthifier::GetTruthHitInfo(), RawChip::GetVaChip(), CandDeadChipHandle::IsSameChip(), VaDigit::IsSamePmt(), RawChip::IsSameVaChip(), AlgFilterDigitListAB::IsTpmt(), PhotonStatSummarizer::LoadDataFromDB(), PEGainModule::makeChannelIndex(), LIPlexMaps::PlotPlexStripMap(), ElecChannel::PrintSummary(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), LIPlexMaps::ReadDbGains(), DemuxFast::Reco(), AlgFilterDigitListAB::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), ShieldGeom::SetupShieldGeom(), PlexRawChannelToPinDiode::Store(), DbuVaChipSpars::Store(), DbuVaChipPeds::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 GetChAdd(), and GetElecType().

Referenced by TimeCalibratorSRModule::Ana(), RateSummary::Ana(), LISummaryAnalyser::Ana(), LIRawNt::Ana(), FitTrackMSListModule::Ana(), FarPlaneCheckout::Ana(), FarDetTpSinglesDump::Ana(), FarDetStripListModule::Ana(), FarDetShieldPlankListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), CDAnaModule::Ana(), AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpSRModule::FillNtpStrip(), NtpEMModule::FillNtpStrip(), CDPreFilterModule::FilterSnarlForErrors(), RawTpSinglesSummaryBlock::FormatToOStream(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), SexyPedReco::GetSexyPedestals(), 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(), ElecChannel::PrintSummary(), FarDetDataQualityModule::ProcessBlock(), CalVaLinearity::Rcid2Index(), SimVaTimedElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), AlgFilterDigitListAB::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), ShieldGeom::SetupShieldGeom(), PlexRawChannelToPinDiode::Store(), DbuVaChipSpars::Store(), DbuVaChipPeds::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 GetChAdd(), and GetElecType().

Referenced by RawTpSinglesSummaryBlock::FormatToOStream(), and ElecChannel::PrintSummary().

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 GetChAdd(), and GetElecType().

Referenced by TimeCalibratorSRModule::Ana(), RateSummary::Ana(), LISummaryAnalyser::Ana(), LIRawNt::Ana(), FitTrackMSListModule::Ana(), FarPlaneCheckout::Ana(), FarDetTpSinglesDump::Ana(), FarDetStripListModule::Ana(), FarDetShieldPlankListModule::Ana(), FarDetRawRateDump::Ana(), FarDetRawDigitDump::Ana(), CDAnaModule::Ana(), AsString(), TridCratePage::ChannelToCoords(), Cutter::FillChipsToCut(), NtpMaker::FillDataQualityInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), NtpSRModule::FillNtpStrip(), NtpEMModule::FillNtpStrip(), CDPreFilterModule::FilterOnSnarlSize(), CDPreFilterModule::FilterSnarlForErrors(), LISummarySorter::GetElecString(), LIPlexMaps::GetElecString(), LISummarySorter::GetElectronicsData(), PulserTimeDrift::GetIndex(), RawPedestalTableBlock::GetPedValue(), RawReadout::GetReadoutType(), SexyPedReco::GetSexyPedestals(), 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(), SimVaTimedElectronics::ReadoutDetector(), SimVaElectronics::ReadoutDetector(), AlgFilterDigitListAB::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), ShieldGeom::SetupShieldGeom(), PlexRawChannelToPinDiode::Store(), DbuVaChipSpars::Store(), DbuVaChipPeds::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(), and SetElecType().

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
 

Definition at line 534 of file RawChannelId.cxx.

References defaultRawChannelId, and fEncoded.

Referenced by VaLinearityCalScheme::DecalVALinearity(), RawVtmTimeInfoBlock::FillCrateId(), RawQieLookUpTableBlock::FillCrateId(), RawQieDataBlock::FillCrateId(), RawQieCalibrationDataBlock::FillCrateId(), RawLinearizedDataBlock::FillCrateId(), RawCurrentInjectDataBlock::FillCrateId(), RawCrateMonitorBlock::FillCrateId(), RerootToRawDataModule::Get(), PulserTimeDrift::GetIndex(), VaLinearityCalScheme::GetLinearizedVA(), SimVaTimedElectronics::ReadoutPmt(), SimVaElectronics::ReadoutPmt(), DbuDaqMonitorModule::WriteVaChipPedsEntry(), and DbuDaqMonitorModule::WriteVaChipSparsEntry().

00535 { 
00536    // test whether this is the nonsensical default value
00537    return (fEncoded&~maskRCIDVersion) == (defaultRawChannelId&~maskRCIDVersion);
00538 }

Bool_t RawChannelId::IsSameChannel const RawChannelId other  )  const
 

Definition at line 447 of file RawChannelId.cxx.

References fEncoded.

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, 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, and zeroModeBits.

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, and zeroModeBits.

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, zeroModeBits, and zeroVaVaChannel.

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(), and option.

Referenced by LILookup::GetPinDiodePlanes(), and LIPlexMaps::ReadDbGains().

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

void RawChannelId::SetChAdd UInt_t  chadd  ) 
 

Definition at line 620 of file RawChannelId.cxx.

References fEncoded.

Referenced by Cutter::FillChipsToCut(), HardwareComponent::HardwareComponent(), 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.

Referenced by UberModuleLite::Reco(), and UberModule::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.

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

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

void RawChannelId::SetDetector Detector::Detector_t  detector  ) 
 

Definition at line 541 of file RawChannelId.cxx.

References fEncoded, and shiftDetector.

Referenced by RawQieDataBlock::FillCrateId(), RawQieCalibrationDataBlock::FillCrateId(), RawLinearizedDataBlock::FillCrateId(), RawCurrentInjectDataBlock::FillCrateId(), Init(), RawChannelId(), UberModuleLite::Reco(), and UberModule::Reco().

00542 {
00543    fEncoded = (fEncoded & zeroDetector) | 
00544       ( ( detector <<  shiftDetector ) & maskDetector );
00545 
00546    if (shiftDetector == 24) fEncoded |= maskRCIDVersion;
00547 }

void RawChannelId::SetElecType ElecType::Elec_t  etype  ) 
 

Definition at line 550 of file RawChannelId.cxx.

References fEncoded.

Referenced by RawTpSinglesSummaryBlock::FormatToOStream(), Init(), UberModuleLite::Reco(), and UberModule::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(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForCrate(), UberModuleLite::Reco(), and UberModule::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(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForMaster(), HardwareComponent::HardwareComponent(), UberModuleLite::Reco(), and UberModule::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  ) 
 

Definition at line 645 of file RawChannelId.cxx.

References CheckElecType(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForMinder(), HardwareComponent::HardwareComponent(), UberModuleLite::Reco(), UberModule::Reco(), TridModelCrate::ShouldContain(), and TridModelCrate::TridModelCrate().

00646 {
00647    if (!CheckElecType(ElecType::kQIE,"SetMinderChannel")) return;
00648 
00649    fEncoded = ( fEncoded & zeroQieMinderCh ) |
00650               ( (minder  & maskQieMinderCh) << shiftQieMinderCh ) ;
00651 }

void RawChannelId::SetModeBits Bool_t  commonmode,
Bool_t  sparsmode,
Bool_t  pedmode
 

Definition at line 587 of file RawChannelId.cxx.

References fEncoded.

Referenced by RawLITimingSummary::BuildRawChannelId(), RawLIAdcSummary::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.

Referenced by UberModuleLite::Reco(), and UberModule::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.

Referenced by UberModuleLite::Reco(), and UberModule::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(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForVmm(), HardwareComponent::HardwareComponent(), UberModuleLite::Reco(), and UberModule::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  ) 
 

Definition at line 690 of file RawChannelId.cxx.

References CheckElecType(), and fEncoded.

Referenced by RateSummary::Ana(), RawDeadChipBlock::ChipWasDead(), DbuVaChipPeds::DbuVaChipPeds(), DbuVaChipSpars::DbuVaChipSpars(), RawDeadChipBlock::FillDeadChannels(), LILookup::GetPinDiodePlanes(), HardwareComponent::GetStripEndsForVaChip(), HardwareComponent::HardwareComponent(), UberModuleLite::Reco(), UberModule::Reco(), TridModelCrate::ShouldContain(), and TridModelCrate::TridModelCrate().

00691 {
00692    if (!CheckElecType(ElecType::kVA,"SetVaChannel")) return;
00693 
00694    fEncoded = ( fEncoded & zeroVaVaChannel ) |
00695               ( (vachan & maskVaVaChannel) << shiftVaVaChannel ) ;
00696 }

void RawChannelId::SetVaChip UInt_t  vachip  ) 
 

Definition at line 681 of file RawChannelId.cxx.

References CheckElecType(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForVfb(), HardwareComponent::HardwareComponent(), PEGainMuxBox::New(), UberModuleLite::Reco(), UberModule::Reco(), TridModelCrate::ShouldContain(), and TridModelCrate::TridModelCrate().

00682 {
00683    if (!CheckElecType(ElecType::kVA,"SetVaChip")) return;
00684 
00685    fEncoded = ( fEncoded & zeroVaVaChip ) |
00686               ( (vachip & maskVaVaChip) << shiftVaVaChip ) ;
00687 }

void RawChannelId::SetVarcId UInt_t  varc  ) 
 

Definition at line 654 of file RawChannelId.cxx.

References CheckElecType(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForCrate(), UberModuleLite::Reco(), and UberModule::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(), and fEncoded.

Referenced by HardwareComponent::GetStripEndsForVarc(), HardwareComponent::HardwareComponent(), UberModuleLite::Reco(), and UberModule::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]
 

Definition at line 169 of file RawChannelId.h.

00170 { 
00171   lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00172   return lhs.fEncoded != rhs.fEncoded; 
00173 }

Bool_t operator< const RawChannelId lhs,
const RawChannelId rhs
[friend]
 

Definition at line 157 of file RawChannelId.h.

00158 { 
00159   lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00160   return lhs.fEncoded < rhs.fEncoded; 
00161 }

Bool_t operator== const RawChannelId lhs,
const RawChannelId rhs
[friend]
 

Definition at line 163 of file RawChannelId.h.

00164 { 
00165   lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00166   return lhs.fEncoded == rhs.fEncoded; 
00167 }


Member Data Documentation

UInt_t RawChannelId::fEncoded [protected]
 

Definition at line 148 of file RawChannelId.h.

Referenced by ClearModeBits(), ConvertToVersion2(), GetChAdd(), GetCommonMode(), GetCrate(), GetDetector(), GetElecType(), GetPedMode(), GetSparsMode(), Init(), IsNull(), IsSameChannel(), IsSameCrate(), IsSameMinder(), IsSameVAChip(), IsSameVfb(), operator!=(), operator<(), operator==(), RawChannelId(), SetChAdd(), SetCommonMode(), SetCrate(), SetDetector(), SetElecType(), SetGeographicAddress(), SetMasterChannel(), SetMinderChannel(), SetModeBits(), SetPedMode(), SetSparsMode(), SetVaAdcSel(), SetVaChannel(), SetVaChip(), SetVarcId(), and SetVmm().


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:03:10 2008 for loon by  doxygen 1.3.9.1