#include <FarDetRawDigitDump.h>
Inheritance diagram for FarDetRawDigitDump:

Public Member Functions | |
| FarDetRawDigitDump () | |
| ~FarDetRawDigitDump () | |
| void | BeginJob () |
| JobCResult | Ana (const MomNavigator *mom) |
| const Registry & | DefaultConfig () const |
| void | Config (const Registry &r) |
| void | EndJob () |
Private Member Functions | |
| void | PrintRunSummary () |
Private Attributes | |
| TFile * | fFarDetRawDigitFile |
| TTree * | fFarDetRawDigitTree |
| Int_t | fMode |
| Int_t | date |
| Int_t | time |
| Int_t | run |
| Int_t | subrun |
| Int_t | snarl |
| Int_t | adc |
| Int_t | timeframe |
| Int_t | microsec |
| Int_t | nanosec |
| Int_t | runtype |
| Int_t | trigsrc |
| Int_t | crate |
| Int_t | varc |
| Int_t | vmm |
| Int_t | vaadc |
| Int_t | vachip |
| Int_t | vachannel |
| Int_t | side |
| Int_t | shld |
| Int_t | plane |
| Int_t | rawdigit |
| Int_t | libox |
| Int_t | deadchip |
| Int_t | tsec0 |
| Int_t | thetime |
| Int_t | ctr |
| Int_t | PlnMask [16][24] |
| Int_t | PlnChMask [22] |
| Int_t | ShldChMask [16][6][22] |
| Int_t | VaCh2LiBox [22] |
| Int_t | VaCh2Shld [16][6] |
|
|
Definition at line 29 of file FarDetRawDigitDump.cxx. 00029 : 00030 fFarDetRawDigitFile(0), 00031 fFarDetRawDigitTree(0), 00032 fMode(0), 00033 tsec0(-9999), 00034 ctr(0) 00035 { 00036 00037 }
|
|
|
Definition at line 39 of file FarDetRawDigitDump.cxx. 00040 {
00041
00042 }
|
|
|
Implement this for read only access to the MomNavigator Reimplemented from JobCModule. Definition at line 281 of file FarDetRawDigitDump.cxx. References adc, RawLiTpmtDigitsBlock::At(), crate, ctr, date, deadchip, fFarDetRawDigitFile, fFarDetRawDigitTree, fMode, MomNavigator::FragmentIter(), RawDigit::GetADC(), RawDigit::GetChannel(), RawChannelId::GetCrate(), RawDigitDataBlock::GetDatumIter(), RawRecord::GetName(), RawLiTpmtDigitsBlock::GetNumberOfDigits(), RawTpSinglesSummaryBlock::GetRates(), RawRecord::GetRawBlockIter(), RawRecord::GetRawHeader(), RawSnarlHeaderBlock::GetRun(), RawDaqHeaderBlock::GetRun(), RawDaqHeader::GetRun(), RawSnarlHeaderBlock::GetRunType(), RawDaqHeaderBlock::GetRunType(), RawSnarlHeaderBlock::GetSnarl(), RawDaqSnarlHeader::GetSnarl(), RawSnarlHeaderBlock::GetSubRun(), RawDaqHeaderBlock::GetSubRun(), RawDigit::GetTDC(), RawSnarlHeaderBlock::GetTimeFrameNum(), RawDaqHeaderBlock::GetTimeFrameNum(), RawDaqHeader::GetTimeFrameNum(), RawDaqHeaderBlock::GetTimeStamp(), VldContext::GetTimeStamp(), RawSnarlHeaderBlock::GetTriggerSource(), RawSnarlHeaderBlock::GetTriggerTime(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChannel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), RecMinosHdr::GetVldContext(), RawChannelId::GetVmm(), libox, microsec, MSG, nanosec, plane, PlnChMask, PlnMask, rawdigit, run, runtype, shld, ShldChMask, side, snarl, subrun, thetime, time, timeframe, trigsrc, tsec0, vaadc, VaCh2LiBox, VaCh2Shld, vachannel, vachip, varc, and vmm. 00282 {
00283 MSG("FarDetRawDigitDump",Msg::kDebug) << " *** FarDetRawDigitDump::Ana(...) *** (" << ctr << ")" << endl;
00284
00285 JobCResult result(JobCResult::kPassed);
00286
00287 Int_t flag,rate;
00288 Int_t tdc,tsec,tnanosec=0;
00289 Double_t t;
00290
00291 TObject* momobject = 0;
00292 TIter momitr(mom->FragmentIter());
00293 while((momobject = momitr())){
00294 if(momobject->InheritsFrom("RawRecord")){
00295 MSG("FarDetRawDigitDump",Msg::kDebug) << " *** NEXT RECORD *** " << endl;
00296 RawRecord* rawrec = dynamic_cast<RawRecord*>(momobject);
00297 flag=0;
00298
00299 TObject* obj = (TObject*)(rawrec->GetRawHeader());
00300 if(obj->InheritsFrom("RawDaqHeader")){
00301 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawDaqHeader " << endl;
00302 RawDaqHeader* hdr = (RawDaqHeader*)(obj);
00303 run = hdr->GetRun();
00304 snarl=-1;
00305 timeframe = hdr->GetTimeFrameNum();
00306 tsec = (Int_t)(1.000*((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec());
00307 if(tsec0<0) tsec0=tsec; tsec=tsec-tsec0;
00308 tnanosec = (Int_t)(1.000*((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetNanoSec());
00309 flag=1;
00310 }
00311
00312 if(obj->InheritsFrom("RawDaqSnarlHeader")){
00313 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawDaqSnarlHeader " << endl;
00314 RawDaqSnarlHeader* hdr = (RawDaqSnarlHeader*)(obj);
00315 run = hdr->GetRun();
00316 snarl = hdr->GetSnarl();
00317 timeframe = hdr->GetTimeFrameNum();
00318 tsec = (Int_t)(1.000*((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetSec());
00319 if(tsec0<0) tsec0=tsec; tsec=tsec-tsec0;
00320 tnanosec = (Int_t)(1.000*((VldTimeStamp)(hdr->GetVldContext().GetTimeStamp())).GetNanoSec());
00321 flag=1;
00322 }
00323
00324 TIter rawrecitr = rawrec->GetRawBlockIter();
00325 TObject *tob = 0;
00326 while((tob = rawrecitr())){
00327 MSG("FarDetRawDigitDump",Msg::kDebug) << tob->GetName() << endl;
00328
00329 if(tob->InheritsFrom("RawDaqHeaderBlock")){
00330 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawDaqHeaderBlock " << endl;
00331 RawDaqHeaderBlock* rdb = (RawDaqHeaderBlock*)(tob);
00332 run = rdb->GetRun();
00333 snarl = -1;
00334 subrun = rdb->GetSubRun();
00335 runtype = rdb->GetRunType();
00336 trigsrc = -1;
00337 timeframe = rdb->GetTimeFrameNum();
00338 tsec = (Int_t)(((VldTimeStamp)(rdb->GetTimeStamp())).GetSec());
00339 if(tsec0<0) tsec0=tsec; tsec=tsec-tsec0;
00340 tnanosec = (Int_t)(((VldTimeStamp)(rdb->GetTimeStamp())).GetNanoSec());
00341 date = (((VldTimeStamp)(rdb->GetTimeStamp())).GetSec()-1059696000)/(3600*24);
00342 time = (((VldTimeStamp)(rdb->GetTimeStamp())).GetSec()-1059696000)%(3600*24);
00343 flag=1;
00344 }
00345
00346 if(tob->InheritsFrom("RawSnarlHeaderBlock")){
00347 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawSnarlHeaderBlock " << endl;
00348 RawSnarlHeaderBlock* rdb = (RawSnarlHeaderBlock*)(tob);
00349 run = rdb->GetRun();
00350 subrun = rdb->GetSubRun();
00351 snarl = rdb->GetSnarl();
00352 runtype = rdb->GetRunType();
00353 trigsrc = rdb->GetTriggerSource();
00354 timeframe = rdb->GetTimeFrameNum();
00355 tsec = (Int_t)(((VldTimeStamp)(rdb->GetTriggerTime())).GetSec());
00356 if(tsec0<0) tsec0=tsec; tsec=tsec-tsec0;
00357 tnanosec = (Int_t)(((VldTimeStamp)(rdb->GetTriggerTime())).GetNanoSec());
00358 date = (((VldTimeStamp)(rdb->GetTriggerTime())).GetSec()-1059696000)/(3600*24);
00359 time = (((VldTimeStamp)(rdb->GetTriggerTime())).GetSec()-1059696000)%(3600*24);
00360 flag=1;
00361 }
00362
00363 if(flag){
00364 if(thetime<0||timeframe>=thetime+100){
00365 thetime=timeframe;
00366 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** " << timeframe << " seconds *** " << endl;
00367 }
00368 MSG("FarDetRawDigitDump",Msg::kDebug) << " -- r=" << run << " -- tf=" << timeframe << " -- s=" << snarl << " -- rt=" << runtype << " -- " << endl;
00369 if(!fFarDetRawDigitFile){
00370 //TString mystring("./results/fardet.debug");
00371 //mystring.Append("."); mystring+=run;
00372 //mystring.Append(".root");
00373 TString mystring("fardet.debug.root");
00374 TDirectory* tmpd = gDirectory;
00375 fFarDetRawDigitFile = new TFile(mystring.Data(),"RECREATE");
00376 fFarDetRawDigitTree = new TTree("RawTree","RawTree");
00377 fFarDetRawDigitTree->SetAutoSave(100);
00378 fFarDetRawDigitTree->Branch("date",&date,"date/I");
00379 fFarDetRawDigitTree->Branch("time",&time,"time/I");
00380 fFarDetRawDigitTree->Branch("run",&run,"run/I");
00381 fFarDetRawDigitTree->Branch("trigsrc",&trigsrc,"trigsrc/I");
00382 fFarDetRawDigitTree->Branch("snarl",&snarl,"snarl/I");
00383 fFarDetRawDigitTree->Branch("crate",&crate,"crate/I");
00384 fFarDetRawDigitTree->Branch("varc",&varc,"varc/I");
00385 fFarDetRawDigitTree->Branch("vmm",&vmm,"vmm/I");
00386 fFarDetRawDigitTree->Branch("vaadc",&vaadc,"vaadc/I");
00387 fFarDetRawDigitTree->Branch("vachip",&vachip,"vachip/I");
00388 fFarDetRawDigitTree->Branch("vachannel",&vachannel,"vachannel/I");
00389 fFarDetRawDigitTree->Branch("adc",&adc,"adc/I");
00390 fFarDetRawDigitTree->Branch("timeframe",&timeframe,"timeframe/I");
00391 fFarDetRawDigitTree->Branch("microsec",µsec,"microsec/I");
00392 fFarDetRawDigitTree->Branch("nanosec",&nanosec,"nanosec/I");
00393 fFarDetRawDigitTree->Branch("side",&side,"side/I");
00394 fFarDetRawDigitTree->Branch("plane",&plane,"plane/I");
00395 fFarDetRawDigitTree->Branch("shld",&shld,"shld/I");
00396 fFarDetRawDigitTree->Branch("rawdigit",&rawdigit,"rawdigit/I");
00397 fFarDetRawDigitTree->Branch("libox",&libox,"libox/I");
00398 fFarDetRawDigitTree->Branch("deadchip",&deadchip,"deadchip/I");
00399 gDirectory = tmpd;
00400 }
00401 }
00402
00403 if(tob->InheritsFrom("RawDigitDataBlock")){
00404 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawDigitDataBlock " << endl;
00405 RawDigitDataBlock* rdb = (RawDigitDataBlock*)(tob);
00406 TIter digitr = rdb->GetDatumIter();
00407 while(RawDigit *rd = (RawDigit*)(digitr())){
00408 if(rd){
00409 RawChannelId rawch = (RawChannelId)(rd->GetChannel());
00410 adc = rd->GetADC();
00411 tdc = rd->GetTDC();
00412 t = 1.5625*tdc;
00413 microsec = (Int_t)(1.0e-3*1.5625*tdc);
00414 nanosec = (Int_t)(t - tnanosec);
00415 crate = rawch.GetCrate();
00416 varc = rawch.GetVarcId();
00417 vmm = rawch.GetVmm();
00418 vaadc = rawch.GetVaAdcSel();
00419 vachip = rawch.GetVaChip();
00420 vachannel = rawch.GetVaChannel();
00421 side=crate%2; plane=-1; shld=-1;
00422 plane=PlnMask[crate][6*varc+vmm]+vaadc;
00423 if(plane>=1&&(vachip==1||(vachip==2&&PlnChMask[vachannel]==1))) plane+=2;
00424 if(plane<-1&&ShldChMask[crate][3*vaadc+vachip][vachannel]>0) shld=VaCh2Shld[crate][3*vaadc+vachip];
00425 libox=-1; deadchip=-1; rawdigit=1;
00426 if( fFarDetRawDigitFile
00427 && ( ( fMode==0 )
00428 || ( fMode==1 && nanosec>=-150 )
00429 || ( fMode==2 && nanosec<-150 ) ) ){
00430 TDirectory* tmpd = gDirectory;
00431 fFarDetRawDigitFile->cd();
00432 fFarDetRawDigitTree->Fill();
00433 gDirectory = tmpd;
00434 }
00435 }
00436 }
00437 }
00438
00439 if(tob->InheritsFrom("RawTpSinglesSummaryBlock")){
00440 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawTpSinglesSummaryBlock " << endl;
00441 RawTpSinglesSummaryBlock* rdb = (RawTpSinglesSummaryBlock*)(tob);
00442 typedef std::map<RawChannelId,UInt_t> RCIdToRateMap;
00443 const RCIdToRateMap& rates = rdb->GetRates();
00444 RCIdToRateMap::const_iterator rateItr = rates.begin();
00445 RCIdToRateMap::const_iterator rateEnd = rates.end();
00446 while ( rateItr != rateEnd ) {
00447 RawChannelId rawch = rateItr->first;
00448 rate = rateItr->second;
00449 crate = rawch.GetCrate();
00450 varc = rawch.GetVarcId();
00451 vmm = rawch.GetVmm();
00452 vaadc = rawch.GetVaAdcSel();
00453 vachip = rawch.GetVaChip();
00454 vachannel = rawch.GetVaChannel();
00455 vachannel = 0;
00456 side=crate%2; plane=-1; shld=-1;
00457 plane = PlnMask[crate][6*varc+vmm]+vaadc;
00458 if(plane>=1&&(vachip==1||(vachip==2&&PlnChMask[vachannel]==1))) plane+=2;
00459 if(plane<-1) shld=VaCh2Shld[crate][3*vaadc+vachip];
00460 if( (plane>0||shld>0) && rate<50 ){
00461 adc=0; microsec=0; nanosec=0;
00462 snarl=-1; libox=-1; deadchip=1; rawdigit=-1;
00463 if(fFarDetRawDigitFile){
00464 TDirectory* tmpd = gDirectory;
00465 fFarDetRawDigitFile->cd();
00466 fFarDetRawDigitTree->Fill();
00467 gDirectory = tmpd;
00468 }
00469 }
00470 rateItr++;
00471 }
00472 }
00473
00474 if(tob->InheritsFrom("RawLiTpmtDigitsBlock")){
00475 MSG("FarDetRawDigitDump",Msg::kDebug) << " ... found RawLiTpmtDigitsBlock " << endl;
00476 RawLiTpmtDigitsBlock* rdb = (RawLiTpmtDigitsBlock*)(tob);
00477 Int_t ndigits = rdb->GetNumberOfDigits();
00478 for(Int_t n=0;n<ndigits;n++){
00479 RawDigit* rd = (RawDigit*)(rdb->At(n));
00480 if(rd){
00481 RawChannelId rawch = (RawChannelId)(rd->GetChannel());
00482 adc = rd->GetADC();
00483 tdc = rd->GetTDC();
00484 t = 1.5625e-9*tdc;
00485 microsec = (Int_t)(1.0e-3*1.5625*tdc);
00486 nanosec = (Int_t)(1.5625*tdc);
00487 crate = rawch.GetCrate();
00488 varc = rawch.GetVarcId();
00489 vmm = rawch.GetVmm();
00490 vaadc = rawch.GetVaAdcSel();
00491 vachip = rawch.GetVaChip();
00492 vachannel = rawch.GetVaChannel();
00493 libox=VaCh2LiBox[vachannel];
00494 side=libox%2; plane=-1; shld=-1;
00495 snarl=-1; deadchip=-1; rawdigit=-1;
00496 if(fFarDetRawDigitFile){
00497 TDirectory* tmpd = gDirectory;
00498 fFarDetRawDigitFile->cd();
00499 fFarDetRawDigitTree->Fill();
00500 gDirectory = tmpd;
00501 }
00502 }
00503 }
00504 }
00505
00506 }
00507 }
00508 }
00509
00510 ctr++;
00511 MSG("FarDetRawDigitDump",Msg::kDebug) << " *** FarDetRawDigitDump::Ana( ) FINISHED *** " << endl;
00512
00513 return result;
00514
00515 }
|
|
|
Implement for notification of begin of job Reimplemented from JobCModule. Definition at line 44 of file FarDetRawDigitDump.cxx. References MSG, PlnChMask, PlnMask, ShldChMask, thetime, VaCh2LiBox, and VaCh2Shld. 00045 {
00046 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** FarDetRawDigitDump::BeginJob() *** " << endl;
00047
00048 Int_t tmpPlnMask[16][24]={
00049 { 1, 5, 9, 13, 17, -1,
00050 21, 25, 29, 33, 37, 41,
00051 45, 49, 53, 57, 61, -999,
00052 -1, -1, -1, -1, -1, -1 },
00053 { 45, 49, 53, 57, 61, -999,
00054 21, 25, 29, 33, 37, 41,
00055 1, 5, 9, 13, 17, -1,
00056 -1, -1, -1, -1, -1, -1 },
00057 { 65, 69, 73, 77, 81, -1,
00058 85, 89, 93, 97, 101, 105,
00059 109, 113, 117, 121, 125, -999,
00060 -1, -1, -1, -1, -1, -1 },
00061 { 109, 113, 117, 121, 125, -999,
00062 85, 89, 93, 97, 101, 105,
00063 65, 69, 73, 77, 81, -1,
00064 -1, -1, -1, -1, -1, -1 },
00065 { 129, 133, 137, 141, 145, -1,
00066 149, 153, 157, 161, 165, 169,
00067 173, 177, 181, 185, 189, -999,
00068 -1, -1, -1, -1, -1, -1 },
00069 { 173, 177, 181, 185, 189, -999,
00070 149, 153, 157, 161, 165, 169,
00071 129, 133, 137, 141, 145, -1,
00072 -1, -1, -1, -1, -1, -1 },
00073 { 193, 197, 201, 205, 209, -1,
00074 213, 217, 221, 225, 229, -1,
00075 233, 237, 241, 245, -1, -999,
00076 -1, -1, -1, -1, -1, -1 },
00077 { 233, 237, 241, 245, -1, -999,
00078 213, 217, 221, 225, 229, -1,
00079 193, 197, 201, 205, 209, -1,
00080 -1, -1, -1, -1, -1, -1 },
00081 { 250, 254, 258, 262, 266, -999,
00082 270, 274, 278, 282, 286, 290,
00083 294, 298, 302, 306, 310, -1,
00084 -1, -1, -1, -1, -1, -1 },
00085 { 294, 298, 302, 306, 310, -1,
00086 270, 274, 278, 282, 286, 290,
00087 250, 254, 258, 262, 266, -999,
00088 -1, -1, -1, -1, -1, -1 },
00089 { 314, 318, 322, 326, 330, -1,
00090 334, 338, 342, 346, 350, 354,
00091 358, 362, 366, 370, 374, -999,
00092 -1, -1, -1, -1, -1, -1 },
00093 { 358, 362, 366, 370, 374, -1,
00094 334, 338, 342, 346, 350, 354,
00095 314, 318, 322, 326, 330, -999,
00096 -1, -1, -1, -1, -1, -1 },
00097 { 378, 382, 386, 390, 394, -1,
00098 398, 402, 406, 410, 414, 418,
00099 422, 426, 430, 434, 438, -999,
00100 -1, -1, -1, -1, -1, -1 },
00101 { 422, 426, 430, 434, 438, -1,
00102 398, 402, 406, 410, 414, 418,
00103 378, 382, 386, 390, 394, -999,
00104 -1, -1, -1, -1, -1, -1 },
00105 { 442, 446, 450, 454, 458, -999,
00106 462, 466, 470, 474, 478, 482,
00107 -1, -1, -1, -1, -1, -1,
00108 -1, -1, -1, -1, -1, -1 },
00109 { -1, -1, -1, -1, -1, -1,
00110 462, 466, 470, 474, 478, 482,
00111 442, 446, 450, 454, 458, -999,
00112 -1, -1, -1, -1, -1, -1 },
00113 };
00114
00115 Int_t tmpPlnChMask[22]={
00116 0, 0,
00117 1, 0, 1, 0,
00118 1, 0, 1, 0,
00119 0, 1, 0, 1,
00120 0, 1, 0, 1,
00121 0, 0, 0, 0
00122 };
00123
00124 Int_t tmpVaCh2LiBox[22]={
00125 -1, -1,
00126 14, 1, 7, 8,
00127 4, 10, 13, 3,
00128 11, 5, 2, 12,
00129 0, 6, 9, 15,
00130 -1, -1, -1, -1
00131 };
00132
00133 Int_t tmpVaCh2Shld[16][6]={
00134 { 12,-1,-1,10,11,11 },
00135 { 12,-1,-1,10,11,11 },
00136 { 22,-1,-1,20,21,21 },
00137 { 22,-1,-1,20,21,21 },
00138 { 12,-1,-1,10,11,11 },
00139 { 12,-1,-1,10,11,11 },
00140 { 22,-1,-1,20,21,21 },
00141 { 22,-1,-1,20,21,21 },
00142 { 32,-1,-1,30,31,31 },
00143 { 32,-1,-1,30,31,31 },
00144 { 40,41,41,42,-1,-1 },
00145 { 40,41,41,42,-1,-1 },
00146 { 32,-1,-1,30,31,31 },
00147 { 32,-1,-1,30,31,31 },
00148 { 40,41,41,42,-1,-1 },
00149 { 40,41,41,42,-1,-1 },
00150 };
00151
00152 Int_t tmpShldChMask[16][6][22]={
00153 { { 0,0,8,8,0,8,8,8,8,8,8,8,4,8,4,8,8,4,0,0,0,0 },
00154 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
00155 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
00156 { 0,0,0,4,0,8,4,8,8,4,8,8,8,8,8,0,8,8,0,0,0,0 },
00157 { 0,0,0,4,0,8,4,8,8,4,8,8,8,8,8,0,8,8,0,0,0,0 },
00158 { 0,0,0,4,0,8,4,8,8,4,8,8,8,8,8,0,8,8,0,0,0,0 }, },
00159 { { 0,0,8,8,0,8,8,8,8,8,8,8,4,8,4,8,8,4,0,0,0,0 },
00160 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
00161 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
00162 { 0,0,0,4,0,8,4,8,8,4,8,8,8,8,8,0,8,8,0,0,0,0 },
00163 { 0,0,0,4,0,8,4,8,8,4,8,8,8,8,8,0,8,8,0,0,0,0 },
00164 { 0,0,0,4,0,8,4,8,8,4,8,8,8,8,8,0,8,8,0,0,0,0 }, },
00165 { { 0,0,8,8,0,8,8,8,8,8,8,8,4,8,4,8,8,4,0,0,0,0 },
00166 { 0,0,0,0,0,0,0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,0 },
00246 { 0,0,8,8,0,8,8,8,8,8,8,8,4,8,4,8,8,4,0,0,0,0 },
00247 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 },
00248 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, },
00249 };
00250
00251 Int_t i,j,k;
00252
00253 for(i=0;i<16;i++){
00254 for(j=0;j<24;j++){
00255 PlnMask[i][j]=tmpPlnMask[i][j];
00256 }
00257 }
00258
00259 for(i=0;i<22;i++){
00260 PlnChMask[i]=tmpPlnChMask[i];
00261 VaCh2LiBox[i]=tmpVaCh2LiBox[i];
00262 }
00263
00264 for(i=0;i<16;i++){
00265 for(j=0;j<6;j++){
00266 VaCh2Shld[i][j]=tmpVaCh2Shld[i][j];
00267 }
00268 }
00269
00270 for(i=0;i<16;i++){
00271 for(j=0;j<6;j++){
00272 for(k=0;k<22;k++){
00273 ShldChMask[i][j][k]=tmpShldChMask[i][j][k];
00274 }
00275 }
00276 }
00277
00278 thetime=-1;
00279 }
|
|
|
Return the actual configuration. If your module directly pulls its configuration from the fConfig Registry, you don't need to override this. Override if you have local config variables. Reimplemented from JobCModule. Definition at line 545 of file FarDetRawDigitDump.cxx. References fMode, Registry::Get(), and MSG. 00545 {
00546 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** FarDetRawDigitDump::Config() *** " << endl;
00547
00548 Int_t tmpint;
00549 if(r.Get("Mode",tmpint)) fMode = tmpint;
00550 MSG("FarDetRawDigitDump",Msg::kInfo) << " configuration: Mode=" << fMode << endl;
00551
00552 return;
00553 }
|
|
|
Get the default configuration registry. This should normally be overridden. One useful idiom is to implement it like: const Registry& MyModule::DefaultConfig() const { static Registry cfg; // never is destroyed if (cfg.Size()) return cfg; // already filled it // set defaults: cfg.Set("TheAnswer",42); cfg.Set("Units","unknown"); return cfg; } Reimplemented from JobCModule. Definition at line 532 of file FarDetRawDigitDump.cxx. References fMode, Registry::LockValues(), MSG, Registry::Set(), and Registry::UnLockValues(). 00533 {
00534 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** FarDetRawDigitDump::DefaultConfig() *** " << endl;
00535
00536 static Registry r;
00537 r.SetName("FarDetRawDigitDump.config.default");
00538 r.UnLockValues();
00539 r.Set("Mode",fMode);
00540 r.LockValues();
00541
00542 return r;
00543 }
|
|
|
Implement for notification of end of job Reimplemented from JobCModule. Definition at line 517 of file FarDetRawDigitDump.cxx. References fFarDetRawDigitFile, fFarDetRawDigitTree, MSG, and PrintRunSummary(). 00518 {
00519 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** FarDetRawDigitDump::EndJob() *** " << endl;
00520 if(fFarDetRawDigitFile){
00521 this->PrintRunSummary();
00522 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** saving data to file *** " << endl;
00523 TDirectory* tmpddd = gDirectory;
00524 fFarDetRawDigitFile->cd();
00525 fFarDetRawDigitTree->Write();
00526 fFarDetRawDigitFile->Close();
00527 gDirectory = tmpddd;
00528 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** data saved to file *** " << endl;
00529 }
00530 }
|
|
|
Definition at line 555 of file FarDetRawDigitDump.cxx. References adc, crate, deadchip, fFarDetRawDigitTree, libox, microsec, MSG, nanosec, plane, rawdigit, run, shld, side, snarl, timeframe, trigsrc, vaadc, vachannel, vachip, varc, and vmm. Referenced by EndJob(). 00556 {
00557 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** FarDetRawDigitDump::PrintRunSummary() *** " << endl;
00558
00559 if(fFarDetRawDigitFile){
00560
00561 fFarDetRawDigitTree->SetBranchAddress("run",&run);
00562 fFarDetRawDigitTree->SetBranchAddress("trigsrc",&trigsrc);
00563 fFarDetRawDigitTree->SetBranchAddress("snarl",&snarl);
00564 fFarDetRawDigitTree->SetBranchAddress("crate",&crate);
00565 fFarDetRawDigitTree->SetBranchAddress("varc",&varc);
00566 fFarDetRawDigitTree->SetBranchAddress("vmm",&vmm);
00567 fFarDetRawDigitTree->SetBranchAddress("vaadc",&vaadc);
00568 fFarDetRawDigitTree->SetBranchAddress("vachip",&vachip);
00569 fFarDetRawDigitTree->SetBranchAddress("vachannel",&vachannel);
00570 fFarDetRawDigitTree->SetBranchAddress("adc",&adc);
00571 fFarDetRawDigitTree->SetBranchAddress("timeframe",&timeframe);
00572 fFarDetRawDigitTree->SetBranchAddress("microsec",µsec);
00573 fFarDetRawDigitTree->SetBranchAddress("nanosec",&nanosec);
00574 fFarDetRawDigitTree->SetBranchAddress("side",&side);
00575 fFarDetRawDigitTree->SetBranchAddress("plane",&plane);
00576 fFarDetRawDigitTree->SetBranchAddress("shld",&shld);
00577 fFarDetRawDigitTree->SetBranchAddress("rawdigit",&rawdigit);
00578 fFarDetRawDigitTree->SetBranchAddress("libox",&libox);
00579 fFarDetRawDigitTree->SetBranchAddress("deadchip",&deadchip);
00580
00581
00582 Int_t myrun=-1;
00583 Int_t DeadChipCtr[16][3][6][2][3];
00584
00585 for(crate=0;crate<16;crate++){
00586 for(varc=0;varc<3;varc++){
00587 for(vmm=0;vmm<6;vmm++){
00588 for(vaadc=0;vaadc<2;vaadc++){
00589 for(vachip=0;vachip<3;vachip++){
00590 DeadChipCtr[crate][varc][vmm][vaadc][vachip]=0;
00591 }
00592 }
00593 }
00594 }
00595 }
00596
00597 for(Int_t i=0;i<fFarDetRawDigitTree->GetEntries();i++){
00598 fFarDetRawDigitTree->GetEntry(i);
00599 if( plane>=0 || shld>=0 ){
00600
00601 if( deadchip>0 ){
00602 DeadChipCtr[crate][varc][vmm][vaadc][vachip]=1;
00603 }
00604
00605 }
00606 if(myrun<0&&run>0) myrun=run;
00607 }
00608
00609 MSG("FarDetRawDigitDump",Msg::kInfo) << " *** List of Bad Chips ( Run=" << myrun << " ) *** " << endl;
00610 for(crate=0;crate<16;crate++){
00611 for(varc=0;varc<3;varc++){
00612 for(vmm=0;vmm<6;vmm++){
00613 for(vaadc=0;vaadc<2;vaadc++){
00614 for(vachip=0;vachip<3;vachip++){
00615
00616 if( DeadChipCtr[crate][varc][vmm][vaadc][vachip]==1 ){
00617 MSG("FarDetRawDigitDump",Msg::kInfo) << crate << "-" << varc << "-" << vmm << "-" << vaadc << "-" << vachip << " (dead) " << endl;
00618 }
00619
00620 }
00621 }
00622 }
00623 }
00624 }
00625
00626 }
00627 }
|
|
|
Definition at line 31 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 35 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 40 of file FarDetRawDigitDump.h. Referenced by Ana(). |
|
|
Definition at line 29 of file FarDetRawDigitDump.h. Referenced by Ana(). |
|
|
Definition at line 37 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 25 of file FarDetRawDigitDump.h. |
|
|
Definition at line 26 of file FarDetRawDigitDump.h. Referenced by Ana(), EndJob(), and PrintRunSummary(). |
|
|
Definition at line 27 of file FarDetRawDigitDump.h. Referenced by Ana(), Config(), and DefaultConfig(). |
|
|
Definition at line 37 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 33 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 33 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 36 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 43 of file FarDetRawDigitDump.h. Referenced by Ana(), and BeginJob(). |
|
|
Definition at line 42 of file FarDetRawDigitDump.h. Referenced by Ana(), and BeginJob(). |
|
|
Definition at line 37 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 30 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 34 of file FarDetRawDigitDump.h. Referenced by Ana(). |
|
|
Definition at line 36 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 44 of file FarDetRawDigitDump.h. Referenced by Ana(), and BeginJob(). |
|
|
Definition at line 36 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 30 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 30 of file FarDetRawDigitDump.h. Referenced by Ana(). |
|
|
Definition at line 39 of file FarDetRawDigitDump.h. Referenced by Ana(), and BeginJob(). |
|
|
Definition at line 29 of file FarDetRawDigitDump.h. Referenced by Ana(). |
|
|
Definition at line 32 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 34 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 38 of file FarDetRawDigitDump.h. Referenced by Ana(). |
|
|
Definition at line 35 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 45 of file FarDetRawDigitDump.h. Referenced by Ana(), and BeginJob(). |
|
|
Definition at line 46 of file FarDetRawDigitDump.h. Referenced by Ana(), and BeginJob(). |
|
|
Definition at line 35 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 35 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 35 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
|
|
Definition at line 35 of file FarDetRawDigitDump.h. Referenced by Ana(), and PrintRunSummary(). |
1.3.9.1