HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sim.cxx
Go to the documentation of this file.
1 /*
2  * Look for Dcc Event by number and print event map if found
3  */
4 #include <cstdlib>
5 #include <cstdio>
6 #include <iostream>
7 
8 #include "HarpoConfig.h"
9 #include "HarpoSimReader.h"
10 #include "HarpoDetHeader.h"
11 #include "HarpoSimEvent.h"
12 
13 int main(int argc, char **argv)
14 {
15  Long_t processed = -1; // Processed events counter , negative on error
16  // HarpoSimHeader *hdr;
17 
18  HarpoConfig *cfg = new HarpoConfig(argc,argv);
19  cfg->print();
20 
21  HarpoSimReader *rdr = new HarpoSimReader( cfg );
22  // rdr->SetDet(cfg->GetDet());
23 
24  // if ( rdr->Init() ) {
25  // }
26  // else
27  if(!rdr->Init()) {
28  printf ("Int ERROR exiting ...\n");
29  return 1;
30  }// else{
31  // hdr = rdr->GetDetHeader();
32  // hdr->print();
33  // }
34 
35  processed = rdr->Loop();
36 
37  printf("\n Processed %ld Events\n",processed);
38 
39  rdr->Delete();
40  // delete cfg;
41  // delete hdr;
42 
43  return 0;
44 }
45 
46 
47 
A class which read HARPO sim file from one SIM and creant Sim Events and Sim Headers for SIM Events o...
int main(int argc, char **argv)
Definition: sim.cxx:13
Long_t Loop()
Read errors.
Bool_t Init()
Init method : Open in/out files and check run header signature.
void print() const
Read config file in libconfig format.
A class which keeps track of the entire configuration of the analysis.
Definition: HarpoConfig.h:50