HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoAnalyseTest.cxx
Go to the documentation of this file.
1 //
2 // File HarpoAnalyseTest.cxx
3 //
15 #include "HarpoAnalyseTest.h"
16 #include "HarpoConfig.h"
17 #include "HarpoDetSet.h"
18 //#include "HarpoDetSet.h"
19 #include "HarpoEvent.h"
20 
21 #include "TFile.h"
22 
23 #include <cstdlib>
24 #include <cstring>
25 #include <cassert>
26 #include <iostream>
27 
28 ClassImp(HarpoAnalyseTestSeq)
29 
30 // Pass n event form sequence of lenth m and mark rest rise status
31 // M == 0 mark nothing
32 // N >= M mark all
33 
34 void HarpoAnalyseTestSeq::SetParam(UInt_t n,UInt_t m, Int_t rise)
35 {
36  fN = n;
37  fM = m;
38  fCondition = rise;
39 
40 }
41 
42 
44  {
45  UInt_t nevt = nEvents++;
46  // std::cout << " Processing Event " << nEvents<< std::endl;
47  if (fM == 0) return; // nONE
48 
49  if (fN < fM) {
50  if(nevt%fM < fN ) {
52  }
53  }
54  else
55  fEvt->GetHeader()->SetEvAnaStatus(fCondition); // All Events
56  }
57 
58 ClassImp(HarpoAnalyseTestError)
59 
60 
61  void HarpoAnalyseTestError::Init()
62  {
63  Long64_t st;
64  if (gHConfig->Lookup("test.error_status",st)) {
65  std::cout << "AnalyseTest rise " << st
66  << " on event " << gHConfig->GetNEvent()
67  << std::endl;
68  fCondition = st;
69  }
70 
71  }
72 
74  {
75  nEvents++;
76  // std::cout << " Processing Event " << nEvents<< std::endl;
77  if (gHConfig->GetNEvent() == Long64_t(nEvents))
78  fEvt->GetHeader()->SetEvAnaStatus(fCondition); // All Events
79 
80  }
81 
UInt_t fN
Ovreloaded medod whic do all job.
Int_t fCondition
Ovreloaded medod whic do all job.
Test Analyses for readers Rise Condition on event defined by HarpoConfig.GetNEvent() ...
Test Analyses for readers Pass N events from sequestce of M and marsk rest with condition.
void SetEvAnaStatus(Int_t status)
Set Event Analise status.
Long64_t GetNEvent()
Get Event number with we looking for.
Definition: HarpoConfig.h:124
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
HarpoEventHeader * GetHeader()
Definition: HarpoEvent.cxx:80
HarpoEvent * fEvt
Definition: HarpoAnalyse.h:70
ULong_t nEvents
Definition: HarpoAnalyse.h:75
HarpoConfig * gHConfig