/* * TrkMDRHistoAction.h * * Created on: 03-aug-2009 * Author: S. Ricciarini */ /*! @file TrkMDRHistoAction.h The TrkMDRHistoAction class declaration file. */ #ifndef TRKMDRHISTOACTION_H_ #define TRKMDRHISTOACTION_H_ #include "../CollectionAction/CollectionAction.h" #include /*! @brief An action that fills an MDR (GV) 1D histogram. * */ class TrkMDRHistoAction: public CollectionAction { public: /*! @brief Constructor. * * @param actionName The action's name. * @param outFileName The output file name. * @param mode The mode of file creation (see documentation of TFile constructor * in ROOT's reference guide) */ TrkMDRHistoAction(const char *actionName, TString outFileName, TString mode = "UPDATE"); /*! @brief Destructor */ ~TrkMDRHistoAction() { } /*! @brief Fills histogram with the selected event. * * @param event The selected event. */ void OnGood(PamLevel2 *event); /*! @brief Writes the histogram to the output file. */ void Finalize(); private: TString _outFileName; TH1F _histo; TString _mode; }; #endif /* TRKMDRHISTOACTION_H_ */