| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

AdCalibFigs.h

Go to the documentation of this file.
00001 /*
00002  * AdCalibFigs
00003  *
00004  * Generate basic AD figures from raw data
00005  *
00006  * dandwyer@caltech.edu 2010/06/20
00007  */
00008 
00009 
00010 #ifndef ADCALIBFIGS_H
00011 #define ADCALIBFIGS_H
00012 
00013 // Fast index for histograms
00014 #define ADCHARGE 0
00015 #define LOGADCHARGE 1
00016 #define PMTCHARGE 2
00017 #define ADCHARGEVSTIME 3
00018 #define ADCHARGEVSDTTRIGGER 4
00019 #define MAXPMTCHARGEVSADCHARGE 5
00020 #define NCHANNELSVSADCHARGE 6
00021 #define NCALIBHISTOGRAMS 7
00022 
00023 #define NSITES 5
00024 #define NDETECTORS 5
00025 #define NCOLUMNS 25
00026 #define NRINGS 9
00027 
00028 #define MAXCALIBHISTS NSITES*NDETECTORS*NCOLUMNS*NRINGS*NCALIBHISTOGRAMS
00029 
00030 #include "GaudiAlg/GaudiAlgorithm.h"
00031 #include "Context/TimeStamp.h"
00032 #include "Conventions/Detectors.h"
00033 #include <vector>
00034 #include <map>
00035 #include <string>
00036 
00037 class IStatisticsSvc;
00038 class TH1;
00039 
00040 class AdCalibFigs : public GaudiAlgorithm
00041 {
00042 
00043  public:
00044     AdCalibFigs(const std::string& name, ISvcLocator* pSvcLocator);
00045     virtual ~AdCalibFigs();
00046 
00047     virtual StatusCode initialize();
00048     virtual StatusCode execute();
00049     virtual StatusCode finalize();
00050 
00051  private:
00052     TH1* getOrMakeHist(int run, const DayaBay::Detector& detector,
00053                        int column, int ring, int histogram);
00054     std::string getPath(int run, const char* detectorName,
00055                         int column, int ring, 
00056                         const char* histName);
00057     void extendRange(TH1* hist, int xBinsAdd, int yBinsAdd=0);    
00058 
00059     // Handle for statistics service
00060     IStatisticsSvc* m_statsSvc;
00061     // Internal variables
00062     TimeStamp* m_firstTriggerTime;
00063     std::map<DayaBay::Detector,TimeStamp> m_lastTriggerTime;
00064     std::map<int,TH1**> m_shortCuts;
00065     std::vector<TH1*> m_normalize;
00066 };
00067 
00068 #endif  // ADCALIBFIGS_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:25:15 2011 for AdBasicFigs by doxygen 1.4.7