HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HarpoReaderRaw.cxx
Go to the documentation of this file.
1 //
2 // File HarpoReaderRaw.cxx
3 //
11 #include "HarpoReaderRaw.h"
12 #include "HarpoDetReader.h"
13 #include "HarpoConfig.h"
14 #include "HarpoRunHeader.h"
15 #include "HarpoEvent.h"
16 #include "HarpoTimeStamp.h"
17 
18 #include "HarpoDccReader.h"
19 #include "HarpoFeminosReader.h"
20 #include "Pmm2Reader.h"
21 #include "HarpoSimReader.h"
22 
23 #include "TSystem.h"
24 
25 #include <climits>
26 #include <cstdio>
27 #include <arpa/inet.h>
28 #include <cstdlib>
29 //#include <cstring>
30 #include <iostream>
31 
32 
33 ClassImp(HarpoReaderRaw)
34 
35 
41 {
42  if(gHarpoDebug>0) Info("HarpoReaderRaw()"," ");
43 
44  // fNewFile = NULL;
45  // fNewFileName = (TString *) NULL;
46  // fSave = kFALSE;
47 
48  fPmm2Empty = false;
49  fSkipPmm2 = false;
50  fSync = false;
51  fPmm2Sync = 3;
52  fMode = hSyncTime;
53  fSkipEvents = 0;
54  fRunHeader = NULL;
55 }
56 
58 
62 HarpoReaderRaw::HarpoReaderRaw(HarpoConfig *cfg) : HarpoReaderBase(cfg)
63  {
64  if(gHarpoDebug>0) Info("HarpoReaderRaw(cfg)"," ");
65 
66  // fNewFile = NULL;
67  // fNewFileName = cfg->GetOutFile();
68  // fSave = kFALSE;
69 
70  fPmm2Empty = false;
71  fSkipPmm2 = false;
72  fPmm2Sync = 3;
73 
75 
76  fSync = false;
77  fMode = hSyncTime;
78  fRunHeader = new HarpoRunHeader(cfg);
79 
80 }
81 
83 {
84  if(gHarpoDebug>0) Info("~HarpoReaderRaw()"," ");
85  if( fRunHeader != NULL) delete fRunHeader;
86  // ??? Delete Det Constructors
87  // if ( fNewFile != NULL) {
88  // fNewFile->Close();
89  // }
90 }
91 
92 void HarpoReaderRaw::SetDetFile(TString * /* name */ ,Int_t /* plane */)
93 {
94  //todo Do we need this method ?
95  // fInFile[plane] = name; //???
96 }
97 
98  void HarpoReaderRaw::SetRootFile(TString *name)
99  {
100  //if(gHarpoDebug>0)
101  Info("Dummy SetRootFile","%s",name->Data());
102  }
103 
105 
107 {
108  if(gHarpoDebug>1) Info("NextEvent"," ");
109  Bool_t res = true;
110  ULong_t ndet;
111  Long_t deltat;
112  // ULong_t ts[2],tso[2];
113 
114  for(ndet=0;ndet<gkNDetectors;ndet++){
115  if(gHarpoDebug>1) Info("NextEvent","%ld => %d",ndet,fDetSet->isExist(ndet));
116  // if(fDetSet->isSim()){
117  // res = res && fDetReader[SIMDET]->NextEvent();
118  // break;
119  // }
120  if (fDetSet->isExist(ndet)){
121  if(!(ndet==PMM2 && fPmm2Empty)) // ran out of PMM2 events (possible sync issue)
122  res = res && fDetReader[ndet]->NextEvent();
123  else{
124  if(gHarpoDebug>0)
125  Info("NextEvent","Skipping PMM2 Reader (no available data)");
126  }
127  // fDetReader[ndet]->GetTimeStamp();
128  }
129  }
130 
131  if ( ! res ) return res; // No more event or errors
132 
133  // if (fDetSet->isExist(0) && fDetSet->isExist(1) && !fDetSet->isSim()){
134  if (fDetSet->isExist(0) && fDetSet->isExist(1)){
135  ULong_t ts[2] = {0, 0};
136  ULong_t tso[2] = {0, 0};
137  for(ndet=0; ndet<2; ndet++) // Only 0 - plane X and 1 - plane Y
138  {
139  ts[ndet] = fDetReader[ndet]->GetTimeStamp();
140  tso[ndet] = fDetReader[ndet]->GetPrevTimeStamp();
141  if(gHarpoDebug>1)
142  Info("NextEvent","Time stamps for det %li: %li %li",ndet,ts[ndet],tso[ndet]);
143  }
144 
145  deltat = HarpoTimeStamp::CompareTimeStamps(ts,tso);
146  if(fNevts==0 && deltat<100000){
147  HarpoTimeStamp::TSoffset = deltat;
148  deltat = 0;
149  }
150 
151  fSync = ( deltat == 0 );
152  if(gHarpoDebug>1)
153  Info("NextEvent","deltat = %ld, fMode = %d",deltat,fMode);
154 
155  switch (fMode) {
156  case hNoCMPTime : // Read without timestamp comparision
157  break;
158  case hFirstTime : // return only plane with smaller time stamp
159  if ( deltat == 0 ) {
160  //fSync = true;
161  } else if ( deltat < 0 ) { // x - plane with small time stamp
162  fDetReader[1]->PushBack(); // the same y event on next read
163  } else { // y smaler
164  fDetReader[0]->PushBack();
165  }
166  break;
167  case hSyncTime : // skip plane event with smaller timestamp
168  if ( deltat == 0 ) {
169  // fSync = true;
170  } else if ( deltat < 0 ) { // x - plane with small time stamp
171  fDetReader[1]->PushBack(); // the same y event on next read
172  fDetReader[0]->SkipEvent(); // next x
173  res = NextEvent();
174  fNevts--; // recursion, not real next event
175  } else { // y smaler
176  fDetReader[0]->PushBack();
177  fDetReader[1]->SkipEvent(); // next y
178  res = NextEvent();
179  fNevts--; // recursion, not real next event
180  }
181  break;
182  default :
183  Warning("NextEvent","*** BAD Read Mode %d", fMode);
184  return false;
185  }
186  }
187  fNevts++;
188 
189  if ((fDetSet->isExist(0) || fDetSet->isExist(1)) && fDetSet->isExist(2) && !fPmm2Empty){
190 
191 
192  // ULong_t ts[2] = {0, 0};
193  // ULong_t tso[2] = {0, 0};
194  // if(fDetSet->isExist(0)){
195  // ts[0] = (fDetReader[0]->GetTimeStamp() - fLatency)/10;
196  // tso[0] = (fDetReader[0]->GetPrevTimeStamp() - fLatency)/10;
197  // }else{
198  // ts[0] = (fDetReader[1]->GetTimeStamp() - fLatency)/10;
199  // tso[0] = (fDetReader[1]->GetPrevTimeStamp() - fLatency)/10;
200  // }
201  // ts[1] = fDetReader[2]->GetTimeStamp();
202  // tso[1] = fDetReader[2]->GetPrevTimeStamp();
203 
204  // deltat = HarpoTimeStamp::CompareTimeStamps(ts,tso);
205 
206  // Info("NextEvent","deltat: %li",deltat);
207 
208 
209  ULong_t timestamp ;
210  if(fDetSet->isExist(0))
211  timestamp = fDetReader[0]->GetTimeStamp();
212  else
213  timestamp = fDetReader[1]->GetTimeStamp();
214 
215  if(timestamp)
216  timestamp -= fLatency;
217  ULong_t timestampPmm2 =
219  if(Double_t(timestamp)/10 - Double_t(timestampPmm2) >= fPmm2Sync){
220  // if(TMath::Abs(deltat) > 2){
221  fSkipPmm2 = true;
222  if(gHarpoDebug>1)
223  Info("NextEvent","Timestamp: %li > PMM2: %li (%g)",timestamp, timestampPmm2, Double_t(timestamp)/10 - Double_t(timestampPmm2));
224  if(fDetSet->isExist(0))
225  fDetReader[0]->PushBack();
226  if(fDetSet->isExist(1))
227  fDetReader[1]->PushBack();
228  fDetReader[2]->SkipEvent();
229  res = NextEvent();
230  fNevts--;
231  if(!res){
232  Warning("NextEvent","Could not find matching PMM2 event for timestamp %li",timestamp);
233  // gHDetSet->UnSet(PMM2);
234  fPmm2Empty = true;
235  return true;
236  }
237  }else if(Double_t(timestamp)/10 - Double_t(timestampPmm2) <= -fPmm2Sync){
238  // if(TMath::Abs(deltat) > 2){
239  if(gHarpoDebug>1)
240  Info("NextEvent","Timestamp: %li < PMM2: %li (%g)",timestamp, timestampPmm2, Double_t(timestamp)/10 - Double_t(timestampPmm2));
241 
242  fSkipPmm2 = true;
243 
244  // if(!res){
245  // Warning("NextEvent","Could not find matching PMM2 event for timestamp %li",timestamp);
246  // // gHDetSet->UnSet(PMM2);
247  // fPmm2Empty = true;
248  // return true;
249  // }
250  // fNevts--;
251  } else{
252  if(gHarpoDebug>1)
253  Info("NextEvent","******* Timestamp: %li , PMM2: %li ********",timestamp, timestampPmm2);
254  fSkipPmm2 = false;
255  }
256  }
257 
258  FillEvent();
259 
260  //fSkipPmm2 = false;
261  return res;
262 }
263 
265 {
266  if(gHarpoDebug>1) Info("GetEvent","event %ld",fNevts);
267  HarpoDetEvent *revt;
268  ULong_t ndet;
269 
270  /* if(fEvent==NULL) */ fEvent = new HarpoEvent();
271  /* if(fEventHeader==NULL) */ fEventHeader = new HarpoEventHeader();
272 
273  fEventHeader->SetEvtNo(fNevts); // Event header
276 
277  for(ndet=0;ndet<gkNDetectors;ndet++) {
278  if (fDetSet->isExist(ndet)) {
279  if(ndet==PMM2 && (fPmm2Empty || fSkipPmm2)){
280  if(gHarpoDebug>1) Info("FillEvent","No PMM2 Data");
281  revt = new Pmm2Event();
282  }
283  else
284  revt = fDetReader[ndet]->GetEvent();
285  fEvent->SetDetEvent(revt,ndet);
286  }
287  }
288 
289  return fEvent;
290 }
291 
294 {
295  if(gHarpoDebug>0) Info("GetRunHeader"," ");
296 
297  return fRunHeader;
298 }
299 
301 
304 
307 {
308  if(gHarpoDebug>0) Info("Init","Readout mode %d",mode);
309  Pmm2Reader *lrdr;
310  Bool_t res = true;
311  fMode = mode;
312  fDetSet->print();
313 
314  Long64_t pmm2Sync;
315  if ( ! gHConfig->Lookup("Reader.pmm2Sync",pmm2Sync) )
316  Info("Constructor","Use default pmm2Sync %i",fPmm2Sync);
317  else
318  fPmm2Sync = pmm2Sync;
319 
320  fLatency = 1268;
321  Long64_t latency;
322  if ( ! gHConfig->Lookup("Reader.latency",latency) )
323  Info("Init","Use default Latency %d",fLatency);
324  else
325  fLatency = latency;
326 
327  ULong_t ndet;
328  Long64_t trdr;
329  for(ndet=0;ndet<gkNDetectors;ndet++) {
330  //std::cout << "Init det " << ndet << std::endl;
331  if (fDetSet->isExist(ndet)) {
332  trdr = gHConfig->GetDetRdrType(static_cast<HarpoDetType>(ndet)); // Det Reader instance type
333  switch(ndet){
334  case XDCC:
335  if (trdr == 0 ) {
336  std::cout << "Det is T2K XDCC" << std::endl;
337  fDetReader[ndet] = new HarpoDccReader(gHConfig);
338  }
339  else if (trdr == 1) {
340  std::cout << "Det is MINOS XDCC" << std::endl;
342  }
343  else {
344  std::cout << "UNKNOWN XDCC" << std::endl;
345  fDetReader[ndet] = NULL;
346  }
347  break;
348  case YDCC:
349  if (trdr == 0 ) {
350  std::cout << "Det Reader is T2K YDCC" << std::endl;
351  fDetReader[ndet] = new HarpoDccReader(gHConfig);
352  }
353  else if (trdr == 1) {
354  std::cout << "Det Reader is MINOS YDCC" << std::endl;
356  }
357  else {
358  std::cout << "UNKNOWN YDCC Reader" << std::endl;
359  fDetReader[ndet] = NULL;
360  }
361  break;
362  case PMM2:
363  if (trdr == 0 ) {
364  std::cout << "Det Reader is PMM2 TEXT" << std::endl;
365  // lrdr = new Pmm2Reader(gHConfig);
366  // lrdr->SetReadOutMode(pTEXT);
367  // fDetReader[ndet] = lrdr;
368  }
369  else if (trdr == 1) {
370  std::cout << "Det Reader is PMM2 Windows" << std::endl;
371  // lrdr = new Pmm2Reader(gHConfig);
372  // lrdr->SetReadOutMode(pWIN);
373  // fDetReader[ndet] = lrdr;
374  }
375  else if (trdr == 2) {
376  std::cout << "Det Reader is PMM2 Linux" << std::endl;
377  // lrdr = new Pmm2Reader(gHConfig);
378  // lrdr->SetReadOutMode(pBIN);
379  // fDetReader[ndet] = lrdr;
380  }
381  else if (trdr == 3) {
382  std::cout << "Det Reader is PMM2 Windows 2" << std::endl;
383  // lrdr = new Pmm2Reader(gHConfig);
384  // lrdr->SetReadOutMode(pWIN2);
385  // fDetReader[ndet] = lrdr;
386  }
387  // else if (trdr == 4) {
388  // std::cout << "Det Reader is PMM2 Linux 2" << std::endl;
389  // lrdr = new Pmm2Reader(gHConfig);
390  // lrdr->SetReadOutMode(pBIN2);
391  // fDetReader[ndet] = lrdr;
392  // }
393  else {
394  std::cout << "UNKNOWN PMM2 Reader" << std::endl;
395  return 0;
396  // fDetReader[ndet] = NULL;
397  }
398  lrdr = new Pmm2Reader(gHConfig);
399  lrdr->SetReadOutMode(trdr);
400  fDetReader[ndet] = lrdr;
401  break;
402  case TEMP_PRESSION:
403  std::cout << "Det is TEMP_PRESSION" << std::endl;
404  fDetReader[ndet] = NULL;
405  break;
406  case SIMDET:
407  std::cout << "Det is SIM" << std::endl;
408  fDetReader[ndet] = new HarpoSimReader(gHConfig);
409  //std::cout << "DONE" << std::endl;
410  break;
411  }
412  if(fDetReader[ndet] == NULL) continue;
413 
414  fDetReader[ndet]->SetDet(ndet);
415  fDetReader[ndet]->SetRunNo(fRunNo);
416  fDetReader[ndet]->SetDetFile(gHConfig->GetInFile(ndet));
417  res = res && fDetReader[ndet]->Init();
418  std::cout << res << std::endl;
419  }
420  }
421 
422  // Save det mask
423  fRunHeader->SetSimDataFlag(false);
425 
426  // ULong_t ndet;
427  HarpoDetHeader *rawhdr;
428  for(ndet=0;ndet<gkNDetectors;ndet++) {
429  if (fDetSet->isExist(ndet)) {
430  std::cout << "Get Det Header " << ndet << std::endl;
431  rawhdr = fDetReader[ndet]->GetDetHeader();
432  fRunHeader->SetDetHeader(rawhdr,ndet);
433  }
434  }
435 
436  FillRunConfigInfo(); // Fill from DB
437 
438  return res;
439 }
440 
441 Long_t HarpoReaderRaw::Loop(Long_t maxevents)
442 {
443  Long_t cnt=0;
444  if(gHarpoDebug>0) Info("Loop", "maxevents = %ld",maxevents);
445 
446  std::cout << "HarpoReaderRaw::Loop" << std::endl;
447 
448  while (NextEvent()) {
449  //GetEvent();
450  // Pre
451  Int_t st = hAnaOK;
453 
454  if(fNevts<fFirstEvent || fNevts%(fSkipEvents+1)!=0){
455  fEvent->Delete();
456  continue;
457  }
458 
459  for(Int_t i = 0; i<fNanalyses; i++) {
461  st = fEvent->GetHeader()->GetEvAnaStatus();
462  if ( st < hAnaNextEvent ) break;
463  }
464 
465  // std::cout << "-- Raw Loop " << fNevts << " " << st << std::endl;
466  fEvent->Delete();
467 
468  if (st == hAnaNextFile )
469  {
470  //how to go to next file ?
471  break;
472  }
473  else if (st == hAnaStop)
474  {
475  break;
476  }
477  else if (st <= hAnaAbort)
478  {
479  Error(__FUNCTION__,
480  "Fatal Analysis Error %d aborting prgram.\n",st);
481  std::abort();
482  }
483 
484  if (++cnt >= maxevents) break;
485  }
486  return cnt;
487 }
488 
489 Long_t HarpoReaderRaw::Find(Long_t eventNo)
490 {
491  if(gHarpoDebug>0) Info("Find","Event %ld",eventNo);
492  Long_t cnt=0;
493  Long_t maxevents = fMaxEvents;
494  Bool_t found = false;
495  HarpoEvent *evt;
496 
497  while (NextEvent())
498  {
499  evt = GetEvent(); // We need this as we assemble full event in GetEvent
500  Info("Find","%ld => %ld",eventNo,(evt->GetHeader())->GetEvtNo());
501  if ((evt->GetHeader())->GetEvtNo() == eventNo) {
502  found = true;
503  break;
504  }
505  SkipEvent();
506  if (++cnt >= maxevents) break;
507  }
508  return found;
509 
510 }
511 
513 {
514  if(gHarpoDebug>0) Info("SkipEvent","event %ld",fNevts);
515  ULong_t ndet;
516  for(ndet=0;ndet<gkNDetectors;ndet++) {
517  if (fDetSet->isExist(ndet)) {
518  fDetReader[ndet]->SkipEvent();
519  }
520  }
521 }
522 
524 {
525  HarpoRunHeader * rh = GetRunHeader();
526  Long_t run = rh->GetRun();
527  HarpoRunConfig *info = new HarpoRunConfig();
528 
529  if ( ! info->GetRunConfig(run,gHConfig->GetDbUrl()) )
530  {
531  Info("FillRunConfig","No RunConfig in DB ,run %ld",run);
532  return;
533  }
534 
535  if (info->Lookup("Angle")) {
536  TString val,type;
537  if (info->GetVal("Angle",val)) {
538  // std::cout << "Angle val " << val << std::endl;
539  rh->SetAngle(std::atoi(val.Data()));
540  } else {
541  std::cout << "Angle value not found" << std::endl;
542  }
543 
544  // if (info->GetType("Angle",type)) {
545  // std::cout << "Angle type " << type << std::endl;
546  // } else {
547  // std::cout<< "Angle type not found" << std::endl;
548  // }
549  }
550  else
551  std::cout << "Angle not found" << std::endl;
552 
553  if (info->Lookup("Ebeam")) {
554  TString val,type;
555  if (info->GetVal("Ebeam",val)) {
556  // std::cout << "Ebeam val " << val << std::endl;
557  rh->SetEbeam(std::atof(val.Data()));
558  } else {
559  std::cout << "Ebeam value not found" << std::endl;
560  }
561 
562  // if (info->GetType("Ebeam",type)) {
563  // std::cout << "Ebeam type " << type << std::endl;
564  // } else {
565  // std::cout<< "Ebeam type not found" << std::endl;
566  // }
567  }
568  else
569  std::cout << "Ebeam not found" << std::endl;
570 
571  if (info->Lookup("Ephoton")) {
572  TString val,type;
573  if (info->GetVal("Ephoton",val)) {
574  // std::cout << "Ephoton val " << val << std::endl;
575  rh->SetEgamma(std::atof(val.Data()));
576  } else {
577  std::cout << "Ephoton value not found" << std::endl;
578  }
579 
580  // if (info->GetType("Ephoton",type)) {
581  // std::cout << "Ephoton type " << type << std::endl;
582  // } else {
583  // std::cout<< "Ephoton type not found" << std::endl;
584  // }
585  }
586  else
587  std::cout << "Ephoton not found" << std::endl;
588 
589  //void SetLaser(Int_t value) {fLaser = value;}
590  // void SetTrigger(Int_t value) {fTrigger = value;}
591  // void SetIlaser(Float_t value) {fIlaser = value;}
592  // void SetPola(Int_t value) {fPola = value;}
593 
594  rh->SetRunConfig(info);
595 
596 }
A class hold HARPO run iformation.
HarpoRunHeader * fRunHeader
virtual void print()
Definition: HarpoDetSet.cxx:43
Dcc Plane Y.
Definition: HarpoDet.h:20
A class which read HARPO dcc file from one DCC and creant Dcc Events and Dcc Headers for DCC Events o...
Long_t Loop(Long_t maxevents)
Bool_t GetRunConfig(Long_t nrun, const TString *dbUrl=NULL)
Query Db for given run Only this function in class interact wich DataBase. Must be called in HarpoRaw...
A class which read HARPO data from raw files.
HarpoRunHeader * GetRunHeader()
Create RunHeader with links to all raw headers.
TString * GetDbUrl()
Get harpo database server URL.
Definition: HarpoConfig.h:153
A virtual class store event data for un detector.
Definition: HarpoDetEvent.h:32
Long_t fRunNo
Number of readed events.
virtual ULong_t GetTimeStamp(Int_t after=0)=0
Int_t GetEvAnaStatus()
Get Event Analise status.
Get Run Configuration info by run number. The class query MySQL databe use GetRunConfig Method Only t...
Bool_t NextEvent()
TODO add synchro fro PMM2 (att PMM2 1lsb=100ns, DCC 1lsb=10ns)
void SetEbeam(Float_t value)
Bool_t isExist(ULong_t det)
Detecror date exist //! Number of Real Detectors.
Definition: HarpoDetSet.h:33
Grid Sum Adc readings.
Definition: HarpoDet.h:21
Dcc Plane X.
Definition: HarpoDet.h:19
A class hold HARPO run iformation.
void SetEvAnaStatus(Int_t status)
Set Event Analise status.
TString * GetInFile(Int_t idet)
Get Input file name for detector.
Definition: HarpoConfig.h:96
Stop Event Loop.
HarpoAnalyse * fAnalyse[30]
hReadMode fMode
HarpoDetHeader * GetDetHeader()
Long64_t GetSkipEvents()
Definition: HarpoConfig.h:90
A class which read HARPO sim file from one SIM and creant Sim Events and Sim Headers for SIM Events o...
FullEvent Header not scecific to the detectors The class is ....
Long_t Find(Long_t eventNo)
HarpoEvent * FillEvent()
virtual void PushBack()
Skeeping not "intersting" event.
static int type
void SetReadOutMode(Long_t version)
Definition: Pmm2Reader.h:55
A base class for all top level HARPO readers.
Data from Keller temperuture and pressure sensors.
Definition: HarpoDet.h:22
void SetRunNo(Long_t nRun)
Find raw event by event number.
void SetEgamma(Float_t value)
virtual HarpoDetEvent * GetEvent()
void FillRunConfigInfo()
Find raw event by event number.
void SetHeader(HarpoEventHeader *data)
Definition: HarpoEvent.cxx:75
void SetRunHeader(HarpoRunHeader *rh)
Definition: HarpoEvent.h:42
static Long_t CompareTimeStamps(ULong_t curr[2], ULong_t prev[2])
Close current input file continue with next file.
ULong_t GetMask()
Definition: HarpoDetSet.h:55
HarpoEvent * GetEvent()
Long64_t gHarpoDebug
Definition: HarpoDebug.cxx:9
Long64_t GetDetRdrType(HarpoDetType nDet)
Return type of reader impementation for given Harpo Detector.
Bool_t Lookup(const TString field)
Lookup filed exist.
Bool_t GetVal(const TString field, TString &val)
Return value of existing field in Tstring.
Unknown Detector.
Definition: HarpoDet.h:18
void SetDet(Long_t plane)
virtual void ProcessEvent(HarpoEvent *event)
Set pointer to new event for analyse, anlyse event , and delete.
stop event analysis, but write event
void SetRootFile(TString *name)
virtual Bool_t Init()=0
Bool_t Lookup(const char *path, Bool_t &val)
Lookup function for scalar values.
A class store HARPO raw PMM2 event buffer and header. End provide access metods to the row data...
Definition: Pmm2Event.h:19
ULong_t GetTimeStamp()
Number of readed events.
virtual ~HarpoReaderRaw()
void SetDetFile(TString *name)
HarpoEventHeader * GetHeader()
Definition: HarpoEvent.cxx:80
A class store HARPO row event data and header. Provide access metods to the row event data...
Definition: HarpoEvent.h:29
A class which read HARPO dcc file from one FEMINOS and creant Dcc Events and Dcc Headers for FEMINOS ...
unsigned int res
Definition: Pmm2Status.h:428
A class which read HARPO raw file from PMM2 and create Raw Events objects.
Definition: Pmm2Reader.h:31
static Long_t TSoffset
Abort program without saving the output or < -5.
void SetSimDataFlag(Bool_t flag=true)
HarpoEvent * fEvent
const ULong_t gkNDetectors
Definition: HarpoDet.h:14
void SetAngle(Int_t value)
void SetEvtNo(Long_t rnum)
Set Event Number.
void SetDetEvent(HarpoDetEvent *event, ULong_t plane=XDCC)
Definition: HarpoEvent.cxx:85
void SetRunConfig(HarpoRunConfig *rcfg)
HarpoRunConfig get/set.
HarpoConfig * gHConfig
void SetDetHeader(HarpoDetHeader *hdr, UInt_t ndet=XDCC)
void SetDetMask(ULong_t mask)
virtual void SkipEvent()
Read next event from raw file.
hReadMode
A class which keeps track of the entire configuration of the analysis.
Definition: HarpoConfig.h:50
HarpoDetReader ** fDetReader
ULong_t GetPrevTimeStamp()
HarpoDetSet * fDetSet
HarpoEventHeader * fEventHeader
Bool_t Init(hReadMode mode=hSyncTime)
Init method : Open in/out files and check run header signature.
void SetDetFile(TString *name, Int_t plane)