GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RunAgent.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2010 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
23 #ifndef ADF_RunAgent
24 #define ADF_RunAgent
25 
26 #ifndef ADF_DotConf
27 #include "DotConf.h"
28 #endif
29 
30 #include <vector>
31 
32 namespace ADF
33 {
34 
36 
43 class RunAgent : public DotConf
44 {
45 private:
47  std::string fExperiment;
49  std::string fDate;
51  Int_t fRunNumber;
53  Int_t fSubRunNumber;
55  std::vector <Double_t> fGlobalVertex;
56 
57 protected:
58  virtual Bool_t ProcessLine(const std::string &);
59 
60 public:
61  RunAgent(const Char_t *rid, const Char_t *srid, Bool_t is_record = true);
62  virtual ~RunAgent();
63 
65  Int_t GetRun() const
66  { return fRunNumber; }
67  Int_t GetSubRun() const
68  { return fSubRunNumber; }
69 
71  void SetRun(Int_t run, Int_t subrun)
72  { fRunNumber = run; fSubRunNumber = subrun; }
74  void SetSubRun(Int_t subrun)
75  { fSubRunNumber = subrun; }
76 
78  Double_t GetX()
79  { return fGlobalVertex[0]; }
80  Double_t GetY()
81  { return fGlobalVertex[1]; }
82  Double_t GetZ()
83  { return fGlobalVertex[2]; }
84  Double_t GetDX()
85  { return fGlobalVertex[3]; }
86  Double_t GetDY()
87  { return fGlobalVertex[4]; }
88  Double_t GetDZ()
89  { return fGlobalVertex[5]; }
90  Double_t GetBeta()
91  { return fGlobalVertex[6]; }
92 
94  virtual void Reset(const Char_t *opt = "");
95 
97  virtual Bool_t DoConfigure(std::istream &in, Bool_t allow_init)
98  { return DotConf::DoConfigure(in, allow_init);}
100  virtual Bool_t DoConfigure(std::ostream &);
101 };
102 
103 } // namespace ADF
104 
105 #endif
106 
107 
108 
109 
110 
111 
112 
113 
Double_t GetX()
source position
Definition: RunAgent.h:78
Double_t GetDZ()
Definition: RunAgent.h:88
void SetRun(Int_t run, Int_t subrun)
change the run and subrun number
Definition: RunAgent.h:71
DotConf : Utility for class configuration from ascii file or Configuration frames.
Definition: DotConf.h:96
virtual ~RunAgent()
Definition: RunAgent.cpp:42
Int_t GetRun() const
to get run and subrun number
Definition: RunAgent.h:65
Double_t GetDX()
Definition: RunAgent.h:84
virtual Bool_t ProcessLine(const std::string &)
a helper template to do clones : it requires a default constructor. then it uses the Configure facili...
Definition: RunAgent.cpp:61
RunAgent(const Char_t *rid, const Char_t *srid, Bool_t is_record=true)
Definition: RunAgent.cpp:30
RunAgent.
Definition: RunAgent.h:43
Double_t GetZ()
Definition: RunAgent.h:82
Int_t GetSubRun() const
Definition: RunAgent.h:67
void SetSubRun(Int_t subrun)
change the run and subrun number
Definition: RunAgent.h:74
virtual Bool_t DoConfigure(std::istream &, Bool_t allow_init)
configure this from an input stream
virtual void Reset(const Char_t *opt="")
Reset this object.
Definition: RunAgent.cpp:46
virtual Bool_t DoConfigure(std::istream &in, Bool_t allow_init)
configure this from an input stream
Definition: RunAgent.h:97
header file for DotConf.cpp
Double_t GetBeta()
Definition: RunAgent.h:90
Double_t GetY()
Definition: RunAgent.h:80
Double_t GetDY()
Definition: RunAgent.h:86