Public Member Functions | |
AdQualityPlots (DayaBay::Detector det, MsgStream &msg) | |
StatusCode | book (ITHistSvc *hsvc, string filepath) |
StatusCode | fill (ICableSvc *cable, const ServiceMode &sm, const ReadoutPmtCrate *ro) |
Public Attributes | |
TH2F * | hitMap2d |
TH1F * | hitMap1d |
Private Attributes | |
DayaBay::Detector | detector |
MsgStream & | log |
Definition at line 20 of file AdQuality.cc.
AdQualityPlots::AdQualityPlots | ( | DayaBay::Detector | det, | |
MsgStream & | msg | |||
) | [inline] |
StatusCode AdQualityPlots::book | ( | ITHistSvc * | hsvc, | |
string | filepath | |||
) | [inline] |
Definition at line 31 of file AdQuality.cc.
00031 { 00032 00033 { 00034 string name = detector.detName() + "_HitMap2D"; 00035 string title = "Hit map for " + detector.detName(); 00036 hitMap2d = new TH2F(name.c_str(),title.c_str(), 00037 24,0,24, 8,0,8); 00038 00039 name = filepath+"/"+detector.detName()+"/hitMap2D"; 00040 if (hsvc->regHist(name,hitMap2d).isFailure()) { 00041 log << MSG::ERROR << "Could not register " << name << endreq; 00042 delete hitMap2d; hitMap2d = 0; 00043 return StatusCode::FAILURE; 00044 } 00045 } 00046 00047 { 00048 string name = detector.detName() + "_HitMap1D"; 00049 string title = "Hit map for " + detector.detName(); 00050 hitMap1d = new TH1F(name.c_str(), title.c_str(), 00051 8*24,0,8*24); 00052 hitMap1d->Sumw2(); 00053 name = filepath+"/"+detector.detName()+"/hitMap1D"; 00054 if (hsvc->regHist(name,hitMap1d).isFailure()) { 00055 log << MSG::ERROR << "Could not register " << name << endreq; 00056 delete hitMap1d; hitMap1d = 0; 00057 return StatusCode::FAILURE; 00058 } 00059 } 00060 00061 return StatusCode::SUCCESS; 00062 }
StatusCode AdQualityPlots::fill | ( | ICableSvc * | cable, | |
const ServiceMode & | sm, | |||
const ReadoutPmtCrate * | ro | |||
) | [inline] |
Definition at line 64 of file AdQuality.cc.
00066 { 00067 00068 // std::map<DayaBay::FeeChannelId,DayaBay::ReadoutPmtChannel> 00069 const ReadoutPmtCrate::PmtChannelReadouts& 00070 channelMap = ro->channelReadout(); 00071 ReadoutPmtCrate::PmtChannelReadouts::const_iterator 00072 it, done = channelMap.end(); 00073 for (it=channelMap.begin(); it != done; ++it) { 00074 00075 float charge = it->second.sumAdc(); 00076 00077 DayaBay::AdPmtSensor pmt = cable->adPmtSensor(it->first,sm); 00078 00079 hitMap1d->Fill(pmt.column()-1.0 + 24*(pmt.ring()-1) + 0.5, charge); 00080 hitMap2d->Fill(pmt.column()-0.5, pmt.ring()-0.5,charge); 00081 } 00082 return StatusCode::SUCCESS; 00083 }
DayaBay::Detector AdQualityPlots::detector [private] |
Definition at line 21 of file AdQuality.cc.
MsgStream& AdQualityPlots::log [private] |
Definition at line 22 of file AdQuality.cc.
TH2F* AdQualityPlots::hitMap2d |
Definition at line 26 of file AdQuality.cc.
Definition at line 27 of file AdQuality.cc.