Changeset 13520 for fact/tools


Ignore:
Timestamp:
05/02/12 17:23:19 (12 years ago)
Author:
Jens Buss
Message:
update some bugfixes in the destructor
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/PulseTemplates/pixel.C

    r13501 r13520  
    6666Pixel::~Pixel()
    6767{
    68     if (mVerbosityLevel > 2) cout << endl << "...delete current pixel histograms" ;
     68    if (mVerbosityLevel > 1) cout << endl << "...delete histograms of pixel " << mChid ;
    6969
    7070    DeletePixelHistos();
    7171    DeleteDistributionHistos();
     72
    7273    delete hList;
    7374    hList = NULL;
     
    358359        )
    359360{
     361    cout << endl << "Saving histograms of Pixel# " << mChid
     362         << " Adress " << &mChid;
    360363    if (!saveResults) return;
     364    cout << endl << "#### ";
    361365    SaveHistograms(
    362366            outRootFileName,
     
    374378{
    375379    if (mVerbosityLevel > 2) cout << endl << "\t...delete current overlay histograms" ;
    376 
    377     for (int order = 0;
    378          order < mMaxPulseOrder;
    379          order ++)
    380     {
    381         if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxOverlay";
    382         delete hMaxOverlay[order];
    383 
    384         if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeOverlay";
    385         delete hEdgeOverlay[order];
    386 
    387         if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile";
    388         delete hMaxProfile[order];
    389 
    390         if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile2";
    391         delete hEdgeProfile[order];
    392     }
     380    cout << endl << "Deleting histograms of Pixel# " << mChid
     381         << " Adress " << &mChid;
     382//    for (int order = 0;
     383//         order < mMaxPulseOrder;
     384//         order ++)
     385//    {
     386////        if (mVerbosityLevel > 3)
     387//        cout << endl << "\t\t...deleting hMaxOverlay"
     388//                                      << mChid << "_" << order
     389//                                      << " hMaxOverlay[order] adr " << hMaxOverlay[order]
     390//                                      << " hMaxOverlay adr " << hMaxOverlay
     391//                                         ;
     392
     393//        delete hMaxOverlay[order];
     394//        hMaxOverlay[order] = NULL;
     395
     396//        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeOverlay"
     397//                                      << mChid << "_" << order ;
     398//        delete hEdgeOverlay[order];
     399//        hEdgeOverlay[order] = NULL;
     400
     401//        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile"
     402//                                      << mChid << "_" << order ;
     403//        delete hMaxProfile[order];
     404//        hMaxProfile[order] = NULL;
     405
     406//        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile2"
     407//                                      << mChid << "_" << order ;
     408//        delete hEdgeProfile[order];
     409//        hEdgeProfile[order] = NULL;
     410//    }
    393411    if (mVerbosityLevel > 3) cout << endl << "\t...deleting histogram Arrays";
     412
     413    if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxOverlay";
    394414    delete[] hMaxOverlay;
    395415    hMaxOverlay = NULL;
    396416
     417    if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeOverlay";
    397418    delete[] hEdgeOverlay;
    398419    hEdgeOverlay = NULL;
    399420
     421    if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hMaxProfile";
    400422    delete[] hMaxProfile;
    401423    hMaxProfile = NULL;
    402424
     425    if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hEdgeProfile";
    403426    delete[] hEdgeProfile;
    404427    hEdgeProfile = NULL;
     
    413436                                  << "\t...delete current distribution histograms" ;
    414437
    415     for (int order = 0;
    416          order < mMaxPulseOrder;
    417          order ++)
    418     {
    419         if (mOptions.Contains("S"))
    420         {
    421             if (mVerbosityLevel > 3) cout << endl
    422                                           << "\t\t...deleting hSlopeRisingEdge"
    423                                           << mChid << "_" << order ;
    424             delete hSlopeRisingEdge[order];
    425         }
    426 
    427         if (mOptions.Contains("R"))
    428         {
    429             if (mVerbosityLevel > 3) cout << endl
    430                                           << "\t\t...deleting hRisingEdgeToMax"
    431                                           << mChid << "_" << order ;
    432 //            delete hRisingEdgeToMax[order];
    433         }
    434 
    435         if (mOptions.Contains("P"))
    436         {
    437             if (mVerbosityLevel > 3) cout << endl
    438                                           << "\t\t...deleting hPosOfMax"
    439                                           << mChid << "_" << order ;
    440 
    441 //            delete hPosOfMax[order];
    442         }
    443 
    444     }
     438//    for (int order = 0;
     439//         order < mMaxPulseOrder;
     440//         order ++)
     441//    {
     442//        if (mOptions.Contains("S"))
     443//        {
     444//            if (mVerbosityLevel > 3) cout << endl
     445//                                          << "\t\t...deleting hSlopeRisingEdge"
     446//                                          << mChid << "_" << order ;
     447//            delete hSlopeRisingEdge[order];
     448//        }
     449
     450//        if (mOptions.Contains("R"))
     451//        {
     452//            if (mVerbosityLevel > 3) cout << endl
     453//                                          << "\t\t...deleting hRisingEdgeToMax"
     454//                                          << mChid << "_" << order ;
     455////            delete hRisingEdgeToMax[order];
     456//        }
     457
     458//        if (mOptions.Contains("P"))
     459//        {
     460//            if (mVerbosityLevel > 3) cout << endl
     461//                                          << "\t\t...deleting hPosOfMax"
     462//                                          << mChid << "_" << order ;
     463
     464////            delete hPosOfMax[order];
     465//        }
     466
     467//    }
    445468    if (mVerbosityLevel > 3) cout << endl << "\t...deleting histogram Arrays";
    446469
     
    448471    {
    449472        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hSlopeRisingEdge";
    450 //        delete[] hSlopeRisingEdge;
     473        delete[] hSlopeRisingEdge;
    451474        hSlopeRisingEdge = NULL;
    452475    }
     
    455478    {
    456479        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hRisingEdgeToMax";
    457 //        delete[] hRisingEdgeToMax;
     480        delete[] hRisingEdgeToMax;
    458481        hRisingEdgeToMax = NULL;
    459482    }
     
    462485    {
    463486        if (mVerbosityLevel > 3) cout << endl << "\t\t...deleting hPosOfMax";
    464 //        delete[] hPosOfMax;
     487        delete[] hPosOfMax;
    465488        hPosOfMax = NULL;
    466489    }
Note: See TracChangeset for help on using the changeset viewer.