/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Private Attributes
AdQualityPlots Class Reference
Collaboration diagram for AdQualityPlots:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Definition at line 20 of file AdQuality.cc.


Constructor & Destructor Documentation

AdQualityPlots::AdQualityPlots ( DayaBay::Detector  det,
MsgStream &  msg 
) [inline]

Definition at line 29 of file AdQuality.cc.

: detector(det), log(msg) { }

Member Function Documentation

StatusCode AdQualityPlots::book ( ITHistSvc *  hsvc,
string  filepath 
) [inline]

Definition at line 31 of file AdQuality.cc.

                                                      {

        {
            string name = detector.detName() + "_HitMap2D";
            string title = "Hit map for " + detector.detName();
            hitMap2d = new TH2F(name.c_str(),title.c_str(),
                                24,0,24, 8,0,8);
            
            name = filepath+"/"+detector.detName()+"/hitMap2D";
            if (hsvc->regHist(name,hitMap2d).isFailure()) {
                log << MSG::ERROR << "Could not register " << name << endreq;
                delete hitMap2d; hitMap2d = 0;
                return StatusCode::FAILURE;
            }
        }

        {
            string name = detector.detName() + "_HitMap1D";
            string title = "Hit map for " + detector.detName();
            hitMap1d = new TH1F(name.c_str(), title.c_str(),
                                8*24,0,8*24);
            hitMap1d->Sumw2();
            name = filepath+"/"+detector.detName()+"/hitMap1D";
            if (hsvc->regHist(name,hitMap1d).isFailure()) {
                log << MSG::ERROR << "Could not register " << name << endreq;
                delete hitMap1d; hitMap1d = 0;
                return StatusCode::FAILURE;
            }
        }

        return StatusCode::SUCCESS;
    }
StatusCode AdQualityPlots::fill ( ICableSvc cable,
const ServiceMode sm,
const ReadoutPmtCrate ro 
) [inline]

Definition at line 64 of file AdQuality.cc.

    {

        // std::map<DayaBay::FeeChannelId,DayaBay::ReadoutPmtChannel> 
        const ReadoutPmtCrate::PmtChannelReadouts& 
            channelMap = ro->channelReadout();
        ReadoutPmtCrate::PmtChannelReadouts::const_iterator
            it, done = channelMap.end();
        for (it=channelMap.begin(); it != done; ++it) {

            float charge = it->second.sumAdc();

            DayaBay::AdPmtSensor pmt = cable->adPmtSensor(it->first,sm);

            hitMap1d->Fill(pmt.column()-1.0 + 24*(pmt.ring()-1) + 0.5, charge);
            hitMap2d->Fill(pmt.column()-0.5, pmt.ring()-0.5,charge);
        }
        return StatusCode::SUCCESS;
    }

Member Data Documentation

Definition at line 21 of file AdQuality.cc.

MsgStream& AdQualityPlots::log [private]

Definition at line 22 of file AdQuality.cc.

Definition at line 26 of file AdQuality.cc.

Definition at line 27 of file AdQuality.cc.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:06:20 for DataQuality by doxygen 1.7.4