StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtPedStatQA.h
1 /***************************************************************************
2  *
3  * $Id: StFgtPedStatQA.h,v 1.2 2014/08/06 11:43:12 jeromel Exp $
4  * Author: S. Gliske, Jan 2012
5  *
6  ***************************************************************************
7  *
8  * Description: QA plots, hists, and text file for pedestals and status
9  *
10  ***************************************************************************
11  *
12  * $Log: StFgtPedStatQA.h,v $
13  * Revision 1.2 2014/08/06 11:43:12 jeromel
14  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
15  *
16  * Revision 1.1 2012/01/31 09:26:16 sgliske
17  * StFgtQaMakers moved to StFgtPool
18  *
19  * Revision 1.2 2012/01/25 11:24:55 sgliske
20  * Added GetCVS tag
21  *
22  * Revision 1.1 2012/01/17 20:10:02 sgliske
23  * creation
24  *
25  *
26  **************************************************************************/
27 
28 #ifndef _ST_FGT_PED_STAT_QA_H_
29 #define _ST_FGT_PED_STAT_QA_H_
30 
31 #include <string>
32 #include "StMaker.h"
33 class StFgtPedMaker;
34 class StFgtStatusMaker;
35 
36 class StFgtPedStatQA : public StMaker {
37  public:
38  // constructors
39  StFgtPedStatQA( const Char_t* name = "FgtPedStatQA",
40  const Char_t* pedMkrName = "FgtPedMaker",
41  const Char_t* statMkrName = "FgtStatusMaker" );
42 
43  // default OK
44  // StFgtPedStatQA(const StFgtPedStatQA&);
45 
46  // equals operator -- default OK
47  // StFgtPedStatQA& operator=(const StFgtPedStatQA&);
48 
49  // deconstructor
50  virtual ~StFgtPedStatQA();
51 
52  Int_t Init();
53  Int_t Finish();
54 
55  // Int_t Make(); No make--just uses output from StFgtPedMaker and StFgtStatusMaker
56 
57  // modifiers
58  void setSaveTxtFile( const Char_t* filename ); // filename == "" forces not to save to file
59  void setSaveRootFile( const Char_t* filename ); // filename == "" forces not to save to file
60  void setSavePdfFile( const Char_t* filename ); // filename == "" forces not to save to file
61  void setTimeBin( Short_t timeBin = 2 );
62 
63  // get CVS
64  virtual const char *GetCVS() const;
65 
66  protected:
67  // for the ped maker
68  std::string mPedMkrName;
69  StFgtPedMaker *mPedMkr;
70 
71  // for the status maker
72  std::string mStatMkrName;
73  StFgtStatusMaker *mStatMkr;
74 
75  // which time bins to use
76  Short_t mTimeBin;
77 
78  // for saving to file
79  std::string mFilenameTxt, mFilenameRoot, mFilenamePdf;
80  std::string* mFilenameArr[3];
81 
82  // parameters
83  Float_t maxAdcPed;
84  Float_t maxAdcRMS;
85  Float_t maxAdcFrac;
86 
87  // functions that actually does the saving
88  Int_t saveTxtFile();
89  Int_t saveHists();
90 
91  private:
92  ClassDef(StFgtPedStatQA,1);
93 
94 };
95 
96 // inline functions
97 
98 // modifiers
99 inline void StFgtPedStatQA::setSaveTxtFile( const Char_t* filename ){ mFilenameTxt = filename; };
100 inline void StFgtPedStatQA::setSaveRootFile( const Char_t* filename ){ mFilenameRoot = filename; };
101 inline void StFgtPedStatQA::setSavePdfFile( const Char_t* filename ){ mFilenamePdf = filename; };
102 inline void StFgtPedStatQA::setTimeBin( Short_t bin ){ mTimeBin = bin; };
103 inline const char *StFgtPedStatQA::GetCVS() const {
104  static const char cvs[] = "Tag $Name: $ $Id: StFgtPedStatQA.h,v 1.2 2014/08/06 11:43:12 jeromel Exp $ built " __DATE__ " " __TIME__ ;
105  return cvs;
106 }
107 
108 #endif