HARPO  5.1.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
runpeds.cxx
Go to the documentation of this file.
1 //
2 // Demo code access to pdesatals
3 //
4 
5 #include <iostream>
6 #include <stdlib.h>
7 
8 #include "HarpoPedMgr.h"
9 
10 int main(int /* argc */ , char **/* argv */)
11 {
12  HarpoPedMgr *mped;
13  Long_t run;
14  HarpoPedestal * ped[2];
15 
16 
17  std::cout << "******** run pedestals ************" << std::endl;
18 
19  // Run 2
20  run = 2;
21 
22  mped = new HarpoPedMgr();
23  // TString *pfile = new TString("/home/semenjuk/workspace/harpo/trunk/design/informatique/ClientLLR/runconfig/harpopedsraw.root");
24  TString *pfile = new TString("/net/llrdata1.in2p3.fr/data/DATA/data.harpo/2012/Daq/harpopedsraw.root");
25  mped->SetFile(pfile);
26 
27  ped[0] = mped->Lookup(run,0);
28  ped[1] = mped->Lookup(run,1);
29 
30  std::cout << "Run " << run << " Plane 0" << std::endl;
31  ped[0]->Print();
32 
33  std::cout << "Run " << run << " Plane 1" << std::endl;
34  ped[1]->Print();
35 
36  delete ped[0];
37  delete ped[1];
38  // Run 1669
39  run = 1669;
40  ped[0] = mped->Lookup(run,0);
41  ped[1] = mped->Lookup(run,1);
42 
43  std::cout << "Run " << run << " Plane 0" << std::endl;
44  ped[0]->Print();
45 
46  std::cout << "Run " << run << " Plane 1" << std::endl;
47  ped[1]->Print();
48 
49  delete ped[0];
50  delete ped[1];
51  delete pfile;
52  delete mped;
53 
54  return 0;
55 }
56 
57 
58 
HarpoPedestal * Lookup(Long_t run, Long_t detno)
! Serach pedestal and means for given plane
Definition: HarpoPedMgr.cxx:37
int main(int, char **)
Definition: runpeds.cxx:10
void SetFile(TString *file)
Set Femimos Pedistal File Name.
Definition: HarpoPedMgr.cxx:30