00001
00002
00004 #ifndef __MakeTriggers__
00005 #define __MakeTriggers__
00006
00007 #include "Streams.h"
00008 #include "Triggers.h"
00009
00010 using namespace std;
00011
00019 class MakeTriggers: public Triggers, public Segments , public Streams {
00020
00021 public:
00022
00033 MakeTriggers(const string aStreamName, const int aVerbose=0);
00034
00038 virtual ~MakeTriggers(void);
00050 void Reset(void);
00061 inline void SetMprocessname(const string aMprocessname){ Mprocessname=aMprocessname; };
00062
00068 inline void SetProcessVersion(const string aMprocessversion){ Mprocessversion=aMprocessversion; };
00069
00077 bool InitUserMetaData(vector<string> aMusername, vector<string> aMusertype);
00078
00085 bool SetUserMetaData(const string aMusername, const double aMuservalue);
00086
00093 bool SetUserMetaData(const string aMusername, const int aMuservalue);
00094
00101 bool SetUserMetaData(const string aMusername, const string aMuservalue);
00102
00124 string Write(const string aOutDir=".",
00125 const string aFileFormat="root",
00126 const string aFileName="default",
00127 const string aSubDir="",
00128 const string aWriteMode="RECREATE",
00129 const bool aWriteMeta=true);
00130
00131 protected:
00132
00133
00134 TTree *Mtree;
00135 double Mstart,
00136 Mend;
00137 string Mprocessname,
00138 Mstreamname,
00139 Mprocessversion,
00140 Mprocessuser;
00141 double Mfmin,
00142 Mfmax,
00143 Mqmin,
00144 Mqmax,
00145 Msnrmin,
00146 Msnrmax;
00147 vector <string> Musername;
00148 vector <string> Musertype;
00149 double *Mdvar;
00150 int *Mivar;
00151 string *Msvar;
00152
00153 private:
00154
00155 bool WriteTXT(const string txtfilename);
00156 bool WriteXML(const string xmlfilename);
00157
00158 ClassDef(MakeTriggers,0)
00159 };
00160
00161 #endif
00162
00163