#include <DQHotColdElectronics.h>
Public Member Functions | |
| DQHotColdElectronics () | |
| DQHotColdElectronics (const DQHotColdElectronics &rhs) | |
| ~DQHotColdElectronics () | |
| void | Process (RawTpSinglesSummaryBlock *rdb) |
| Int_t | GetTime () const |
| Int_t | GetSource () const |
| Int_t | GetNumberOfCrates () const |
| Int_t | GetNumberOfCratesInReadout () const |
| Int_t | GetColdChips (Int_t sm=0) const |
| Int_t | GetHotChips (Int_t sm=0) const |
| Int_t | GetLast () const |
| TObject * | At (Int_t i) const |
Private Member Functions | |
| ClassDef (DQHotColdElectronics, 1) | |
Private Attributes | |
| Int_t | fTime |
| Int_t | fSource |
| Int_t | fNumberOfCrates |
| Int_t | fNumberOfCratesInReadout |
| Double_t | fFrameTime |
| Int_t | fColdChipMask [2] |
| Int_t | fHotChipMask [2] |
| RawReadout * | fRawReadout |
| TObjArray * | fHotColdElectronicsList |
|
|
Definition at line 14 of file DQHotColdElectronics.cxx. 00014 : 00015 fTime(-1), 00016 fSource(-1), 00017 fNumberOfCrates(-1), 00018 fNumberOfCratesInReadout(-1), 00019 fFrameTime(0.0), 00020 fRawReadout(0), 00021 fHotColdElectronicsList(0) 00022 { 00023 for(Int_t k=0; k<2; k++){ 00024 fColdChipMask[k]=0; fHotChipMask[k]=0; 00025 } 00026 00027 fRawReadout = new RawReadout(); 00028 00029 fHotColdElectronicsList = new TObjArray(); 00030 }
|
|
|
Definition at line 32 of file DQHotColdElectronics.cxx. References fColdChipMask, and fHotChipMask. 00032 : 00033 TObject(rhs), 00034 fTime(rhs.fTime), 00035 fSource(rhs.fSource), 00036 fNumberOfCrates(rhs.fNumberOfCrates), 00037 fNumberOfCratesInReadout(rhs.fNumberOfCratesInReadout), 00038 fFrameTime(rhs.fFrameTime), 00039 fRawReadout(rhs.fRawReadout), 00040 fHotColdElectronicsList(rhs.fHotColdElectronicsList) 00041 { 00042 for(Int_t k=0; k<2; k++){ 00043 fColdChipMask[k]=rhs.fColdChipMask[k]; 00044 fHotChipMask[k]=rhs.fHotChipMask[k]; 00045 } 00046 }
|
|
|
Definition at line 48 of file DQHotColdElectronics.cxx. References fHotColdElectronicsList. 00049 {
00050 delete fRawReadout;
00051
00052 fHotColdElectronicsList->Delete();
00053 delete fHotColdElectronicsList;
00054 }
|
|
|
Definition at line 247 of file DQHotColdElectronics.cxx. References fHotColdElectronicsList. Referenced by AlgDataQuality::RunAlg(). 00248 {
00249 return (TObject*)(fHotColdElectronicsList->At(i));
00250 }
|
|
||||||||||||
|
|
|
|
Definition at line 226 of file DQHotColdElectronics.cxx. References fColdChipMask. Referenced by DumpBadElectronics::WriteOutResults(). 00227 {
00228 if( sm==0 ) return fColdChipMask[0]+fColdChipMask[1];
00229 if( sm==1 ) return fColdChipMask[0];
00230 if( sm==2 ) return fColdChipMask[1];
00231 return -1;
00232 }
|
|
|
Definition at line 234 of file DQHotColdElectronics.cxx. References fHotChipMask. Referenced by DumpBadElectronics::WriteOutResults(). 00235 {
00236 if( sm==0 ) return fHotChipMask[0]+fHotChipMask[1];
00237 if( sm==1 ) return fHotChipMask[0];
00238 if( sm==2 ) return fHotChipMask[1];
00239 return -1;
00240 }
|
|
|
Definition at line 242 of file DQHotColdElectronics.cxx. References fHotColdElectronicsList. Referenced by Process(), and AlgDataQuality::RunAlg(). 00243 {
00244 return fHotColdElectronicsList->GetLast();
00245 }
|
|
|
Definition at line 216 of file DQHotColdElectronics.cxx. Referenced by AlgDataQuality::RunAlg(), and DumpBadElectronics::WriteOutResults(). 00217 {
00218 return fNumberOfCrates;
00219 }
|
|
|
Definition at line 221 of file DQHotColdElectronics.cxx. Referenced by AlgDataQuality::RunAlg(), and DumpBadElectronics::WriteOutResults(). 00222 {
00223 return fNumberOfCratesInReadout;
00224 }
|
|
|
Definition at line 211 of file DQHotColdElectronics.cxx. 00212 {
00213 return fSource;
00214 }
|
|
|
Definition at line 206 of file DQHotColdElectronics.cxx. Referenced by DumpBadElectronics::Ana(), AlgDataQuality::RunAlg(), and DumpBadElectronics::WriteOutResults(). 00207 {
00208 return fTime;
00209 }
|
|
|
Definition at line 56 of file DQHotColdElectronics.cxx. References fColdChipMask, fFrameTime, fHotChipMask, fHotColdElectronicsList, fNumberOfCrates, fNumberOfCratesInReadout, fRawReadout, fSource, fTime, RawChannelId::GetCrate(), RawChannelId::GetElecType(), RawTpSinglesSummaryBlock::GetEndTimeStamp(), RawTpSinglesSummaryBlock::GetHitsPerSecByCrate(), GetLast(), VldTimeStamp::GetNanoSec(), RawTpSinglesSummaryBlock::GetNumberOfCrates(), RawTpSinglesSummaryBlock::GetRates(), RawReadout::GetReadoutType(), VldTimeStamp::GetSec(), RawTpSinglesSummaryBlock::GetSource(), RawTpSinglesSummaryBlock::GetStartTimeStamp(), and MSG. Referenced by DumpBadElectronics::ProcessBlock(), and DataQualityReader::ProcessBlock(). 00057 {
00058 MSG("DataQuality",Msg::kVerbose) << " DQHotColdElectronics::Process(RawTpSinglesSummaryBlock) " << endl;
00059
00060 // Min/Max Singles Rates
00061 // =====================
00062 // Far Detector: normal rates are [50,5000] Hz
00063 // Near Detector: normal rates are [0,100000] Hz
00064
00065 Int_t fMinVaRate=50;
00066 Int_t fMaxVaRate=5000;
00067 Int_t fMinQieRate=0;
00068 Int_t fMaxQieRate=100000;
00069
00070 // TpSinglesSummaryBlock Source
00071 // ============================
00072 // Extract the TP singles measurement parameters
00073 // [time stamp, frame time (end-start), number of crates (ROP mask)]
00074
00075 fTime=rdb->GetStartTimeStamp().GetSec();
00076 fFrameTime=(rdb->GetEndTimeStamp().GetSec()-rdb->GetStartTimeStamp().GetSec())+1.0e-9*(rdb->GetEndTimeStamp().GetNanoSec()-rdb->GetStartTimeStamp().GetNanoSec());
00077 fNumberOfCrates=rdb->GetNumberOfCrates();
00078 fNumberOfCratesInReadout=0;
00079
00080 for(Int_t k=0;k<fNumberOfCrates;k++){
00081 if( rdb->GetHitsPerSecByCrate(k)>0 ) fNumberOfCratesInReadout++;
00082 }
00083
00084 MSG("DataQuality",Msg::kVerbose) << " Time=" << fTime << endl;
00085 MSG("DataQuality",Msg::kVerbose) << " FrameTime=" << fFrameTime << endl;
00086 MSG("DataQuality",Msg::kVerbose) << " NumberOfCrates=" << fNumberOfCrates << endl;
00087 MSG("DataQuality",Msg::kVerbose) << " NumberOfCratesInReadout=" << fNumberOfCratesInReadout << endl;
00088
00089 if( fFrameTime<=0 ){
00090 MSG("DataQuality",Msg::kWarning) << " WARNING: TP summary frame time is corrupted " << endl;
00091 }
00092
00093 // TpSinglesSummaryBlock Source
00094 // ============================
00095 // Extract the detector/electronics type and the granularity
00096 // at which the rates have been recorded - only rates at the
00097 // VA chip and QIE menu level can be handled currently.
00098
00099 fSource=rdb->GetSource();
00100 MSG("DataQuality",Msg::kVerbose) << " Source=" << fSource << endl;
00101
00102 Detector::Detector_t fDetector(Detector::kUnknown);
00103
00104 switch( fSource ){
00105 case 0: // Crate only
00106 fDetector = Detector::kUnknown;
00107 break;
00108 case 1: // Crate and VARC (VA)
00109 fDetector = Detector::kFar;
00110 break;
00111 case 2: // Crate and VFB/ADCSEL (VA)
00112 fDetector = Detector::kFar;
00113 break;
00114 case 3: // Crate and VACHIP (VA)
00115 fDetector = Detector::kFar;
00116 break;
00117 case 4: // Crate and Plane
00118 fDetector = Detector::kUnknown;
00119 break;
00120 case 5: // Crate and MASTER (QIE)
00121 fDetector = Detector::kNear;
00122 break;
00123 case 6: // Crate and MINDER (QIE)
00124 fDetector = Detector::kNear;
00125 break;
00126 case 7: // Crate and MENU (QIE)
00127 fDetector = Detector::kNear;
00128 break;
00129 default:
00130 break;
00131 }
00132
00133 // Reset the hot/cold chip masks
00134 for(Int_t k=0;k<2;k++){
00135 fColdChipMask[k]=0; fHotChipMask[k]=0;
00136 }
00137
00138 // Reset the lists of hot/cold chips
00139 fHotColdElectronicsList->Delete();
00140
00141 // Iterate over raw channels and record any hot/cold chips
00142 typedef std::map<RawChannelId,UInt_t> RCIdToRateMap;
00143 const RCIdToRateMap& rates = rdb->GetRates();
00144 RCIdToRateMap::const_iterator rateItr = rates.begin();
00145 RCIdToRateMap::const_iterator rateEnd = rates.end();
00146 while ( rateItr != rateEnd ) {
00147 RawChannelId rawch = rateItr->first;
00148 Int_t rawrate = rateItr->second;
00149 Int_t correctedrate = (Int_t)(rawrate/fFrameTime);
00150 Int_t rate = correctedrate;
00151 Int_t crate = rawch.GetCrate();
00152
00153 RawReadout::ReadoutType_t readout = fRawReadout->GetReadoutType(rawch);
00154
00155 // Near Detector, QIE Electronics (Source 7 - QIE Menus)
00156 if( fSource==7
00157 && fDetector==Detector::kNear && rawch.GetElecType()==ElecType::kQIE ){
00158
00159 if( readout==RawReadout::kDetector && rate<fMinQieRate){
00160 RawChip* chip = new RawChip(rawch,0,0,readout,RawChip::kCold,rate);
00161 fHotColdElectronicsList->Add(chip);
00162 if( crate>=0 && crate<8 ) fColdChipMask[0]++;
00163 }
00164
00165 if( readout==RawReadout::kDetector && rate>fMaxQieRate){
00166 RawChip* chip = new RawChip(rawch,0,0,readout,RawChip::kHot,rate);
00167 fHotColdElectronicsList->Add(chip);
00168 if( crate>=0 && crate<8 ) fHotChipMask[0]++;
00169 }
00170 }
00171
00172 // Far Detector, VA Electronics (Souce 3 - VA chips)
00173 // NB: there are currently no hot Veto Shield chips!
00174 if( fSource==3
00175 && fDetector==Detector::kFar && rawch.GetElecType()==ElecType::kVA ){
00176
00177 if( readout==RawReadout::kDetector && rate<fMinVaRate ){
00178 RawChip* chip = new RawChip(rawch,0,0,readout,RawChip::kCold,rate);
00179 fHotColdElectronicsList->Add(chip);
00180 if( crate>=0 && crate<8 ) fColdChipMask[0]++;
00181 if( crate>=8 && crate<16 ) fColdChipMask[1]++;
00182 }
00183
00184 if( readout==RawReadout::kDetector && rate>fMaxVaRate ){
00185 RawChip* chip = new RawChip(rawch,0,0,readout,RawChip::kHot,rate);
00186 fHotColdElectronicsList->Add(chip);
00187 if( crate>=0 && crate<8 ) fHotChipMask[0]++;
00188 if( crate>=8 && crate<16 ) fHotChipMask[1]++;
00189 }
00190
00191 if( readout==RawReadout::kVetoShield && rate<fMinVaRate ){
00192 RawChip* chip = new RawChip(rawch,0,0,readout,RawChip::kCold,rate);
00193 fHotColdElectronicsList->Add(chip);
00194 if( crate>=0 && crate<8 ) fColdChipMask[0]++;
00195 if( crate>=8 && crate<16 ) fColdChipMask[1]++;
00196 }
00197 }
00198
00199 rateItr++;
00200 }
00201
00202 MSG("DataQuality",Msg::kVerbose) << " Found " << 1+this->GetLast() << " hot/cold chips [cold=" << fColdChipMask[0]+fColdChipMask[1] << ", hot=" << fHotChipMask[0]+fHotChipMask[1] << "]" << endl;
00203
00204 }
|
|
|
Definition at line 46 of file DQHotColdElectronics.h. Referenced by DQHotColdElectronics(), GetColdChips(), and Process(). |
|
|
Definition at line 44 of file DQHotColdElectronics.h. Referenced by Process(). |
|
|
Definition at line 47 of file DQHotColdElectronics.h. Referenced by DQHotColdElectronics(), GetHotChips(), and Process(). |
|
|
Definition at line 51 of file DQHotColdElectronics.h. Referenced by At(), GetLast(), Process(), and ~DQHotColdElectronics(). |
|
|
Definition at line 42 of file DQHotColdElectronics.h. Referenced by Process(). |
|
|
Definition at line 43 of file DQHotColdElectronics.h. Referenced by Process(). |
|
|
Definition at line 49 of file DQHotColdElectronics.h. Referenced by Process(). |
|
|
Definition at line 41 of file DQHotColdElectronics.h. Referenced by Process(). |
|
|
Definition at line 40 of file DQHotColdElectronics.h. Referenced by Process(). |
1.3.9.1