Ignore:
Timestamp:
08/13/04 14:59:17 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/readraw.C

    r948 r4609  
    1616!
    1717!
    18 !   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
     18!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2001
     20!   Copyright: MAGIC Software Development, 2000-2004
    2121!
    2222!
     
    2424
    2525
    26 void readraw()
     26void readraw(const char *fname="/data/MAGIC/Period016/mcdata/spot_1cm/standard/gamma/Gamma_zbin9_90_7_1740to1749_w0.root")
    2727{
    2828    //
    2929    // open the file
    3030    //
    31     TFile input("test.root", "READ");
     31    TFile input(fname, "READ");
    3232
    3333    //
     
    4646    //
    4747    MRawRunHeader *runheader = new MRawRunHeader();
    48     runtree->GetBranch("MRawRunHeader")->SetAddress(&runheader);
     48    runtree->GetBranch("MRawRunHeader.")->SetAddress(&runheader);
    4949    runtree->GetEvent(0);
    5050    runheader->Print();
     
    5353    // open the Data Tree
    5454    //
    55     TTree *evttree = (TTree*) input.Get("Data") ;
     55    TTree *evttree = (TTree*) input.Get("Events");
    5656
    5757    //
    5858    // create the instances of the data to read in
    5959    //
    60     MRawEvtHeader  *evtheader = new MRawEvtHeader();
    61     MTime          *evttime   = new MTime();
    62     MRawEvtData    *evtdata   = new MRawEvtData();
    63     MRawCrateArray *evtcrate  = new MRawCrateArray();
     60    MRawEvtHeader  *evtheader = 0;
     61    MTime          *evttime   = 0;
     62    MRawEvtData    *evtdata   = 0;
     63    MRawCrateArray *evtcrate  = 0;
    6464
    6565    //
    6666    // enable the corresponding branches
    6767    //
    68     evttree->GetBranch("MRawEvtHeader")->SetAddress(&evtheader);
    69     evttree->GetBranch("MTime")->SetAddress(&evttime);
    70     evttree->GetBranch("MRawEvtData")->SetAddress(&evtdata);
    71     evttree->GetBranch("MRawCrateArray")->SetAddress(&evtcrate);
     68    evttree->GetBranch("MRawEvtHeader.")->SetAddress(&evtheader);
     69    evttree->GetBranch("MRawEvtData.")->SetAddress(&evtdata);
     70
     71    // Use this for real data only
     72    //evttree->GetBranch("MTime.")->SetAddress(&evttime);
     73    //evttree->GetBranch("MRawCrateArray.")->SetAddress(&evtcrate);
    7274
    7375    //
     
    8385
    8486      evtheader->Print();
    85       evttime->Print();
    86       evtcrate->Print();
    8787      evtdata->Print();
     88
     89      // Use this for real data only
     90      //evttime->Print();
     91      //evtcrate->Print();
    8892    }
    8993}
Note: See TracChangeset for help on using the changeset viewer.