Diana Software
MTestModule.cc
Go to the documentation of this file.
1 #include "MTestModule.hh"
2 #include "QEvent.hh"
3 #include "QRawEvent.hh"
4 #include "QBool.hh"
5 #include "QError.hh"
6 #include <iostream>
7 #include <sstream>
8 #include <math.h>
9 #include "QString.hh"
10 #include "QBaselineData.hh"
11 #include "QBaseType.hh"
12 // MV FIXME
13 //#include "QGuiSession.hh"
14 #include "QObjectInspector.hh"
15 
16 using namespace Diana;
18 
19 using std::stringstream;
20 
21 Diana::QSequence* MTestModule::fFirstSequence = NULL;
22 Diana::QSequence* MTestModule::fCurrentSequence = NULL;
24 
25 #define ASSERT_EQUAL(x,y)\
26 if(x==y) fTestOK++;\
27 else {\
28 fTestKO++;\
29 stringstream difference;\
30 difference<<x<<" vs "<<y;\
31 Error("Test failed: file %s; line %d: %s", __FILE__ , __LINE__,difference.str().c_str());\
32 }
33 
34 // ctor
36 {
37 /*
38  if(fFirstSequence == NULL) fFirstSequence = s;
39  if(fFirstSequence == s) fIsFirstSequence = true;
40  else fIsFirstSequence = false;
41 
42  if(fCurrentSequence != s ) {
43  fCurrentSequence = s;
44  fMyOccurrence = 0;
45  }
46  else {
47  fMyOccurrence++;
48  }
49  */
50  fTestOK=0;
51  fTestKO=0;
52 }
53 
54 // dtor
56 {
57  if(!isEnabled()) return;
58  Info("----TEST SUMMARY-----");
59  Info("OK: %d", fTestOK);
60  if(fTestKO >0) Error("KO: %d", fTestKO);
61 
62  if(GetSequence().GetName() == "Test")
63  if(fTestOK !=250137 ) Panic("Expected test %d vs %d",250137,fTestOK);
64  if(GetSequence().GetName() == "TestBis") {
65  if(GetOccurrence() == 0 && fTestOK != 7758 ) Panic("Expected test %d vs %d",7758,fTestOK);
66  if(GetOccurrence() == 1 && fTestOK != 7619 ) Panic("Expected test %d vs %d",7619,fTestOK);
67  }
68 }
69 
70 // Init method is called before event loop
72  Info("Init");
73 
74  if(GetSequence().GetName() == "Test") {
75  fMyOccurrence++;
76  fIsFirstSequence = true;
77  } else {
78  fMyOccurrence++;
79  fIsFirstSequence = false;
80  }
81 
82  ASSERT_EQUAL(fMyOccurrence,(int)GetOccurrence());
84  fIter = GetInt("Iterations",1);
85  fWriteEvtNum = GetBool("WriteEvtNum",false);
86  fTestGlobal = GetBool("TestGlobalQuantities",false);
87  fTestEvent = GetBool("TestEventQuantities",false);
88  fTestDefaults = GetBool("TestRunDataLoader",false);
89  testConfigFile = GetBool("TestConfigFile", false);
90  fOutputDir = GetString("OutputDir","NODEFAULT");
91 
92  // test config file
93  if(testConfigFile) {
94  std::string testStr = GetString("TestString","DianaFramework");
95  int testInt = GetInt("TestInt",3);
96  double testDouble = GetDouble("TestDouble",3.);
97  bool testBool = GetBool("TestBool",true);
98  std::vector<int> defaultVectorInt;
99  defaultVectorInt.push_back(18);
100  defaultVectorInt.push_back(22);
101  if(GetOccurrence()==0) {
102  std::vector<int> testVectorInt = GetVectorInt("TestVectorInt",defaultVectorInt);
103  ASSERT_EQUAL(testStr,"Apollo");
104  ASSERT_EQUAL(testInt,5);
105  ASSERT_EQUAL(testDouble,66.73);
106  ASSERT_EQUAL(testBool,false);
107  ASSERT_EQUAL(GetVerbosity(),InfoMsg);
108  ASSERT_EQUAL(testVectorInt.size(),3);
109  ASSERT_EQUAL(testVectorInt[0],15);
110  ASSERT_EQUAL(testVectorInt[1],23);
111  ASSERT_EQUAL(testVectorInt[2],147);
112  } else {
113  std::vector<int> testVectorInt = GetVectorInt("TestVectorInt",defaultVectorInt,false);
114  ASSERT_EQUAL(testStr,"60Co");
115  ASSERT_EQUAL(testInt,24);
116  ASSERT_EQUAL(testDouble,123.45);
117  ASSERT_EQUAL(testBool,true);
118  ASSERT_EQUAL(GetVerbosity(),DebugMsg);
119  ASSERT_EQUAL(testVectorInt.size(),2);
120  ASSERT_EQUAL(testVectorInt[0],18);
121  ASSERT_EQUAL(testVectorInt[1],22);
122  }
123  }
124 
125 
127  /*
128  if(fTestJump) {
129  QError err = JumpToEvent(3);
130  if(err != QERR_SUCCESS) Error("Jumping error: %s", err.ToString().c_str());
131  }
132  */
133 
134  fGlobalQVector.Resize(20);
135  fGlobalQVectorC.Resize(20);
136  // MV FIXME does not work with multiple files
138  // fEventHisto = new TH1D("MyEventHisto","MyEventHisto",10,0,10);
140  // fGlobalHisto = new TH1D("MyGlobalHisto","Global test histo",10,0,10);
141 
142  if(GetSequence().GetName() == "Test") {
143  ev.Add<QInt>("TestInt");
144  ev.Add<QInt>("TestInt2");
145  ev.Add<QFloat>("TestFloat");
146  ev.Add<QBool>("TestBool");
147  ev.Add<QDouble>("TestDouble");
148  ev.Add<QString>("TestString");
149  ev.Add<QVector>("TestVector");
150  ev.Add<QVectorC>("TestVectorC");
151  ev.Add<QMatrix>("TestMatrix");
152  ev.Add<QMatrixC>("TestMatrixC");
153  ev.Add<QInt>("NotWrittenInt").SetWrite(false);
154  }
155  //ev.AuxData().SetTObject("TestHisto",fEventHisto,"save");
156 
157 }
158 
159 // Doit method is called for each event, getting the event as argument
161 {
162 
163  const QHeader& header = ev.Get<QHeader>("DAQ","Header");
164  QEventLabel hlab("DAQ@Header");
165  const QHeader& header2 = ev.GetByLabel<QHeader>(hlab);
166  header2.IsValid();
167  ev.Get<QHeader>("","Header");
168  QInt a = 3;
169  QPulse b;
170  QObjectInspector insp;
171  insp.FindBaseType(&b,"");
172 
173 
174  int eventnum = header.GetEventNumber();
175  int readnum = ev.GetReadNumber();
176  if(fWriteEvtNum) Info("ReadNumber is %d, EventNumber is %d, Passed %s",
177  readnum, eventnum,
178  //ev.GetFilters().GetPassed() ? "YES" : "NO" );
179  "YES");
180 
182  QError err;
183  /*
184  if(fTestJump) {
185  if(readnum < 5) {
186  ReadHandle<QBool> pHandle("Passed");
187  ev.Get("FilterTest",pHandle);
188  if(pHandle.IsValid()) {
189  ASSERT_EQUAL(4,readnum);
190  } else {
191  ASSERT_EQUAL(3,readnum);
192  }
193  err= JumpToEvent(5);
194  }
195  if(err != QERR_SUCCESS)
196  Error("Jumping error: %s, %s",
197  err.ToString().c_str(), err.GetDescription().c_str());
198  }
199  */
200 
201  // initialize vector
202  fEventVector.Resize(eventnum%100+1);
203  for(size_t i = 0; i< fEventVector.Size(); i++) {
204  fEventVector[i] = (double)i;
205  }
206  fEventVectorC.SetArray((fEventVector*3.).GetConstArray(),
207  (fEventVector*4.).GetConstArray(), fEventVector.Size());
208 
209  //initialize matrix
210  fEventMatrix.Resize(fEventVector.Size(),fEventVector.Size());
211  for(size_t i = 0; i< fEventVector.Size(); i++) {
212  fEventMatrix.SetCol(i,fEventVector*i);
213  }
214 
215  fEventMatrixC.Resize(fEventVectorC.Size(),fEventVectorC.Size());
216  for(size_t i = 0; i< fEventVectorC.Size(); i++) {
217  fEventMatrixC.SetCol(i,fEventVectorC*i);
218  }
219 
221  // for(size_t i = 1; i<=10; i++)
222  // fEventHisto->SetBinContent(i,i*eventnum*3);
223 
224 
225 // ev.Get<QBool>("TestRawEvent","TestBoolAddition");
226  if(GetSequence().GetName() == "TestBis") {
227  ReadHandle<QInt> r1("NotWrittenInt");
228  ReadHandle<QInt> r2("TestInt");
229  WriteHandle<QInt> r3("NotWrittenInt");
230  ev.Get<QInt>("TestModule",r1);
231  ev.Get<QInt>("TestModule",r2);
232  ev.Get<QInt>(r3);
233  ASSERT_EQUAL(r1.IsValid(),false);
234  ASSERT_EQUAL(r2.IsValid(),true);
235  ASSERT_EQUAL(r3.IsValid(),false);
236 
237  ASSERT_EQUAL(ev.Get<QInt>("TestModule","TestInt"),eventnum);
238 
239 
240  TestQEvent(ev);
241  }
242  // Test aux data
243  if(fIsFirstSequence && fTestGlobal) {
244  if(readnum == 501) {
245  GlobalData().Set("Int1",QInt(1),"CurrentWriter");
246  }
247 
248  if(readnum == 1001) {
249  GlobalData().Set("Int2",QInt(2),"CurrentWriter");
250  }
251  if(readnum == 1501) {
252  GlobalData().Set("Int3",QInt(3),"CurrentWriter");
253  }
254  }
255  if(!fIsFirstSequence && fTestGlobal) {
256  if(readnum == 501) {
257  int a = GlobalData().Get<QInt>("Int1","CurrentReader");
258  ASSERT_EQUAL(a,1);
259  }
260 
261  if(readnum == 1001) {
262  int a = GlobalData().Get<QInt>("Int2","CurrentReader");
263  ASSERT_EQUAL(a,2);
264  }
265  if(readnum == 1501) {
266  int a = GlobalData().Get<QInt>("Int3","CurrentReader");
267  ASSERT_EQUAL(a,3);
268  }
269  }
270 
271  if(fTestEvent){
272  if(GetIteration() == 1) {
273  ReadHandle<QInt> r1("NotWrittenInt");
274  ReadHandle<QInt> r2("TestInt");
275  ev.Get<QInt>("TestModule",r1);
276  ev.Get<QInt>("TestModule",r2);
277  ASSERT_EQUAL(r1.IsValid(),false);
278  ASSERT_EQUAL(r2.IsValid(),false);
279  ev.Get<QInt>("TestInt")=eventnum;
280  ev.Get<QInt>("TestInt2")=eventnum*2;
281  ev.Get<QFloat>("TestFloat")=eventnum*2.;
282  ev.Get<QBool>("TestBool")=false;
283  ev.Get<QDouble>("TestDouble")=pow(1.00001,eventnum);
284  ev.Get<QString>("TestString")="DianaFramework";
285  ev.Get<QVector>("TestVector")=fEventVector;
286  ev.Get<QVectorC>("TestVectorC")=fEventVectorC;
287  ev.Get<QMatrix>("TestMatrix")= fEventMatrix;
288  ev.Get<QMatrixC>("TestMatrixC")= fEventMatrixC;
289  //ev.AuxData().SetTObject("TestHisto",fEventHisto,"save");
290  } else {
291  //ev.Get<QInt>("TestModule","TestCrash");
292  const QEvent& evr = ev;
293  ASSERT_EQUAL(evr.Get<QInt>("TestModule","TestInt"),eventnum);
294  ASSERT_EQUAL(evr.Get<QInt>("TestModule","TestInt2"),eventnum*2);
295  ASSERT_EQUAL((float)evr.Get<QFloat>("TestModule","TestFloat"),eventnum*2.);
296  ASSERT_EQUAL(evr.Get<QBool>("TestModule","TestBool"),false);
297  ASSERT_EQUAL(evr.Get<QDouble>("TestModule","TestDouble"),pow(1.00001,eventnum));
298  ASSERT_EQUAL(ev.Get<QString>("TestString"), "DianaFramework");
299  ReadHandle<QVector> rhandle("TestVector");
300  ev.Get("TestModule",rhandle);
301  const QVector & testVector = rhandle.Get();
302  const QVectorC & testVectorC = evr.Get<QVectorC>("TestModule","TestVectorC");
303 
304  ASSERT_EQUAL(ev.Get<QMatrix>("TestMatrix").GetNCol(),fEventMatrix.GetNCol());
305  ASSERT_EQUAL(ev.Get<QMatrix>("TestMatrix").GetNRow(),fEventMatrix.GetNRow());
306 
307  // std::cout<<"==============================testVectorC.Size()"<<testVectorC.Size()<<std::endl;
308  // std::cout<<"==============================fEventVector.Size()"<<fEventVector.Size()<<std::endl;
309  // std::cout<<"==============================fRe: "<<testVectorC.Re().Size()<<std::endl;
310  for(size_t i = 0; i< fEventVector.Size(); i++) {
311  ASSERT_EQUAL(testVector[i],(double)i);
312 
313  ASSERT_EQUAL(testVectorC.Re()[i],testVector[i]*3.); //qui sbrocca
314  ASSERT_EQUAL(testVectorC.Im()[i],testVector[i]*4.);
315  }
316  // const TH1D* testHisto = (TH1D*) ev.AuxData().GetTObject("TestHisto");
317  // for(size_t i = 1; i <= 10; i++)
318  // ASSERT_EQUAL(testHisto->GetBinContent(i),fEventHisto->GetBinContent(i));
319  }
320  }
321  if(readnum == 2000 && !fIsFirstSequence && fTestGlobal) {
322  ASSERT_EQUAL(true, GlobalData().Get<QBool>("MyGlobalBool",Q_CURRENT_READER));
323  const QVector& fileVec2pp =GlobalData().Get<QVector>("MyGlobalVector2",Q_CURRENT_READER);
324  const QVector& fileVec2 = fileVec2pp;
325  ASSERT_EQUAL(fileVec2.Size(),20);
326  for(int i = 0; i < 20; i++) ASSERT_EQUAL(fileVec2[i], i * 3.);
327  }
328 
329  ReadHandle<QBaselineData> preHandle("BaselineData");
330  ev.Get("BaselineModule",preHandle);
331  if(fIsFirstSequence && GetIteration() == 1) {
332  ASSERT_EQUAL(preHandle.IsValid(),false);
333  } else {
334  ASSERT_EQUAL(preHandle.IsValid(),true);
335  }
336 
337 }
338 
339 // Done method is called after event loop
341 {
342  if(fIsFirstSequence && fTestGlobal) {
343  if(GetIteration() == 1) {
344  // save objects in files
345  for(int i = 0; i < 20; i++)
346  {
347  fGlobalQVector[i] = i * 3.;
348  fGlobalQVectorC[i]=QComplex(i*3.,i*3.);
349  }
350  //for(int i = 1; i <= 10; i++) fGlobalHisto->SetBinContent(i, i * 3.);
351  fGlobalQMatrix.Resize(3,20);
352  fGlobalQMatrix.SetRow(0,fGlobalQVector);
353  fGlobalQMatrix.SetRow(1,fGlobalQVector*2);
354  fGlobalQMatrix.SetRow(2,fGlobalQVector*3);
355  fGlobalQMatrixC.Resize(3,20);
356  fGlobalQMatrixC.SetRow(0,fGlobalQVectorC);
357  fGlobalQMatrixC.SetRow(1,fGlobalQVectorC*2);
358  fGlobalQMatrixC.SetRow(2,fGlobalQVectorC*3);
359  GlobalData().Set("MyGlobalIntMemory", QInt(3),"");
360  GlobalData().Set("MyGlobalDouble", QDouble(3.14) ,fOutputDir +"/testglobal.root");
361  // GlobalData().SetDouble("MyGlobalDouble", 3.14,"testglobal");
362  GlobalData().Set("MyGlobalString", QString("Hi, this is Marco"),fOutputDir +"/testglobal.root");
363  GlobalData().Set("MyGlobalFloat", QDouble(6.28),fOutputDir +"/testglobal.root");
364  GlobalData().Set("MyGlobalInt", QInt(1234),fOutputDir +"/testglobal.root");
365  GlobalData().Set("MyGlobalIntTxt", QInt(1234),fOutputDir +"/testglobal.txt");
366  GlobalData().Set("MyGlobalBool", QBool(true),fOutputDir +"/testglobal.root");
367  GlobalData().Set("MyGlobalBoolTxt", QBool(true),fOutputDir +"/testglobal.txt");
368  GlobalData().Set("MyGlobalBool2", QBool(false),fOutputDir +"/testglobal.root");
369  GlobalData().Set("MyGlobalVector", fGlobalQVector,fOutputDir +"/testglobal.root");
370  GlobalData().Set("MyGlobalVector2", fGlobalQVector,fOutputDir +"/testglobal2.root");
371  GlobalData().Set("MyGlobalVector2Txt", fGlobalQVector,fOutputDir +"/testglobal2.txt");
372  GlobalData().Set("MyGlobalMatrixTxt", fGlobalQMatrix,fOutputDir +"/testglobal3.txt");
373  GlobalData().Set("MyGlobalVectorC", fGlobalQVectorC,fOutputDir +"/testglobal.root");
374  GlobalData().Set("MyGlobalVectorC2", fGlobalQVectorC,fOutputDir +"/testglobal2.root");
375  GlobalData().Set("MyGlobalVectorC2Txt", fGlobalQVectorC,fOutputDir +"/testglobal2.txt");
376  //GlobalData().Set("MyGlobalMatrixCTxt", fGlobalQMatrixC,fOutputDir +"/testglobal3.txt");
377  //GlobalData().SetTObject("MyGlobalHisto",fGlobalHisto, "testglobal.root");
382  } else {
383  // check object saved in sequence memory
384  ASSERT_EQUAL(3,GlobalData().Get<QInt>("MyGlobalIntMemory",""));
385  // Write to the event output file.
386  GlobalData().Set("MyGlobalVector2", fGlobalQVector,Q_CURRENT_WRITER);
387  GlobalData().Set("MyGlobalVectorC2", fGlobalQVectorC,Q_CURRENT_WRITER);
388  GlobalData().Set("MyGlobalBool", QBool(true),Q_CURRENT_WRITER);
389  }
390  }
391 
392  if(fTestGlobal && !fIsFirstSequence) {
393  // read objects from files
394 // GlobalData().GetDouble("MyGlobalDouble","testglobal");
395  ASSERT_EQUAL(3.14, GlobalData().Get<QDouble>("MyGlobalDouble",fOutputDir +"/testglobal.root"));
396  ASSERT_EQUAL( GlobalData().Get<QString>("MyGlobalString",fOutputDir +"/testglobal.root"),"Hi, this is Marco");
397  ASSERT_EQUAL(6.28, GlobalData().Get<QDouble>("MyGlobalFloat",fOutputDir +"/testglobal.root"));
398  ASSERT_EQUAL(1234, GlobalData().Get<QInt>("MyGlobalInt",fOutputDir +"/testglobal.root"));
399  GlobalHandle<QInt> gh("MyGlobalIntTxt");
400  GlobalData().Get(&gh,fOutputDir +"/testglobal.txt");
401  ASSERT_EQUAL(true,gh.IsValid());
402  if(gh.IsValid()) {
403  ASSERT_EQUAL(1234,gh.Get());
404  }
405  ASSERT_EQUAL(true, GlobalData().Get<QBool>("MyGlobalBool",fOutputDir +"/testglobal.root"));
406  GlobalHandle<QBool> ghb("MyGlobalBoolTxt");
407  GlobalData().Get(&ghb,fOutputDir +"/testglobal.txt");
408  ASSERT_EQUAL(true,ghb.IsValid());
409  if(ghb.IsValid()) {
410  ASSERT_EQUAL(true,ghb.Get());
411  }
412 
413  ASSERT_EQUAL(false, GlobalData().Get<QBool>("MyGlobalBool2",fOutputDir +"/testglobal.root"));
414  const QVector& fileVecp = GlobalData().Get<QVector>("MyGlobalVector",fOutputDir +"/testglobal.root");
415 
416  const QVector& fileVec = fileVecp;
417  ASSERT_EQUAL(fileVec.Size(),20);
418  for(int i = 0; i < 20; i++) ASSERT_EQUAL(fileVec[i], i * 3.);
419 
420  const QVector& fileVec2p = GlobalData().Get<QVector>("MyGlobalVector2",fOutputDir +"/testglobal2.root");
421  const QVector& fileVec2 = fileVec2p;
422  ASSERT_EQUAL(fileVec2.Size(),20);
423  for(int i = 0; i < 20; i++) ASSERT_EQUAL(fileVec2[i], i * 3.);
424 
425  const QVector& fileVec2Txtp =GlobalData().Get<QVector>("MyGlobalVector2Txt",fOutputDir +"/testglobal2.txt");
426  const QVector& fileVec2Txt = fileVec2Txtp;
427  ASSERT_EQUAL(fileVec2Txt.Size(),20);
428  for(int i = 0; i < 20; i++) ASSERT_EQUAL(fileVec2Txt[i], i * 3.);
429 
430  const QMatrix& fileMatrixTxtp =GlobalData().Get<QMatrix>("MyGlobalMatrixTxt",fOutputDir +"/testglobal3.txt");
431  ASSERT_EQUAL(fileMatrixTxtp.GetNRow(),3);
432  ASSERT_EQUAL(fileMatrixTxtp.GetNCol(),20);
433  for(int i = 0; i < 3; i++)
434  for(int j = 0; j < 20;j++)
435  ASSERT_EQUAL(fileMatrixTxtp.GetRow(i)[j], ((fileVec2Txtp)*double(i+1))[j]);
436 
437  //const TH1D* fileHisto =(const TH1D*)GlobalData().GetTObject("MyGlobalHisto","test/testglobal.root");
438  //for(int i = 1; i <= 10; i++) ASSERT_EQUAL(fileHisto->GetBinContent(i),i*3);
439 
440  }
441 
442  if(GetIteration() < fIter) {
443  Info("Ending iteration %d",GetIteration());
444  SetRunAgain(true);
445  } else {
446  SetRunAgain(false);
447  }
448 
449  QError err(QERR_SUCCESS,__FILE__,__LINE__,"QError test");
450  Info("QError: %s, %s",err.ToString().c_str(),err.GetDescription().c_str());
451  fMyOccurrence = -1;
452 }
453 
454 
456 {
457 /*
458  QEvent * newEv = new QEvent(ev);
459  delete newEv;
460  QEvent ev2(ev);
461  ASSERT_EQUAL(ev2.Get<QInt>("TestModule","TestInt"),ev.Get<QInt>("TestModule","TestInt"));
462  const QVector& vec= ev.Get<QVector>("TestModule","TestVector");
463  const QVector& vec2= ev2.Get<QVector>("TestModule","TestVector");
464  ASSERT_EQUAL(vec.Size(),vec2.Size());
465 */
466 }
err
Definition: CheckOF.C:114
TF1 a
Definition: CheckOF.C:21
QVector b
Definition: CheckOF.C:21
#define ASSERT_EQUAL(x, y)
Definition: MTestModule.cc:25
QBaseType< double > QDouble
double wrapped in a QObject
Definition: QBaseType.hh:184
QBaseType< int > QInt
int wrapped in a QObject
Definition: QBaseType.hh:174
Diana::QComplex pow(const Diana::QComplex &z, double a)
Raise a complex number to a real power.
Definition: QComplex.cc:246
#define Q_CURRENT_WRITER
Definition: QDiana.hh:40
#define Q_CURRENT_READER
Definition: QDiana.hh:42
#define REGISTER_MODULE(clazz)
Definition: QDriver.hh:133
@ QERR_SUCCESS
Definition: QError.hh:27
@ DebugMsg
Definition: QMessageDefs.hh:6
@ InfoMsg
Definition: QMessageDefs.hh:7
diana framework software test.
Definition: MTestModule.hh:24
static Diana::QSequence * fFirstSequence
Definition: MTestModule.hh:42
static int fMyOccurrence
Definition: MTestModule.hh:68
virtual ~MTestModule()
Definition: MTestModule.cc:55
void TestQEvent(const Diana::QEvent &ev)
Definition: MTestModule.cc:455
virtual void Do(Diana::QEvent &ev)
Definition: MTestModule.cc:160
virtual void Done()
Definition: MTestModule.cc:340
static Diana::QSequence * fCurrentSequence
Definition: MTestModule.hh:43
virtual void Init(Diana::QEvent &ev)
Definition: MTestModule.cc:71
base types wrapped into a QObject. Currently implemented types are QInt QDouble and QFloat....
Definition: QBaseType.hh:17
bool wrapped into a QObject
Definition: QBool.hh:17
error class with error type and description
Definition: QError.hh:115
label for QObject in the QEvent
Definition: QEventLabel.hh:23
diana event
Definition: QEvent.hh:46
const Q & GetByLabel(const QEventLabel &label) const
Get a QObject in read mode by label.
Definition: QEvent.hh:135
void Get(const char *owner, ReadHandle< Q > &handle) const
Get a QObject Handle in read mode.
Definition: QEvent.hh:74
unsigned int GetReadNumber() const
return the event number as read by the current reader.
Definition: QEvent.hh:60
void Add(WriteHandle< Q > &handle)
Add a QObject to the event.
Definition: QEvent.hh:193
virtual bool IsValid() const
Check object validity.
Definition: QHandle.hh:34
Raw event: basic information like run number and time.
Definition: QHeader.hh:16
int GetEventNumber() const
get EventNumber
Definition: QHeader.hh:25
Interface for complex matrices in Diana analysis.
Definition: QMatrixC.hh:27
Interface for matrices in Diana analysis.
Definition: QMatrix.hh:24
UInt_t GetNRow() const
get number rows
Definition: QMatrix.hh:63
QVector GetRow(UInt_t nrow)
get row
Definition: QMatrix.cc:234
UInt_t GetNCol() const
get number of columns
Definition: QMatrix.hh:68
MemberInfo FindBaseType(QObject *obj, const char *member)
Raw event: sampled waveform.
Definition: QPulse.hh:22
string wrapped into a QObject
Definition: QString.hh:18
read handle to access QEvent QObject's.
Definition: QHandle.hh:126
const T & Get() const
Get Object.
Definition: QHandle.hh:133
write handle to access and add QEvent QObject's.
Definition: QHandle.hh:155
the Diana namespace is needed because sometimes we use Qt libraries, that use same class names of our...