HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rawnoisemonitor.cxx
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include <stdio.h>
3 
4 #include "HarpoConfig.h"
5 #include "HarpoDccReader.h"
6 #include "HarpoDccHeader.h"
8 
9 #include "TROOT.h"
10 #include "TStyle.h"
11 #include "TApplication.h"
12 
13 int main(int argc, char **argv)
14 {
15  Long_t processed = -1; // Processed events counter , negative on error
16  HarpoDccHeader *hdr;
17 
18  HarpoConfig::gHReaderType = hDummyReader; //no high level reader
19  HarpoConfig *cfg = new HarpoConfig(argc,argv,XDCC);
20  cfg->print();
21 
22  HarpoDccReader *rdr = new HarpoDccReader( cfg );
23 
25  // Open dcc file and check header
26  if ( rdr->Init() ) {
27  hdr = rdr->GetDetHeader();
28  hdr->print();
29  }
30  else
31  {
32  printf ("Int ERROR exiting ...\n");
33  return 1;
34  }
35 
36  TApplication *theApp = new TApplication("App", &argc, argv);
37  gROOT->SetStyle("Plain"); gStyle->SetPalette(1);
38 
39 
40  rdr->SetDet(cfg->GetDet());
41  // Register analyse
42  rdr->SetAnalyseFunction(myAna);
43 
44  //if ( rdr->NextEvent() ) printf("\n Next Event OK\n");
45  processed = rdr->Loop();
46  // delete cfg;
47 
48  myAna->Save();
49  //rdr->Save();
50 
51  printf("\n Done processed Events %li\n",processed);
52  delete myAna;
53  delete rdr;
54  delete cfg;
55 
56  theApp->Run();
57 
58  return 0;
59 }
60 
61 
62 
A class which read HARPO dcc file from one DCC and creant Dcc Events and Dcc Headers for DCC Events o...
Long_t Loop()
Read errors.
A class hold HARPO run iformation.
Bool_t Init()
Init method : Open in/out files and check run header signature.
Long64_t GetDet()
Get Detector Number for single detector readers.
Definition: HarpoConfig.h:142
HarpoDccHeader * GetDetHeader()
int main(int argc, char **argv)
void SetAnalyseFunction(HarpoDccAnalyse *func)
Unknown Detector.
Definition: HarpoDet.h:18
void SetDet(Long_t plane)
void print() const
Read config file in libconfig format.
static hReaderType gHReaderType
Reader Type.
Definition: HarpoConfig.h:179
A class which keeps track of the entire configuration of the analysis.
Definition: HarpoConfig.h:50
A virtual class which define intrafece between HARPO Reader and Event Analysis code.