Ignore:
Timestamp:
08/10/04 16:32:12 (20 years ago)
Author:
fgoebel
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mpedestal
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc

    r4556 r4565  
    153153const Byte_t MPedCalcFromLoGain::fgHiGainWindowSize = 12;
    154154const Byte_t MPedCalcFromLoGain::fgLoGainWindowSize = 14;
    155 const Byte_t MPedCalcFromLoGain::fgMaxHiGainVar     = 20;
     155const Byte_t MPedCalcFromLoGain::fgMaxHiGainVar     = 40;
    156156
    157157// --------------------------------------------------------------------------
     
    173173    : fWindowSizeHiGain(fgHiGainWindowSize),
    174174      fWindowSizeLoGain(fgLoGainWindowSize),
    175       fGeom(NULL)
     175      fGeom(NULL), fPedContainerName("MPedestalCam")
    176176{
    177177  fName  = name  ? name  : "MPedCalcFromLoGain";
     
    260260    {
    261261      *fLog << warn << GetDescriptor()
    262             << Form("%s%2i%s%2i%s%2i%s",": Hi Gain window size: ",(int)fWindowSizeHiGain,
    263                     " is bigger than available range: [",(int)fHiGainFirst,",",(int)fHiGainLast,"]") << endl;
     262            << Form(": Hi Gain window size: %2i is bigger than available range: [%2i,%2i]",
     263                    (int)fWindowSizeHiGain, (int)fHiGainFirst, (int)fHiGainLast) << endl;
    264264      *fLog << warn << GetDescriptor()
    265265            << ": Will set window size to: " << (int)availhirange << endl;
     
    270270    {
    271271      *fLog << warn << GetDescriptor()
    272             << Form("%s%2i%s%2i%s%2i%s",": Lo Gain window size: ",(int)fWindowSizeLoGain,
    273                     " is bigger than available range: [",(int)fLoGainFirst,",",(int)fLoGainLast,"]") << endl;
     272            << Form(": Lo Gain window size: %2i is bigger than available range: [%2i,%2i]",
     273                    (int)fWindowSizeLoGain, (int)fLoGainFirst, (int)fLoGainLast) << endl;
    274274      *fLog << warn << GetDescriptor()
    275275            << ": Will set window size to: " << (int)availlorange << endl;
     
    322322    }
    323323
    324   fPedestals = (MPedestalCam*)pList->FindCreateObj("MPedestalCam");
     324  *fLog << " searching for the container " << fPedContainerName << endl;
     325
     326  fPedestals = (MPedestalCam*)pList->FindCreateObj( AddSerialNumber("MPedestalCam"),fPedContainerName); 
    325327  if (!fPedestals)
     328  {
     329    *fLog << err << fPedContainerName << " can not be created" << endl;
    326330    return kFALSE;
     331  }
     332
    327333
    328334  return kTRUE;
     
    356362      *fLog << endl;
    357363      *fLog << warn << GetDescriptor()
    358             << Form("%s%2i%s%2i%s%2i%s",": Selected Lo Gain FADC Window [",
    359                     (int)fLoGainFirst,",",lastdesired,
    360                     "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
     364            << Form(": Selected Lo Gain FADC Window [%2i,%2i] ranges out of the available limits: [0,%2i].",
     365                    (int)fLoGainFirst, lastdesired, lastavailable) << endl;
    361366      *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl;
    362367      SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff);
     
    371376      *fLog << endl;
    372377      *fLog << warn << GetDescriptor()
    373             << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain Range [",
    374                     (int)fHiGainFirst,",",lastdesired,
    375                     "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
     378            << Form(": Selected Hi Gain Range [%2i,%2i] ranges out of the available limits: [0,%2i].",
     379                    (int)fHiGainFirst, lastdesired, lastavailable) << endl;
    376380      *fLog << warn << GetDescriptor()
    377             << Form("%s%2i%s",": Will possibly use ",diff," samples from the Low-Gain for the High-Gain range")
     381            << Form(": Will possibly use %2i samples from the Low-Gain for the High-Gain range", diff)
    378382            << endl;
    379383      fHiGainLast -= diff;
     
    389393      *fLog << endl;
    390394      *fLog << warn << GetDescriptor()
    391             << Form("%s%2i%s%2i%s",": Selected Hi Gain FADC Window size ",
    392                     (int)fWindowSizeHiGain,
    393                     " ranges out of the available limits: [0,",lastavailable,"].") << endl;
     395            << Form(": Selected Hi Gain FADC Window size %2i ranges out of the available limits: [0,%2i].",
     396                    (int)fWindowSizeHiGain, lastavailable) << endl;
    394397      *fLog << warn << GetDescriptor()
    395             << Form("%s%2i%s",": Will use ",diff," samples from the Low-Gain for the High-Gain extraction")
     398            << Form(": Will use %2i samples from the Low-Gain for the High-Gain extraction", diff)
    396399            << endl;
    397400
     
    510513      }
    511514
    512       if (fPedestalUpdate && (fNumEventsUsed[idx] == fNumEventsDump)) {
     515      if (fPedestalUpdate && (fNumEventsUsed[idx] >= fNumEventsDump)) {
    513516
    514517        const ULong_t n = fNumEventsDump;
     
    597600  }
    598601
     602  fSumx.Reset();
     603  fSumx2.Reset();
     604  fSumAB0.Reset();
     605  fSumAB1.Reset();
     606  fNumEventsUsed.Reset();
     607  fTotalCounter.Reset();
     608
    599609  return kTRUE;
    600610}
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.h

    r4556 r4565  
    3535
    3636  Bool_t  fPedestalUpdate;
    37  
    38   MGeomCam*fGeom;            // Camera geometry
    39  
     37
     38  MGeomCam     *fGeom;       // Camera geometry
     39  TString fPedContainerName; // name of the 'MPedestalCam' container
     40 
    4041  TArrayI fNumEventsUsed;    // Number of events used for pedestal calc for each pixel
    4142  TArrayI fTotalCounter;     // Counter for dumping values to Pedestal Container
     
    4445  TArrayD fSumAB0;           // sum of ABFlag=0 slices
    4546  TArrayD fSumAB1;           // sum of ABFlag=1 slices
     47
    4648 
    4749  Int_t  PreProcess (MParList *pList);
     
    6062  void SetPedestalUpdate(Bool_t pedupdate)  {fPedestalUpdate = pedupdate;}
    6163 
     64  void SetPedContainerName(const char *name)    { fPedContainerName = name; }
     65
    6266  TArrayI *GetNumEventsUsed() {return &fNumEventsUsed;};
    6367 
Note: See TracChangeset for help on using the changeset viewer.