#include <RawChannelId.h>
Public Member Functions | |
| RawChannelId () | |
| RawChannelId (DetectorType::Detector_t detector, ElecType::Elec_t etype, UInt_t crate, UInt_t chadd) | |
| RawChannelId (DetectorType::Detector_t detector, ElecType::Elec_t etype, UInt_t crate, UInt_t geoaddr, UInt_t masterChan, UInt_t minderChan) | |
| RawChannelId (DetectorType::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 (DetectorType::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 |
| DetectorType::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 (DetectorType::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 (DetectorType::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) |
|
|
Definition at line 177 of file RawChannelId.h. References defaultRawChannelId. 00177 : fEncoded(defaultRawChannelId) { ; }
|
|
||||||||||||||||||||
|
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 }
|
|
||||||||||||||||||||||||||||
|
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 }
|
|
||||||||||||||||||||||||||||||||||||
|
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 }
|
|
||||||||||||||||
|
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 }
|
|
|
Definition at line 53 of file RawChannelId.h. 00053 { ; } // no owned data members
|
|
|
Definition at line 178 of file RawChannelId.h. 00178 : fEncoded(encoded) { ; }
|
|
|
Definition at line 221 of file RawChannelId.cxx. References ElecType::AsString(), DetectorType::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(), 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(), RawDigitDataBlock::PostFillRawDigits(), TridModelDigits::Print(), TridModelCrate::PrintToDigitText(), 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 = DetectorType::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 }
|
|
||||||||||||||||||||||||
|
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 }
|
|
||||||||||||||||
|
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 }
|
|
||||||||||||
|
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 }
|
|
|
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(), RawDigitDataBlock::PostFillRawDigits(), FiltSGateModule::ProcessDigitDataBlks(), and AlgFilterDigitList::RunAlg(). 00608 {
00609 fEncoded &= zeroModeBits;
00610 }
|
|
|
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 = DetectorType::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 }
|
|
|
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 }
|
|
||||||||||||||||||||||||||||
|
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 }
|
|
||||||||||||||||||||
|
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 }
|
|
||||||||||||
|
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 }
|
|
|
Definition at line 347 of file RawChannelId.cxx. References fEncoded. Referenced by LISummarySorter::AddEntry(), Detector::AddEntry(), RerootToRawDataModule::AddToCrate(), AsString(), LISummarySorter::GetElectronicsData(), GetGeographicAddress(), GetMasterChannel(), GetMinderChannel(), PlexusReroot::GetSEIdAltL(), GetVaAdcSel(), GetVaChannel(), GetVaChip(), GetVarcId(), GetVfb(), GetVmm(), DetSim::PackQieDigit(), DetSim::PackVaDigit(), LIPlexMaps::PrintPlexPinDiodeInfo(), RawDeadChipBlock::RawDeadChipBlock(), LIPlexMaps::ReadDbPulserDriftPin(), OltRawLI::Reco(), PlexRawChannelReadoutType::Store(), PlexPixelToRawChannel::Store(), and Detector::Update(). 00348 {
00349 //
00350
00351 return ( fEncoded & maskChAdd ) >> shiftChAdd;
00352 }
|
|
|
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 }
|
|
|
|
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(), Calibrator::GetTDCConvert(), and Plexus::ValidateConsistency(). 00296 {
00297 //
00298
00299 if (! (fEncoded & maskRCIDVersion) ) ConvertToVersion2();
00300
00301 UInt_t bitField = ( fEncoded & maskDetector ) >> shiftDetector;
00302
00303 return (DetectorType::Detector_t) bitField;
00304 }
|
|
|
|
|
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(), TridModelCrate::PrintToDigitText(), AlgFilterDigitList::RunAlg(), and PlexRawChannelToPinDiode::Store(). 00356 {
00357 if ( GetElecType() != ElecType::kQIE ) return badUShort;
00358
00359 return ( GetChAdd() >> shiftQieGeoAddr ) & maskQieGeoAddr;
00360 }
|
|
|
Definition at line 74 of file RawChannelId.h. 00074 {return GetGeographicAddress();}
|
|
|
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(), TridModelCrate::PrintToDigitText(), AlgFilterDigitList::RunAlg(), and PlexRawChannelToPinDiode::Store(). 00364 {
00365 if ( GetElecType() != ElecType::kQIE ) return badUShort;
00366
00367 return ( GetChAdd() >> shiftQieMasterCh ) & maskQieMasterCh;
00368 }
|
|
|
Definition at line 76 of file RawChannelId.h. 00076 {return GetMinderChannel();}
|
|
|
Definition at line 75 of file RawChannelId.h. 00075 {return GetMasterChannel();}
|
|
|
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(), AlgFilterDigitList::RunAlg(), and PlexRawChannelToPinDiode::Store(). 00372 {
00373 if ( GetElecType() != ElecType::kQIE ) return badUShort;
00374
00375 return ( GetChAdd() >> shiftQieMinderCh ) & maskQieMinderCh;
00376 }
|
|
|
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 }
|
|
|
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 }
|
|
|
|
|
|
|
Definition at line 387 of file RawChannelId.cxx. References GetChAdd(), and GetElecType(). Referenced by RawTpSinglesSummaryBlock::FormatToOStream(), and PulserTimeDrift::GetIndex(). 00388 {
00389 if ( GetElecType() != ElecType::kVA ) return badUShort;
00390
00391 return ( GetChAdd() >> shiftVaVfb ) & maskVaVfb;
00392 }
|
|
|
||||||||||||||||||||
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
Definition at line 427 of file RawChannelId.cxx. References FormatToOStream(), and option. Referenced by LILookup::GetPinDiodePlanes(). 00428 {
00429 FormatToOStream(cout,option);
00430
00431 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
||||||||||||||||
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
|
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 }
|
|
||||||||||||
|
Definition at line 169 of file RawChannelId.h. 00170 {
00171 lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00172 return lhs.fEncoded != rhs.fEncoded;
00173 }
|
|
||||||||||||
|
Definition at line 157 of file RawChannelId.h. 00158 {
00159 lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00160 return lhs.fEncoded < rhs.fEncoded;
00161 }
|
|
||||||||||||
|
Definition at line 163 of file RawChannelId.h. 00164 {
00165 lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00166 return lhs.fEncoded == rhs.fEncoded;
00167 }
|
|
1.3.9.1