Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:14:01

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef WAVEFORMNTUPLE_H
0004 #define WAVEFORMNTUPLE_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 #include <fstream>
0010 
0011 class PHCompositeNode;
0012 class TFile;
0013 class TNtuple;
0014 
0015 class WaveFormNtuple : public SubsysReco
0016 {
0017  public:
0018 
0019   WaveFormNtuple(const std::string &name = "WaveFormNtuple");
0020 
0021   ~WaveFormNtuple() override = default;
0022 
0023   /** Called for first event when run number is known.
0024       Typically this is where you may want to fetch data from
0025       database, because you know the run number. A place
0026       to book histograms which have to know the run number.
0027    */
0028   int InitRun(PHCompositeNode *topNode) override;
0029 
0030   /** Called for each event.
0031       This is where you do the real work.
0032    */
0033   int process_event(PHCompositeNode *topNode) override;
0034 
0035   /// Called at the end of all processing.
0036   int End(PHCompositeNode *topNode) override;
0037 
0038  private:
0039   TFile *outfile {nullptr};
0040   TNtuple *ntup {nullptr};
0041 };
0042 
0043 #endif // WAVEFORM_H