source: trunk/MagicSoft/Mars/macros/merpp.C@ 1912

Last change on this file since 1912 was 948, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Thomas Bretz 12/2000 (tbretz@uni-sw.gwdg.de)
19!
20! Copyright: MAGIC Software Development, 2000-2001
21!
22!
23\* ======================================================================== */
24
25
26/////////////////////////////////////////////////////////////////////////////
27//
28// This is an easy implementation of the Merging process (as root Macro)
29//
30// at the moment it reads a binary file ("rawtest.bin") which was written
31// in the DAQ raw format.
32//
33// The data are stored in root container objects (classes derived from
34// TObject like MRawRunHeader)
35//
36// This containers are written to a root file ("rawtest.root")
37//
38/////////////////////////////////////////////////////////////////////////////
39
40void merpp()
41{
42 //
43 // create a (empty) list of parameters which can be used by the tasks
44 // and an (empty) list of tasks which should be executed
45 //
46 MTaskList tasks;
47 MParList plist;
48
49 plist.AddToList(&tasks);
50
51 //
52 // create the tasks which should be executed and add them to the list
53 // in the case you don't need parameter containers, all of them can
54 // be created by MRawFileRead::PreProcess
55 //
56 // REMARK: Don't change the order of the two instantiations.
57 // I don't have an idea why, but here it crashes the
58 // Interpreter.
59 // (Using root 2.25/03, with Cint 5.14.50 on OSF1)
60 //
61
62 MRawFileRead reader("/home/tbretz/data/20010219-00020-d-octobertest-e");
63 MRawFileWrite writer("otest.root", "RECREATE");
64 tasks.AddToList(&reader);
65 tasks.AddToList(&writer);
66
67 //
68 // create the looping object and thell it about the parameters to use
69 // and the tasks to execute
70 //
71 MEvtLoop magic;
72
73 magic.SetParList(&plist);
74
75 //
76 // Start the eventloop which reads the raw file (MRawFileRead) and
77 // write all the information into a root file (MRawFileWrite)
78 //
79 // between reading and writing we can do, transformations, checks, etc.
80 // (I'm think of a task like MRawDataCheck)
81 //
82 magic.Eventloop();
83}
84
85
Note: See TracBrowser for help on using the repository browser.