/[PAMELA software]/PamCut/CollectionActions/LiveTimeAction/LiveTimeAction.h
ViewVC logotype

Diff of /PamCut/CollectionActions/LiveTimeAction/LiveTimeAction.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by pam-fi, Fri Jul 17 08:22:47 2009 UTC revision 1.2 by pam-fi, Wed Aug 5 17:04:18 2009 UTC
# Line 30  public: Line 30  public:
30    /*! @brief Constructor.    /*! @brief Constructor.
31     *     *
32     * outFileBase is the base name for output file: #Finalize will add .txt for ASCII output     * outFileBase is the base name for output file: #Finalize will add .txt for ASCII output
33     * and .root for ROOT output. outFileBase has to contain the path (otherwise, files will be     * and .root for ROOT output. "-report" will be also added for the report file (in which
34     * saved in the current directory).     * the content of the zero bin will be saved). outFileBase has to contain the path (otherwise,
35       * files will be saved in the current directory).
36     * The file containing the rigidity bins must be a text file. It must contain both the     * The file containing the rigidity bins must be a text file. It must contain both the
37     * lower and upper limits of the rigidity axis, so that if it contains N values it     * lower and upper limits of the rigidity axis, so that if it contains N values it
38     * defines a set of N-1 bins.     * defines a set of N-1 bins.
39     *     *
40     * @param actionName The action's name.     * @param actionName The action's name.
41     * @param outFileBase The output file base name.     * @param outFileBase The output file base name. If "" is given as name,
42       *                    no file output will be performed.
43     * @param rigBinsFile The file containing the rigidity bins.     * @param rigBinsFile The file containing the rigidity bins.
44     * @param thresholdCoeff The threshold rigidity coefficient.     * @param thresholdCoeff The threshold rigidity coefficient.
45     */     */
46    LiveTimeAction(const char *actionName, TString outFileBase, TString rigBinsFile, float thresholdCoeff);    LiveTimeAction(const char *actionName, TString outFileBase, TString rigBinsFile, float thresholdCoeff);
47    
48      /*! @brief Constructor.
49       *
50       * outFileBase is the base name for output file: #Finalize will add .txt for ASCII output
51       * and .root for ROOT output. "-report" will be also added for the report file (in which
52       * the content of the zero bins will be saved). outFileBase has to contain the path (otherwise,
53       * files will be saved in the current directory).
54       *
55       * @param actionName The action's name.
56       * @param outFileBase The output file base name. If "" is given as name,
57       *                    no file output will be performed.
58       * @param bins A vector containing the bins limits.
59       * @param thresholdCoeff The threshold rigidity coefficient.
60       */
61      LiveTimeAction(const char *actionName, TString outFileBase, vector<float> &bins, float thresholdCoeff);
62    
63    /*! @brief Destructor */    /*! @brief Destructor */
64    ~LiveTimeAction() {    ~LiveTimeAction() {
65    }    }
# Line 65  public: Line 82  public:
82     */     */
83    void Finalize();    void Finalize();
84    
85      /*! @brief Returns the histogram.
86       *
87       * This method returns a vector filled with the LT (in seconds) corresponding to each
88       * threshold rigidity bin (in GV) defined in the binning argument of the constructor.
89       * Element 0 is the total LT for events whose threshold rigidity lies in the
90       * lowest bin and so on.
91       *
92       * @return The LT histogram binned in threshold rigidity.
93       */
94      std::vector<float> &GetHisto() {
95        return _textHisto;
96      }
97    
98    /*! @brief Returns the live time spent at rigidities below the lower limit (the "zero bin"). */    /*! @brief Returns the live time spent at rigidities below the lower limit (the "zero bin"). */
99    float GetZeroBin() {    float GetZeroBin() {
100      return _zeroBin;      return _zeroBin;
# Line 86  private: Line 116  private:
116    float _total;    float _total;
117    float _zeroBin;    float _zeroBin;
118    
119      void _InitHistos(vector<float> &bins);
120    
121  #ifdef DEBUGPAMCUT  #ifdef DEBUGPAMCUT
122    int _outUp, _outDown;    int _outUp, _outDown;
123  #endif  #endif

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23