Ignore:
Timestamp:
04/30/12 19:24:14 (12 years ago)
Author:
Jens Buss
Message:
bugfixes after first compilation
File:
1 edited

Legend:

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

    r13465 r13476  
    11#include "rootfilehandler.h"
    2 #include <TROOT.h>
    3 #include <TFile.h>
     2
    43
    54void
    65CreateRootFile(
    7         const char * loc_fname,
    8         int verbosityLevel
     6        const char*    loc_fname,
     7        int             verbosityLevel
    98        )
    109{
     
    6665void
    6766SaveHistograms(
    68         const char* loc_fname,
    69         const char* subdirectory,
    70         TObjArray* histList,
    71         int verbosityLevel
     67        const char*     loc_fname,
     68        TString    subdirectory,
     69        TObjArray*      histList,
     70        int             verbosityLevel
    7271        )
    7372{
     
    7776
    7877    TFile* tf = OpenRootFile(loc_fname, verbosityLevel);
    79     if ( subdirectory != "root")
     78    if ( !( subdirectory.CompareTo("root") ) ) //if subdirectory = root
    8079    {
    8180        tf->cd();
     
    123122//----------------------------------------------------------------------------
    124123
    125 
    126 int
    127 CalculateHistogramId(
    128         int         pixelID,
    129         int         pulseOrder,
    130         int         maxPulseOrder
    131         )
    132 {
    133     return (pixelID*maxPulseOrder + pulseOrder);
    134 }
    135 // end of CalculateHistogramId
    136 //----------------------------------------------------------------------------
    137 
    138 int
    139 CalculatePixelId(
    140         int         mHistogramId,
    141         int         pulseOrder,
    142         int         maxPulseOrder
    143         )
    144 {
    145     return (mHistogramId - pulseOrder)/(maxPulseOrder - 1);
    146 }
    147 // end of CalculatePixelIdFromHistogramId
    148 //----------------------------------------------------------------------------
    149 
    150 CalculatePulseOrder(
    151         int         mHistogramId,
    152         int         maxPulseOrder
    153         )
    154 {
    155     if (mHistogramId < maxPulseOrder)
    156     {
    157             return mHistogramId;
    158     }
    159     else
    160     {
    161             return mHistogramId % (maxPulseOrder - 1);
    162     }
    163 }
    164 // end of CalculatePulseOrderFromHistogramId
    165 //----------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.