//////////////////////////////////////////////////////////////////// /// \class RAT:CrateGainMonitor /// /// \brief Keep track of the crate gains /// /// \author Tanner Kaptanoglu /// /// \details This processor loops through the events and histograms /// QHS, QHL, & QLX in order to keep track of the gain crate by /// crate. Sort by high nhit events and trig type to try and /// get a sample of events with light in the detector. /// //////////////////////////////////////////////////////////////////// #ifndef __RAT_CrateGainMonitor__ #define __RAT_CrateGainMonitor__ #include #include #include #include #include #include #include #include namespace RAT { class CrateGainMonitor : public Processor { public: CrateGainMonitor(); virtual ~CrateGainMonitor(){}; virtual void BeginOfRun(DS::Run&); virtual void EndOfRun(DS::Run& run); virtual Processor::Result DSEvent(DS::Run&, DS::Entry& ds); virtual Processor::Result Event(DS::Entry&, DS::EV& ev); protected: std::string fFileName; // Name of output root file char TFileName[64]; // Name of output root file with run num. appended char HistogramName[64]; // Name of each histogram TH1D* qhs_histograms[19]; // QHS histogram per crate TH1D* qhl_histograms[19]; // QHL histogram per crate TH1D* qlx_histograms[19]; // QLX histogram per crate unsigned int fNCrates; // Number of crates unsigned int fNHitThreshold; // Look at events above this NHit bool fSkipESUM; // If True skip ESUM triggered events }; } // namespace RAT #endif